From ca5c03ed1772f86bcfa224246f5b45cc12814934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Tue, 26 Nov 2024 16:13:30 +0000 Subject: [PATCH] test: fix feature e2e test by checking flag name in a td instead of url (#8863) https://linear.app/unleash/issue/2-3028/fix-create-feature-flag-e2e-test Fixes our failing [create feature e2e test](https://github.com/Unleash/unleash/actions/runs/12027120576/job/33527490303?pr=8843). We were looking for the feature flag name in the URL, not the DOM. Previously, whenever we created a new feature flag, this would automatically redirect us to that flag's page. This is no longer the case if you use the "Create flag" button you see in the onboarding header, which is the one the test is now using. I agree it makes sense not to redirect in this case, but the test should be adapted accordingly, and instead look for the feature flag name in the table. --- frontend/cypress/integration/feature/feature.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/cypress/integration/feature/feature.spec.ts b/frontend/cypress/integration/feature/feature.spec.ts index d52c7ecd55..7b12459141 100644 --- a/frontend/cypress/integration/feature/feature.spec.ts +++ b/frontend/cypress/integration/feature/feature.spec.ts @@ -53,7 +53,7 @@ describe('feature', () => { it('can create a feature flag', () => { cy.createFeature_UI(featureToggleName, true, projectName); - cy.url().should('include', featureToggleName); + cy.contains('td', featureToggleName).should('exist'); }); it('gives an error if a toggle exists with the same name', () => {