@@ -7,6 +7,12 @@ title: Plugins
7
7
8
8
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
9
9
10
+ ## analyze
11
+
12
+ ### Parameters
13
+
14
+ - ` config ` ** any** (optional, default ` {} ` )
15
+
10
16
## autoDelay
11
17
12
18
Sometimes it takes some time for a page to respond to user's actions.
@@ -521,29 +527,13 @@ I.click('=sign-up') // matches => [data-qa=sign-up],[data-test=sign-up]
521
527
522
528
- ` config`  
523
529
524
- ## debugErrors
525
-
526
- Prints errors found in HTML code after each failed test.
530
+ ## customReporter
527
531
528
- It scans HTML and searches for elements with error classes.
529
- If an element found prints a text from it to console and adds as artifact to the test.
530
-
531
- Enable this plugin in config:
532
-
533
- ` ` ` js
534
- plugins: {
535
- debugErrors: {
536
- enabled: true ,
537
- }
538
- ` ` `
539
-
540
- Additional config options:
541
-
542
- - ` errorClasses` - list of classes to search for errors (default: ` [' error' , ' warning' , ' alert' , ' danger' ]` )
532
+ Sample custom reporter for CodeceptJS.
543
533
544
534
### Parameters
545
535
546
- - ` config` (optional, default ` {} ` )
536
+ - ` config`  
547
537
548
538
## eachElement
549
539
@@ -672,6 +662,32 @@ More config options are available:
672
662
673
663
- ` config` (optional, default ` {}` )
674
664
665
+ ## pageInfo
666
+
667
+ Collects information from web page after each failed test and adds it to the test as an artifact.
668
+ It is suggested to enable this plugin if you run tests on CI and you need to debug failed tests.
669
+ This plugin can be paired with ` analyze` plugin to provide more context.
670
+
671
+ It collects URL, HTML errors (by classes), and browser logs.
672
+
673
+ Enable this plugin in config:
674
+
675
+ ` ` ` js
676
+ plugins: {
677
+ pageInfo: {
678
+ enabled: true ,
679
+ }
680
+ ` ` `
681
+
682
+ Additional config options:
683
+
684
+ - ` errorClasses` - list of classes to search for errors (default: ` [' error' , ' warning' , ' alert' , ' danger' ]` )
685
+ - ` browserLogs` - list of types of errors to search for in browser logs (default: ` [' error' ]` )
686
+
687
+ ### Parameters
688
+
689
+ - ` config` (optional, default ` {}` )
690
+
675
691
## pauseOnFail
676
692
677
693
Automatically launches [interactive pause][11] when a test fails.
0 commit comments