fresh-doctor-14925
11/15/2022, 11:24 AMonly
will not help you here. Your issue is that you have nested describes that depend on each other. No it()
block should depend on another it()
block
The only way I can think that you can achieve your aim would be to put it all into one large it()
. Then the execution would stop as soon as it hit a failure condition. While it solves your current problem, it's far from ideal. The better solution would be to design your spec in a way that no it()
or describe()
depends on earlier scenariosincalculable-rainbow-43330
11/15/2022, 11:54 AMfresh-doctor-14925
11/15/2022, 12:21 PMincalculable-rainbow-43330
11/15/2022, 12:28 PMgray-kilobyte-89541
11/15/2022, 12:28 PMincalculable-rainbow-43330
11/15/2022, 12:29 PMfresh-doctor-14925
11/15/2022, 12:36 PMdescribe()
blocks. It's that each should be able to run in isolation. One failing describe should not mean that the other describes will fail. Hence there shouldn't be a need to skip.
But anyway, the plugin above looks like it will suit your use casepolite-potato-14743
11/15/2022, 3:15 PMloud-magician-68396
11/15/2022, 3:20 PMcool-jewelry-73148
11/15/2022, 3:24 PMbig-kangaroo-22502
11/15/2022, 5:00 PMpolite-potato-14743
11/15/2022, 7:33 PMloud-magician-68396
11/15/2022, 7:34 PMhappy-dinner-13480
11/16/2022, 2:39 PMcypress/support/index.ts
I import the plugin: import 'cypress-fail-fast/plugin';
this is the e2e
configuration:
e2e: {
env: {
API_URL: '**',
CYPRESS_PASSWORD: '**',
},
supportFile: 'cypress/support/index.ts',
baseUrl: 'http://localhost:4200',
experimentalInteractiveRunEvents: true,
setupNodeEvents(on, config) {
plugin(on, config);
},
},
but the plugin doesn't seem to do anything, in a failing spec it still runs all the tests (including waits for elements etc.)gray-kilobyte-89541
11/16/2022, 2:44 PMhappy-dinner-13480
11/16/2022, 2:44 PMcypress/tsconfig.json
{
"extends": "../tsconfig.json",
"include": [
"**/**/*.ts"
],
"compilerOptions": {
"sourceMap": false,
"types": [
"cypress",
"node",
"cypress-file-upload",
"cypress-real-events",
"cypress-fail-fast/plugin"
]
}
}
happy-dinner-13480
11/16/2022, 2:45 PM/plugin
in the import, Cypress does complain that the task is unavailable, but when I adde it, Cypress doesn't complain, but it doesn't seem to do anything. oh well, guess I'll open a ticket in the repo 🙂magnificent-memory-85975
11/16/2022, 8:32 PMgray-kilobyte-89541
11/16/2022, 8:53 PMcypress run --record
and add Cypress project ID to your cypress.config.js and set the CYPRESS_RECORD_KEY
is a environment variable on Jenkinsancient-activity-75783
11/17/2022, 12:29 AMhappy-dinner-13480
11/17/2022, 10:28 AMmysterious-wall-17437
11/17/2022, 12:39 PMable-painting-97388
11/17/2022, 1:28 PMsome-controller-43140
11/17/2022, 1:48 PMfresh-doctor-14925
11/17/2022, 2:04 PMnutritious-analyst-96582
11/17/2022, 2:04 PMsome-controller-43140
11/17/2022, 3:33 PMloud-telephone-11500
11/17/2022, 4:09 PMfresh-doctor-14925
11/17/2022, 4:09 PMfresh-doctor-14925
11/17/2022, 4:22 PM