@@ -71,47 +71,6 @@ All methods are chainable:
7171 (See ` tolerance ` option description in [ config] ( ./config.md ) documentation
7272 for details).
7373
74- * ` skip([browser]) ` — skip all tests and nested suites for:
75-
76- - ` skip() ` — all browsers;
77-
78- - ` skip('id') ` — browser with specified ` id ` ;
79-
80- - ` skip('id', comment) ` — browser with specified ` id ` and show ` comment ` in the report;
81-
82- - ` skip(/some RegExp/) ` — browser with ` id ` which matches ` /some RegExp/ ` ;
83-
84- - ` skip(/some RegExp/, comment) ` — browser with ` id ` which matches ` /some RegExp/ ` and show ` comment ` in the report;
85-
86- - ` skip(['id1', /RegExp1/, ...]) ` — multiple browsers;
87-
88- - ` skip(['id1', /RegExp1/, ...], comment) ` — multiple browsers and show ` comment ` in the report.
89-
90- All browsers from subsequent calls to ` .skip() ` are added to the skip list:
91-
92- ``` js
93- suite
94- .skip (' id1' )
95- .skip (/ RegExp1/ );
96- ```
97-
98- is equivalent to
99-
100- ``` js
101- suite .skip ([
102- ' id1' ,
103- / RegExp1/
104- ]);
105- ```
106-
107- * ` browsers([browser]) ` — run all tests and nested suites in specified browsers:
108-
109- - ` browsers('id') ` — browser with specified ` id ` ;
110-
111- - ` browsers(/some RegExp/) ` — browser ` id ` which matches ` /some RegExp/ ` ;
112-
113- - ` browsers(['id1', /RegExp1/, ...]) ` — multiple browsers.
114-
11574* ` capture(stateName, [options], callback(actions, find)) ` — defines a new
11675 state to capture. Optional callback describes a sequence of actions to bring
11776 the page to this state, starting from a ** previous** state of the suite.
@@ -169,6 +128,72 @@ All methods are chainable:
169128* ` after(callback(actions, find)) ` — use this function to execute some code
170129 after the last state. The arguments of a callback are the same as for
171130 ` capture ` and ` before ` callbacks and context is shared between all of them.
131+
132+ ### Skip tests
133+
134+ Sometimes you need to skip tests in specific browsers. For example, tested features
135+ are not available in some browsers yet.
136+
137+ * ` skip.in([browser]) ` — skip all tests and nested suites for:
138+
139+ - ` skip.in('id') ` — browser with specified ` id ` ;
140+
141+ - ` skip.in('id', comment) ` — browser with specified ` id ` and show ` comment ` in the report;
142+
143+ - ` skip.in(/some RegExp/) ` — browser with ` id ` which matches ` /some RegExp/ ` ;
144+
145+ - ` skip.in(/some RegExp/, comment) ` — browser with ` id ` which matches ` /some RegExp/ `
146+ and show ` comment ` in the report;
147+
148+ - ` skip.in(['id1', /RegExp1/, ...]) ` — multiple browsers;
149+
150+ - ` skip.in(['id1', /RegExp1/, ...], comment) ` — multiple browsers and show ` comment ` in the report.
151+
152+ To skip all tests in suite you can use ` skip.in(/.*/) ` .
153+
154+ All browsers from subsequent calls to ` .skip.in ` are added to the skip list:
155+
156+ ``` js
157+ suite
158+ .skip .in (' id1' )
159+ .skip .in (/ RegExp1/ );
160+ ```
161+
162+ is equivalent to
163+
164+ ``` js
165+ suite .skip .in ([
166+ ' id1' ,
167+ / RegExp1/
168+ ]);
169+ ```
170+
171+ * ~ ` skip([browser]) ` ~ — _ deprecated_ .
172+ Works the same way as ` skip.in ` , except to skip all tests you can also write ` skip() ` .
173+
174+ * ` skip.notIn([browser]) ` — skip all tests and nested suites for all browsers,
175+ except ones in the arguments. Accepts same arguments as ` skip.in ` .
176+
177+ To skip test silently, use ` only.in ` function. This way, skipped browsers will not appear in the report.
178+
179+ * ` only.in([browser]) ` — run all tests and nested suites in specified browsers:
180+
181+ - ` only.in('id') ` — browser with specified ` id ` ;
182+
183+ - ` only.in(/some RegExp/) ` — browser ` id ` which matches ` /some RegExp/ ` ;
184+
185+ - ` only.in('id1', /RegExp1/, ...) ` — multiple browsers, also accepts an array as argument.
186+
187+ * ~ ` browsers([browser]) ` ~ — _ deprecated_ . Use ` only.in ` instead.
188+
189+ * ` only.notIn([browser]) ` — run all tests and nested suites in all browsers, except
190+ ones in the arguments. Accepts same arguments as ` only.in ` .
191+
192+ For example:
193+ ``` js
194+ suite .only .in ([' chrome' , ' firefox' ]);
195+ suite .only .notIn (/ ie/ , ' opera' );
196+ ```
172197
173198## Nested suites
174199
@@ -180,7 +205,7 @@ browser, even if URL was not changed.
180205``` js
181206gemini .suite (' parent' , function (parent ) {
182207 parent .setUrl (' /some/path' )
183- .setCaptureElements (' .selector1' , ' .selector2' );
208+ .setCaptureElements (' .selector1' , ' .selector2' )
184209 .capture (' state' );
185210
186211 gemini .suite (' first child' , function (child ) {
@@ -194,7 +219,7 @@ gemini.suite('parent', function(parent) {
194219 child .setCaptureElements (' .next-selector' )
195220 .capture (' third state' , function (actions , elements ) {
196221 // ...
197- })
222+ });
198223
199224 gemini .suite (' grandchild' , function (grandchild ) {
200225 // child suites can have own childs
@@ -206,7 +231,7 @@ gemini.suite('parent', function(parent) {
206231 gemini .suite (' third child' , function (child ) {
207232 // this suite uses completely different URL and set of elements
208233 child .setUrl (' /some/another/path' )
209- .setCaptureElements (' .different-selector' );
234+ .setCaptureElements (' .different-selector' )
210235 .capture (' fifth state' );
211236 });
212237});
0 commit comments