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:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user