From 32f2979f8de09d34d9ebbc57b3601a7a58e0c031 Mon Sep 17 00:00:00 2001 From: Daniel Spaude Date: Fri, 17 Feb 2023 19:20:31 -0500 Subject: [PATCH] work on geo data column tests - WIP --- .../pages/Dashboard/common/Cell/index.ts | 26 +++++++++++++++++++ tests/playwright/tests/columnGeoData.spec.ts | 4 ++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index 48232e90cc..b7bebeb617 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -141,6 +141,32 @@ export class CellPageObject extends BasePage { } } + async verifyGeoDataCell({ + index, + columnHeader, + lat, + long, + }: { + index: number; + columnHeader: string; + lat: string; + long: string; + }) { + const _verify = async expectedValue => { + await expect + .poll(async () => { + const cell = await this.get({ + index, + columnHeader, + }).locator('input'); + return await cell.getAttribute('title'); + }) + .toEqual(expectedValue); + }; + + await _verify(value); + } + async verifyDateCell({ index, columnHeader, value }: { index: number; columnHeader: string; value: string }) { const _verify = async expectedValue => { await expect diff --git a/tests/playwright/tests/columnGeoData.spec.ts b/tests/playwright/tests/columnGeoData.spec.ts index 49ed249e64..4f4d5c9d2f 100644 --- a/tests/playwright/tests/columnGeoData.spec.ts +++ b/tests/playwright/tests/columnGeoData.spec.ts @@ -48,9 +48,10 @@ test.describe.only('Geo Data column', () => { }); await grid.cell.geoData.enterLatLong({ lat: '50.4501', - long: '30.5234', + long: '930.5234', }); await grid.cell.geoData.clickSave(); + // await grid.rootPage.pause(); // await dashboard.grid.cell.attachment.addFile({ // index: i, @@ -64,6 +65,7 @@ test.describe.only('Geo Data column', () => { expect(1 + 2).toBe(3); + // await grid.rootPage.pause(); await grid.column.delete({ title: 'GeoData1' }); await grid.column.verify({ title: 'GeoData1', isVisible: false });