mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-19 17:52:45 +02:00
fix: now we have 2 buttons to create a flag
This commit is contained in:
parent
143c8a3074
commit
9b4500cded
@ -60,7 +60,7 @@ export const createFeature_UI = (
|
|||||||
|
|
||||||
cy.wait(5_000);
|
cy.wait(5_000);
|
||||||
|
|
||||||
cy.get('[data-testid=NAVIGATE_TO_CREATE_FEATURE').click(uiOpts);
|
cy.get('[data-testid=NAVIGATE_TO_CREATE_FEATURE').first().click(uiOpts);
|
||||||
|
|
||||||
cy.intercept('POST', `/api/admin/projects/${projectName}/features`).as(
|
cy.intercept('POST', `/api/admin/projects/${projectName}/features`).as(
|
||||||
'createFeature',
|
'createFeature',
|
||||||
@ -72,10 +72,14 @@ export const createFeature_UI = (
|
|||||||
cy.get("[data-testid='FORM_DESCRIPTION_INPUT'] textarea")
|
cy.get("[data-testid='FORM_DESCRIPTION_INPUT'] textarea")
|
||||||
.first()
|
.first()
|
||||||
.type('hello-world', uiOpts);
|
.type('hello-world', uiOpts);
|
||||||
if (!shouldWait)
|
const clicked = cy
|
||||||
return cy.get("[data-testid='FORM_CREATE_BUTTON']").click(uiOpts);
|
.get("[data-testid='FORM_CREATE_BUTTON']")
|
||||||
else cy.get("[data-testid='FORM_CREATE_BUTTON']").click(uiOpts);
|
.first()
|
||||||
|
.click(uiOpts);
|
||||||
|
if (shouldWait) {
|
||||||
return cy.wait('@createFeature');
|
return cy.wait('@createFeature');
|
||||||
|
}
|
||||||
|
return clicked;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const createProject_UI = (
|
export const createProject_UI = (
|
||||||
|
Loading…
Reference in New Issue
Block a user