Browse Source

adapt tests irt feature toggle

pull/5114/head
Daniel Spaude 2 years ago
parent
commit
433959e2e2
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 4
      tests/playwright/pages/Dashboard/ViewSidebar/index.ts
  2. 2
      tests/playwright/tests/columnGeoData.spec.ts
  3. 2
      tests/playwright/tests/mobileMode.spec.ts
  4. 2
      tests/playwright/tests/viewMap.spec.ts

4
tests/playwright/pages/Dashboard/ViewSidebar/index.ts

@ -37,9 +37,9 @@ export class ViewSidebarPage extends BasePage {
}
}
async changeBetaFeatureToggleValue({ toggleValue }: { toggleValue: boolean }) {
async changeBetaFeatureToggleValue() {
await this.dashboard.rootPage.evaluate(_ => {
window.localStorage.setItem('betaFeatureToggleState', toggleValue ? 'true' : 'false');
window.localStorage.setItem('betaFeatureToggleState', 'true');
});
await this.rootPage.goto(this.rootPage.url());
}

2
tests/playwright/tests/columnGeoData.spec.ts

@ -20,7 +20,7 @@ test.describe('Geo Data column', () => {
await dashboard.treeView.openTable({ title: 'City' });
await dashboard.viewSidebar.changeBetaFeatureToggleValue({ toggleValue: true });
await dashboard.viewSidebar.changeBetaFeatureToggleValue();
await grid.column.create({
title: 'GeoData1',

2
tests/playwright/tests/mobileMode.spec.ts

@ -18,7 +18,7 @@ test.describe('Mobile Mode', () => {
});
test('activating and deactivating Mobile Mode results correct behavior', async () => {
await dashboard.viewSidebar.changeBetaFeatureToggleValue({ toggleValue: true });
await dashboard.viewSidebar.changeBetaFeatureToggleValue();
// in non-mobile mode, all menu items are visible
await dashboard.verifyTeamAndSettingsLinkIsVisible();

2
tests/playwright/tests/viewMap.spec.ts

@ -19,7 +19,7 @@ test.describe('Map View', () => {
dashboard = new DashboardPage(page, context.project);
toolbar = dashboard.map.toolbar;
await dashboard.viewSidebar.changeBetaFeatureToggleValue({ toggleValue: true });
await dashboard.viewSidebar.changeBetaFeatureToggleValue();
// close 'Team & Auth' tab
await dashboard.closeTab({ title: 'Team & Auth' });

Loading…
Cancel
Save