mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
c6ba6059cc
<!-- Thanks for creating a PR! To make it easier for reviewers and everyone else to understand what your changes relate to, please add some relevant content to the headings below. Feel free to ignore or delete sections that you don't think are relevant. Thank you! ❤️ --> Expanded the onClose handler to reset stickiness to default for project on modal close ## About the changes <!-- Describe the changes introduced. What are they and why are they being introduced? Feel free to also add screenshots or steps to view the changes if they're visual. --> <!-- Does it close an issue? Multiple? --> Closes # <!-- (For internal contributors): Does it relate to an issue on public roadmap? --> <!-- Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item: # --> ### Important files <!-- PRs can contain a lot of changes, but not all changes are equally important. Where should a reviewer start looking to get an overview of the changes? Are any files particularly important? --> ## Discussion points <!-- Anything about the PR you'd like to discuss before it gets merged? Got any questions or doubts? --> --------- Signed-off-by: andreas-unleash <andreas@getunleash.ai>
82 lines
2.3 KiB
TypeScript
82 lines
2.3 KiB
TypeScript
/// <reference types="cypress" />
|
|
|
|
declare namespace Cypress {
|
|
interface AddFlexibleRolloutStrategyOptions {
|
|
featureToggleName: string;
|
|
project?: string;
|
|
environment?: string;
|
|
stickiness?: string;
|
|
}
|
|
|
|
interface UserCredentials {
|
|
email: string;
|
|
password: string;
|
|
}
|
|
interface Chainable {
|
|
runBefore(): Chainable;
|
|
|
|
login_UI(user = AUTH_USER, password = AUTH_PASSWORD): Chainable;
|
|
logout_UI(): Chainable;
|
|
|
|
createProject_UI(
|
|
projectName: string,
|
|
defaultStickiness: string
|
|
): Chainable;
|
|
|
|
createFeature_UI(
|
|
name: string,
|
|
shouldWait?: boolean,
|
|
project?: string
|
|
): Chainable;
|
|
|
|
// VARIANTS
|
|
addVariantsToFeature_UI(
|
|
featureToggleName: string,
|
|
variants: Array<string>,
|
|
projectName?: string
|
|
);
|
|
deleteVariant_UI(
|
|
featureToggleName: string,
|
|
variant: string,
|
|
projectName?: string
|
|
): Chainable<any>;
|
|
|
|
// SEGMENTS
|
|
createSegment_UI(segmentName: string): Chainable;
|
|
deleteSegment_UI(segmentName: string, id: string): Chainable;
|
|
|
|
// STRATEGY
|
|
addUserIdStrategyToFeature_UI(
|
|
featureName: string,
|
|
strategyId: string,
|
|
projectName?: string
|
|
): Chainable;
|
|
addFlexibleRolloutStrategyToFeature_UI(
|
|
options: AddFlexibleRolloutStrategyOptions
|
|
): Chainable;
|
|
updateFlexibleRolloutStrategy_UI(
|
|
featureToggleName: string,
|
|
strategyId: string
|
|
);
|
|
deleteFeatureStrategy_UI(
|
|
featureName: string,
|
|
strategyId: string,
|
|
shouldWait?: boolean,
|
|
projectName?: string
|
|
): Chainable;
|
|
|
|
// API
|
|
createUser_API(userName: string, role: number): Chainable;
|
|
updateUserPassword_API(id: number, pass?: string): Chainable;
|
|
addUserToProject_API(
|
|
id: number,
|
|
role: number,
|
|
projectName?: string
|
|
): Chainable;
|
|
createProject_API(name: string): Chainable;
|
|
deleteProject_API(name: string): Chainable;
|
|
createFeature_API(name: string, projectName?: string): Chainable;
|
|
deleteFeature_API(name: string): Chainable;
|
|
}
|
|
}
|