@@ -221,13 +221,16 @@ module.exports = defineConfig({
221
221
})
222
222
{{< /code-block >}}
223
223
224
- Your ` supportFile ` should look the same as in ` cypress<10 ` :
224
+ Add the following line to the ** top level ** of your ` supportFile ` :
225
225
226
226
{{< code-block lang="javascript" filename="cypress/support/e2e.js" >}}
227
- // your previous code is before this line
227
+ // Your code can be before this line
228
+ // require('./commands')
228
229
require('dd-trace/ci/cypress/support')
229
- // also supported:
230
+ // Also supported:
230
231
// import 'dd-trace/ci/cypress/support'
232
+ // Your code can also be after this line
233
+ // Cypress.Commands.add('login', (email, pw) => {})
231
234
{{< /code-block >}}
232
235
233
236
If you're using other Cypress plugins, your ` cypress.config.js ` file should contain the following:
@@ -264,10 +267,13 @@ module.exports = (on, config) => {
264
267
}
265
268
{{< /code-block >}}
266
269
267
- 2 . Add the following line to the [ ` supportFile ` ] [ 4 ] :
270
+ 2 . Add the following line to the ** top level ** of your [ ` supportFile ` ] [ 4 ] :
268
271
{{< code-block lang="javascript" filename="cypress/support/index.js" >}}
269
- // your previous code is before this line
272
+ // Your code can be before this line
273
+ // require('./commands')
270
274
require('dd-trace/ci/cypress/support')
275
+ // Your code can also be after this line
276
+ // Cypress.Commands.add('login', (email, pw) => {})
271
277
{{< /code-block >}}
272
278
273
279
0 commit comments