E2E: Align on how to use feature toggles in cypress tests (#104831)

align on how to use feature toggles in cypress tests
pull/104686/head^2
Sergej-Vlasov 3 weeks ago committed by GitHub
parent e85acf047a
commit 8766daa3c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      e2e/cypress/support/e2e.js
  2. 4
      e2e/run-suite

@ -46,16 +46,11 @@ Cypress.on('uncaught:exception', (err) => {
//
// TODO: read from toggles_gen.csv?
const featureToggles = ['kubernetesDashboards', 'dashboardNewLayouts'];
const featureToggles = ['kubernetesDashboards', 'dashboardNewLayouts', 'dashboardScene'];
beforeEach(() => {
let toggles = [];
if (Cypress.env('DISABLE_SCENES')) {
cy.logToConsole('disabling dashboardScene feature toggle in localstorage');
toggles.push('dashboardScene=false');
}
for (const toggle of featureToggles) {
const toggleValue = Cypress.env(toggle);
if (toggleValue !== undefined) {

@ -92,7 +92,7 @@ case "$1" in
"")
;;
"old-arch")
env[DISABLE_SCENES]=true
env[dashboardScene]=false
cypressConfig[specPattern]=$rootForOldArch/*/$testFilesForSingleSuite
cypressConfig[video]=false
case "$2" in
@ -112,7 +112,7 @@ case "$1" in
"old-arch/"*)
cypressConfig[specPattern]=./e2e/"${args[0]}"/$testFilesForSingleSuite
cypressConfig[video]=${args[1]}
env[DISABLE_SCENES]=true
env[dashboardScene]=false
;;
"dashboards-schema-v2")
env[kubernetesDashboards]=true

Loading…
Cancel
Save