diff --git a/.github/workflows/build_frontend_prs.yml b/.github/workflows/build_frontend_prs.yml index 8c0e3780347c..cbdf61e9c8f6 100644 --- a/.github/workflows/build_frontend_prs.yml +++ b/.github/workflows/build_frontend_prs.yml @@ -4,6 +4,7 @@ on: pull_request: paths: - frontend/** + - .github/workflows/**frontend** jobs: build: diff --git a/frontend/cypress/global.d.ts b/frontend/cypress/global.d.ts index fa6ef0867114..b1180ed914be 100644 --- a/frontend/cypress/global.d.ts +++ b/frontend/cypress/global.d.ts @@ -55,7 +55,7 @@ declare namespace Cypress { // STRATEGY addUserIdStrategyToFeature_UI( featureName: string, - projectName?: string, + projectName: string, ): Chainable; addFlexibleRolloutStrategyToFeature_UI( options: AddFlexibleRolloutStrategyOptions, diff --git a/frontend/cypress/integration/feature/feature.spec.ts b/frontend/cypress/integration/feature/feature.spec.ts index b14f22508e7c..d65c017b93d8 100644 --- a/frontend/cypress/integration/feature/feature.spec.ts +++ b/frontend/cypress/integration/feature/feature.spec.ts @@ -60,17 +60,10 @@ describe('feature', () => { cy.addFlexibleRolloutStrategyToFeature_UI({ featureToggleName, project: projectName, - }).then(() => { - cy.updateFlexibleRolloutStrategy_UI( - featureToggleName, - projectName, - ).then(() => - cy.deleteFeatureStrategy_UI( - featureToggleName, - false, - projectName, - ), - ); }); + + cy.updateFlexibleRolloutStrategy_UI(featureToggleName, projectName); + + cy.deleteFeatureStrategy_UI(featureToggleName, false, projectName); }); }); diff --git a/frontend/cypress/support/commands.ts b/frontend/cypress/support/commands.ts index 3664358146f9..741fd4314ed4 100644 --- a/frontend/cypress/support/commands.ts +++ b/frontend/cypress/support/commands.ts @@ -26,6 +26,10 @@ import { //@ts-ignore } from './API'; +Cypress.on('window:before:load', (window) => { + Object.defineProperty(window.navigator, 'language', { value: 'en' }); + Object.defineProperty(window.navigator, 'languages', { value: ['en'] }); +}); Cypress.Commands.add('runBefore', runBefore); Cypress.Commands.add('login_UI', login_UI); Cypress.Commands.add('createSegment_UI', createSegment_UI);