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

align on how to use feature toggles in cypress tests
This commit is contained in:
Sergej-Vlasov
2025-05-02 09:32:28 +01:00
committed by GitHub
parent e85acf047a
commit 8766daa3c0
2 changed files with 3 additions and 8 deletions
+1 -6
View File
@@ -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) {
+2 -2
View File
@@ -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