Skip to content

Commit 7a92b6f

Browse files
Fix more instances of incorrect test configuration (#2906)
1 parent ccbaf40 commit 7a92b6f

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

source/api/cypress-api/isbrowser.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ it('test', () => {
146146
If you want to target a test or suite to run or be excluded when run in a specific browser, we suggest passing the `browser` within the {% url "test configuration" configuration#Test-Configuration %}. The `browser` option accepts the same {% urlHash "arguments" Arguments %} as `Cypress.isBrowser()`.
147147

148148
```js
149-
it('Download extension in Firefox', { browser: 'firefox' } => {
149+
it('Download extension in Firefox', { browser: 'firefox' }, () => {
150150
cy.get('#dl-extension')
151151
.should('contain', 'Download Firefox Extension')
152152
})
153153
```
154154

155155
```js
156-
it('Show warning outside Chrome', { browser: '!chrome' } => {
156+
it('Show warning outside Chrome', { browser: '!chrome' }, () => {
157157
cy.get('.browser-warning')
158158
.should('contain', 'For optimal viewing, use Chrome browser')
159159
})

source/guides/guides/continuous-integration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ module.exports = (on, config) => {
717717
})
718718
}
719719
```
720+
720721
## Xvfb
721722

722723
When running on Linux, Cypress needs an X11 server; otherwise it spawns its own X11 server during the test run. When running several Cypress instances in parallel, the spawning of multiple X11 servers at once can cause problems for some of them. In this case, you can separately start a single X11 server and pass the server's address to each Cypress instance using `DISPLAY` variable.

source/guides/guides/cross-browser-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ You can specify a browser to run or exclude by passing a matcher to the suite or
192192

193193
```js
194194
// Run the test if Cypress is run via Firefox
195-
it('Download extension in Firefox', { browser: 'firefox' } => {
195+
it('Download extension in Firefox', { browser: 'firefox' }, () => {
196196
cy.get('#dl-extension')
197197
.should('contain', 'Download Firefox Extension')
198198
})
@@ -206,7 +206,7 @@ describe('happy path suite', { browser: 'firefox' }, () => {
206206
207207
// Ignore test if Cypress is running via Chrome
208208
// This test is not recorded to the Cypress Dashboard
209-
it('Show warning outside Chrome', (), { browser: '!chrome' } => {
209+
it('Show warning outside Chrome', { browser: '!chrome' }, () => {
210210
cy.get('.browser-warning')
211211
.should('contain', 'For optimal viewing, use Chrome browser')
212212
})

source/guides/guides/environment-variables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,20 +244,20 @@ describe('test against Spanish site', {
244244

245245
```js
246246
// change environment variable for single test
247-
it('smoke test develop api', (), {
247+
it('smoke test develop api', {
248248
env: {
249249
api: 'https://dev.myapi.com'
250250
}
251-
} => {
251+
}, () => {
252252
cy.request(Cypress.env('api')).its('status').should('eq', 200)
253253
})
254254

255255
// change environment variable for single test
256-
it('smoke test staging api', (), {
256+
it('smoke test staging api', {
257257
env: {
258258
api: 'https://staging.myapi.com'
259259
}
260-
} => {
260+
}, () => {
261261
cy.request(Cypress.env('api')).its('status').should('eq', 200)
262262
})
263263
```

0 commit comments

Comments
 (0)