Browse Source

work on geo data column tests - WIP

pull/4749/head
Daniel Spaude 2 years ago
parent
commit
32f2979f8d
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 26
      tests/playwright/pages/Dashboard/common/Cell/index.ts
  2. 4
      tests/playwright/tests/columnGeoData.spec.ts

26
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

4
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 });

Loading…
Cancel
Save