Browse Source

work on map view tests - WIP

pull/4749/head
Daniel Spaude 2 years ago
parent
commit
04f5ceac96
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 19
      tests/playwright/pages/Dashboard/Map/index.ts
  2. 2
      tests/playwright/tests/viewMap.spec.ts

19
tests/playwright/pages/Dashboard/Map/index.ts

@ -22,11 +22,24 @@ export class MapPage extends BasePage {
}
async zoomOut(times: number) {
await this.rootPage.pause();
const zoomOutButton = await this.get().locator('.leaflet-control-zoom-out');
// await this.rootPage.pause();
// await zoomOutButton.click();
for (let i = 0; i < times; i++) {
await this.get().locator('.leaflet-control-zoom-out').click();
// await this.rootPage.pause();
await zoomOutButton.click();
await this.rootPage.waitForTimeout(400);
// await this.rootPage.pause();
}
await this.rootPage.pause();
// const promises = [];
// for (let i = 0; i < times; i++) {
// promises.push(zoomOutButton.click());
// // await page.waitForTimeout(2000);
// }
// await Promise.all(promises);
// await this.rootPage.pause();
}
// async openExpandedRow({ index }: { index: number }) {

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

@ -76,7 +76,7 @@ test.describe.only('Map View', () => {
title: 'Map 1',
});
// Zoom out
await dashboard.map.zoomOut();
await dashboard.map.zoomOut(8);
});
// await dashboard.viewSidebar.verifyView({

Loading…
Cancel
Save