Browse Source

test: viewGridShare for mm bridge fix

Signed-off-by: mertmit <mertmit99@gmail.com>
feat/export-nest
mertmit 2 years ago
parent
commit
cc9eab1a59
  1. 8
      tests/playwright/fixtures/expectedData.txt
  2. 38
      tests/playwright/fixtures/expectedDataSqlite.txt
  3. 4
      tests/playwright/tests/db/viewGridShare.spec.ts

8
tests/playwright/fixtures/expectedData.txt

@ -1,4 +1,4 @@
Address,District,PostalCode,Phone,Location,Customer List,Staff List,City,Staff List1
1661 Abha Drive,Tamil Nadu,14400,270456873752,"{""x"":78.8214191,""y"":10.3812871}",1,,Pudukkottai,
1993 Tabuk Lane,Tamil Nadu,64221,648482415405,"{""x"":80.1270701,""y"":12.9246028}",2,,Tambaram,
381 Kabul Way,Taipei,87272,55477302294,"{""x"":0,""y"":0}",2,,Hsichuh,
Address,District,PostalCode,Phone,Location,Customer List,Staff List,City
1661 Abha Drive,Tamil Nadu,14400,270456873752,"{""x"":78.8214191,""y"":10.3812871}",1,,Pudukkottai
1993 Tabuk Lane,Tamil Nadu,64221,648482415405,"{""x"":80.1270701,""y"":12.9246028}",2,,Tambaram
381 Kabul Way,Taipei,87272,55477302294,"{""x"":0,""y"":0}",2,,Hsichuh

38
tests/playwright/fixtures/expectedDataSqlite.txt

@ -1,19 +1,19 @@
Address,District,PostalCode,Phone,Customer List,Staff List,City,Staff List1
1013 Tabuk Boulevard," ",96203," ",2,,Kanchrapara,
1168 Najafabad Parkway," ",40301," ",1,,Kabul,
1294 Firozabad Drive," ",70618," ",2,,Pingxiang,
1342 Abha Boulevard," ",10714," ",2,,Bucuresti,
1368 Maracabo Boulevard," ",32716," ",2,,South Hill,
1427 Tabuk Place," ",31342," ",2,,Cape Coral,
1519 Santiago de los Caballeros Loop," ",22025," ",2,,Mwene-Ditu,
1661 Abha Drive," ",14400," ",1,,Pudukkottai,
17 Kabul Boulevard," ",38594," ",1,,Nagareyama,
1838 Tabriz Lane," ",1195," ",1,,Dhaka,
1888 Kabul Drive," ",20936," ",1,,Ife,
1892 Nabereznyje Telny Lane," ",28396," ",2,,Tafuna,
1993 Tabuk Lane," ",64221," ",2,,Tambaram,
217 Botshabelo Place," ",49521," ",2,,Davao,
381 Kabul Way," ",87272," ",2,,Hsichuh,
44 Najafabad Way," ",61391," ",2,,Donostia-San Sebastin,
48 Maracabo Place," ",1570," ",1,,Talavera,
669 Firozabad Loop," ",92265," ",1,,al-Ayn,
Address,District,PostalCode,Phone,Customer List,Staff List,City
1013 Tabuk Boulevard," ",96203," ",2,,Kanchrapara
1168 Najafabad Parkway," ",40301," ",1,,Kabul
1294 Firozabad Drive," ",70618," ",2,,Pingxiang
1342 Abha Boulevard," ",10714," ",2,,Bucuresti
1368 Maracabo Boulevard," ",32716," ",2,,South Hill
1427 Tabuk Place," ",31342," ",2,,Cape Coral
1519 Santiago de los Caballeros Loop," ",22025," ",2,,Mwene-Ditu
1661 Abha Drive," ",14400," ",1,,Pudukkottai
17 Kabul Boulevard," ",38594," ",1,,Nagareyama
1838 Tabriz Lane," ",1195," ",1,,Dhaka
1888 Kabul Drive," ",20936," ",1,,Ife
1892 Nabereznyje Telny Lane," ",28396," ",2,,Tafuna
1993 Tabuk Lane," ",64221," ",2,,Tambaram
217 Botshabelo Place," ",49521," ",2,,Davao
381 Kabul Way," ",87272," ",2,,Hsichuh
44 Najafabad Way," ",61391," ",2,,Donostia-San Sebastin
48 Maracabo Place," ",1570," ",1,,Talavera
669 Firozabad Loop," ",92265," ",1,,al-Ayn

4
tests/playwright/tests/db/viewGridShare.spec.ts

@ -32,6 +32,8 @@ test.describe('Shared view', () => {
// hide column
await dashboard.grid.toolbar.fields.toggle({ title: 'Address2' });
await dashboard.grid.toolbar.fields.toggle({ title: 'Store List' });
// sort
await dashboard.grid.toolbar.sort.add({
title: 'District',
@ -73,6 +75,7 @@ test.describe('Shared view', () => {
{ title: 'LastUpdate', isVisible: true },
{ title: 'Customer List', isVisible: true },
{ title: 'Staff List', isVisible: true },
{ title: 'Store List', isVisible: false },
{ title: 'City', isVisible: true },
];
for (const column of expectedColumns) {
@ -80,6 +83,7 @@ test.describe('Shared view', () => {
}
const expectedRecordsByDb = isSqlite(context) || isPg(context) ? sqliteExpectedRecords : expectedRecords;
await new Promise((resolve) => setTimeout(resolve, 1000));
// verify order of records (original sort & filter)
for (const record of expectedRecordsByDb) {
await sharedPage.grid.cell.verify(record);

Loading…
Cancel
Save