mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
edefa6fc7e
This PR revamps e2e tests, while adding a new one for the interactive demo guide: - Bumps Cypress from `9.7.0` to `12.11.0`; - Bumps Cypress GH action from `v2` to `v5`; - Makes any adjustments needed; - Fixes a lot of issues identified with existing tests; - Adds new `demo.spec.ts` e2e test that covers the entire demo guide flow; **Note:** Currently does not include `demo.spec.ts` in the GH action, as it [fails](https://github.com/Unleash/unleash/actions/runs/4896839575/jobs/8744137231?pr=3656) on step 2.13 (last step of "user-specific" topic). It runs perfectly fine locally, though. Might be placebo, but in general tests seem less flaky now and they may even be faster (especially when not adding the `demo` one, which would always take a long time).
61 lines
2.0 KiB
TypeScript
61 lines
2.0 KiB
TypeScript
///<reference path="../global.d.ts" />
|
|
|
|
import {
|
|
runBefore,
|
|
login_UI,
|
|
logout_UI,
|
|
createProject_UI,
|
|
createFeature_UI,
|
|
createSegment_UI,
|
|
deleteSegment_UI,
|
|
deleteVariant_UI,
|
|
deleteFeatureStrategy_UI,
|
|
addFlexibleRolloutStrategyToFeature_UI,
|
|
addUserIdStrategyToFeature_UI,
|
|
updateFlexibleRolloutStrategy_UI,
|
|
addVariantsToFeature_UI,
|
|
//@ts-ignore
|
|
} from './UI';
|
|
import {
|
|
addUserToProject_API,
|
|
createFeature_API,
|
|
createProject_API,
|
|
createUser_API,
|
|
deleteFeature_API,
|
|
deleteProject_API,
|
|
updateUserPassword_API,
|
|
createEnvironment_API,
|
|
//@ts-ignore
|
|
} from './API';
|
|
|
|
Cypress.Commands.add('runBefore', runBefore);
|
|
Cypress.Commands.add('login_UI', login_UI);
|
|
Cypress.Commands.add('createSegment_UI', createSegment_UI);
|
|
Cypress.Commands.add('deleteSegment_UI', deleteSegment_UI);
|
|
Cypress.Commands.add('deleteFeature_API', deleteFeature_API);
|
|
Cypress.Commands.add('deleteProject_API', deleteProject_API);
|
|
Cypress.Commands.add('logout_UI', logout_UI);
|
|
Cypress.Commands.add('createProject_UI', createProject_UI);
|
|
Cypress.Commands.add('createProject_API', createProject_API);
|
|
Cypress.Commands.add('createUser_API', createUser_API);
|
|
Cypress.Commands.add('addUserToProject_API', addUserToProject_API);
|
|
Cypress.Commands.add('updateUserPassword_API', updateUserPassword_API);
|
|
Cypress.Commands.add('createFeature_UI', createFeature_UI);
|
|
Cypress.Commands.add('deleteFeatureStrategy_UI', deleteFeatureStrategy_UI);
|
|
Cypress.Commands.add('createFeature_API', createFeature_API);
|
|
Cypress.Commands.add('deleteVariant_UI', deleteVariant_UI);
|
|
Cypress.Commands.add('addVariantsToFeature_UI', addVariantsToFeature_UI);
|
|
Cypress.Commands.add(
|
|
'addUserIdStrategyToFeature_UI',
|
|
addUserIdStrategyToFeature_UI
|
|
);
|
|
Cypress.Commands.add(
|
|
'addFlexibleRolloutStrategyToFeature_UI',
|
|
addFlexibleRolloutStrategyToFeature_UI
|
|
);
|
|
Cypress.Commands.add(
|
|
'updateFlexibleRolloutStrategy_UI',
|
|
updateFlexibleRolloutStrategy_UI
|
|
);
|
|
Cypress.Commands.add('createEnvironment_API', createEnvironment_API);
|