Browse Source

test: change in m2m column names

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5848/head
Raju Udava 1 year ago
parent
commit
5264ed07d3
  1. 2
      tests/playwright/fixtures/expectedBaseDownloadData.txt
  2. 2
      tests/playwright/fixtures/expectedBaseDownloadDataPg.txt
  3. 12
      tests/playwright/pages/Dashboard/Grid/index.ts
  4. 2
      tests/playwright/pages/Dashboard/common/Cell/index.ts
  5. 2
      tests/playwright/tests/db/columns/columnAttachments.spec.ts
  6. 2
      tests/playwright/tests/db/columns/columnBarcode.spec.ts
  7. 2
      tests/playwright/tests/db/columns/columnFormula.spec.ts
  8. 26
      tests/playwright/tests/db/columns/columnLinkToAnotherRecord.spec.ts
  9. 2
      tests/playwright/tests/db/columns/columnLookupRollup.spec.ts
  10. 6
      tests/playwright/tests/db/columns/columnMenuOperations.spec.ts
  11. 2
      tests/playwright/tests/db/columns/columnQrCode.spec.ts
  12. 8
      tests/playwright/tests/db/columns/columnRelationalExtendedTests.spec.ts
  13. 4
      tests/playwright/tests/db/features/expandedFormUrl.spec.ts
  14. 4
      tests/playwright/tests/db/features/filters.spec.ts
  15. 2
      tests/playwright/tests/db/features/keyboardShortcuts.spec.ts
  16. 8
      tests/playwright/tests/db/features/metaLTAR.spec.ts
  17. 4
      tests/playwright/tests/db/features/mobileMode.spec.ts
  18. 8
      tests/playwright/tests/db/general/cellSelection.spec.ts
  19. 18
      tests/playwright/tests/db/views/viewForm.spec.ts
  20. 2
      tests/playwright/tests/db/views/viewFormShareSurvey.spec.ts
  21. 16
      tests/playwright/tests/db/views/viewGridShare.spec.ts

2
tests/playwright/fixtures/expectedBaseDownloadData.txt

@ -1,4 +1,4 @@
Country,City List
Country,Cities
Afghanistan,1
Algeria,3
American Samoa,1

2
tests/playwright/fixtures/expectedBaseDownloadDataPg.txt

@ -1,4 +1,4 @@
Country,City List
Country,Cities
Afghanistan,1
Algeria,3
American Samoa,1

12
tests/playwright/pages/Dashboard/Grid/index.ts

@ -296,15 +296,15 @@ export class GridPage extends BasePage {
await expect(await this.rootPage.locator('text=Insert New Row')).not.toBeVisible();
// in cell-add
await this.cell.get({ index: 0, columnHeader: 'City List' }).hover();
await this.cell.get({ index: 0, columnHeader: 'Cities' }).hover();
await expect(
await this.cell.get({ index: 0, columnHeader: 'City List' }).locator('.nc-action-icon.nc-plus')
await this.cell.get({ index: 0, columnHeader: 'Cities' }).locator('.nc-action-icon.nc-plus')
).not.toBeVisible();
// expand row
await this.cell.get({ index: 0, columnHeader: 'City List' }).hover();
await this.cell.get({ index: 0, columnHeader: 'Cities' }).hover();
await expect(
await this.cell.get({ index: 0, columnHeader: 'City List' }).locator('.nc-action-icon >> nth=0')
await this.cell.get({ index: 0, columnHeader: 'Cities' }).locator('.nc-action-icon >> nth=0')
).not.toBeVisible();
}
@ -327,9 +327,9 @@ export class GridPage extends BasePage {
await expect(await this.rootPage.locator('text=Insert New Row')).toBeVisible();
// in cell-add
await this.cell.get({ index: 0, columnHeader: 'City List' }).hover();
await this.cell.get({ index: 0, columnHeader: 'Cities' }).hover();
await expect(
await this.cell.get({ index: 0, columnHeader: 'City List' }).locator('.nc-action-icon.nc-plus')
await this.cell.get({ index: 0, columnHeader: 'Cities' }).locator('.nc-action-icon.nc-plus')
).toBeVisible();
}

2
tests/playwright/pages/Dashboard/common/Cell/index.ts

@ -375,7 +375,7 @@ export class CellPageObject extends BasePage {
);
// virtual cell
const vCell = await this.get({ index: 0, columnHeader: 'City List' });
const vCell = await this.get({ index: 0, columnHeader: 'Cities' });
await vCell.hover();
// in-cell add
await expect(await vCell.locator('.nc-action-icon.nc-plus:visible')).toHaveCount(

2
tests/playwright/tests/db/columns/columnAttachments.spec.ts

@ -92,7 +92,7 @@ test.describe('Attachment column', () => {
const rows = csvArray.slice(1);
const cells = rows[10].split(',');
await expect(columns).toBe('Country,City List,testAttach');
await expect(columns).toBe('Country,Cities,testAttach');
await expect(cells[0]).toBe('Bahrain');
// PR8504
// await expect(cells[1]).toBe('al-Manama');

2
tests/playwright/tests/db/columns/columnBarcode.spec.ts

@ -67,7 +67,7 @@ test.describe('Virtual Columns', () => {
// and compare the base64 encoded codes/src attributes for the first 3 rows.
// Column data from City table (Sakila DB)
/**
* City LastUpdate Address List Country
* City LastUpdate Addresses Country
* A Corua (La Corua) 2006-02-15 04:45:25 939 Probolinggo Loop Spain
* Abha 2006-02-15 04:45:25 733 Mandaluyong Place Saudi Arabia
* Abu Dhabi 2006-02-15 04:45:25 535 Ahmadnagar Manor United Arab Emirates

2
tests/playwright/tests/db/columns/columnFormula.spec.ts

@ -6,7 +6,7 @@ import { isPg, isSqlite } from '../../../setup/db';
// Add formula to be verified here & store expected results for 5 rows
// Column data from City table (Sakila DB)
/**
* City LastUpdate Address List Country
* City LastUpdate Addresses Country
* A Corua (La Corua) 2006-02-15 04:45:25 939 Probolinggo Loop Spain
* Abha 2006-02-15 04:45:25 733 Mandaluyong Place Saudi Arabia
* Abu Dhabi 2006-02-15 04:45:25 535 Ahmadnagar Manor United Arab Emirates

26
tests/playwright/tests/db/columns/columnLinkToAnotherRecord.spec.ts

@ -67,7 +67,7 @@ test.describe('LTAR create & update', () => {
type: 'belongsTo',
});
await dashboard.expandedForm.fillField({
columnTitle: 'Sheet1 List',
columnTitle: 'Sheet1s',
value: '1a',
type: 'manyToMany',
});
@ -84,7 +84,7 @@ test.describe('LTAR create & update', () => {
await dashboard.linkRecord.select('1b');
await dashboard.grid.cell.inCellAdd({
index: 1,
columnHeader: 'Sheet1 List',
columnHeader: 'Sheet1s',
});
await dashboard.linkRecord.select('1b');
await dashboard.grid.cell.inCellAdd({
@ -102,7 +102,7 @@ test.describe('LTAR create & update', () => {
type: 'belongsTo',
});
await dashboard.expandedForm.fillField({
columnTitle: 'Sheet1 List',
columnTitle: 'Sheet1s',
value: '1c',
type: 'manyToMany',
});
@ -126,7 +126,7 @@ test.describe('LTAR create & update', () => {
[['1 Sheet1'], ['1 Sheet1'], ['1 Sheet1']],
[['1 Sheet1'], ['1 Sheet1'], ['1 Sheet1']],
];
const colHeaders = ['Sheet1', 'Sheet1 List', 'Link2-1hm'];
const colHeaders = ['Sheet1', 'Sheet1s', 'Link2-1hm'];
// verify LTAR cell values
for (let i = 0; i < expected.length; i++) {
@ -192,7 +192,7 @@ test.describe('LTAR create & update', () => {
Country: string;
formula?: string;
SLT?: string;
'City List': string[];
Cities: string[];
};
}) {
await dashboard.grid.cell.verify({
@ -209,9 +209,9 @@ test.describe('LTAR create & update', () => {
}
await dashboard.grid.cell.verifyVirtualCell({
index: param.index,
columnHeader: 'City List',
count: param.value['City List'].length,
value: param.value['City List'],
columnHeader: 'Cities',
count: param.value['Cities'].length,
value: param.value['Cities'],
});
if (param.value.SLT) {
await dashboard.grid.cell.verify({
@ -241,14 +241,14 @@ test.describe('LTAR create & update', () => {
index: 0,
value: {
Country: 'Afghanistan',
'City List': ['Kabul'],
Cities: ['Kabul'],
},
});
await verifyRow({
index: 1,
value: {
Country: 'Algeria',
'City List': ['Batna', 'Bchar', 'Skikda'],
Cities: ['Batna', 'Bchar', 'Skikda'],
},
});
@ -274,7 +274,7 @@ test.describe('LTAR create & update', () => {
index: 0,
value: {
Country: 'Afghanistan',
'City List': ['Kabul'],
Cities: ['Kabul'],
SLT: 'test',
formula: 'Afghanistan test',
},
@ -290,7 +290,7 @@ test.describe('LTAR create & update', () => {
index: 0,
value: {
Country: 'Afghanistan2',
'City List': ['Kabul'],
Cities: ['Kabul'],
SLT: 'test',
formula: 'Afghanistan2 test',
},
@ -305,7 +305,7 @@ test.describe('LTAR create & update', () => {
index: 0,
value: {
Country: 'Afghanistan2',
'City List': ['Kabul'],
Cities: ['Kabul'],
SLT: '',
formula: 'Afghanistan2',
},

2
tests/playwright/tests/db/columns/columnLookupRollup.spec.ts

@ -40,7 +40,7 @@ test.describe('Virtual columns', () => {
await dashboard.grid.column.create({
title: 'Rollup',
type: 'Rollup',
childTable: 'City List',
childTable: 'Cities',
childColumn: 'CityId',
rollupType: 'count',
});

6
tests/playwright/tests/db/columns/columnMenuOperations.spec.ts

@ -79,7 +79,7 @@ test.describe('Column menu operations', () => {
await dashboard.grid.column.create({
title: 'InsertAfterColumn1',
type: 'SingleLineText',
insertAfterColumnTitle: 'Actor List',
insertAfterColumnTitle: 'Actors',
});
await dashboard.closeTab({ title: 'Film' });
@ -98,7 +98,7 @@ test.describe('Column menu operations', () => {
await dashboard.grid.column.create({
title: 'InsertBeforeColumn1',
type: 'SingleLineText',
insertBeforeColumnTitle: 'Actor List',
insertBeforeColumnTitle: 'Actors',
});
await dashboard.closeTab({ title: 'Film' });
@ -113,7 +113,7 @@ test.describe('Column menu operations', () => {
});
await dashboard.grid.column.hideColumn({
title: 'Actor List',
title: 'Actors',
});
await dashboard.closeTab({ title: 'Film' });

2
tests/playwright/tests/db/columns/columnQrCode.spec.ts

@ -34,7 +34,7 @@ test.describe('Virtual Columns', () => {
// and compare the base64 encoded codes/src attributes for the first 3 rows.
// Column data from City table (Sakila DB)
/**
* City LastUpdate Address List Country
* City LastUpdate Addresses Country
* A Corua (La Corua) 2006-02-15 04:45:25 939 Probolinggo Loop Spain
* Abha 2006-02-15 04:45:25 733 Mandaluyong Place Saudi Arabia
* Abu Dhabi 2006-02-15 04:45:25 535 Ahmadnagar Manor United Arab Emirates

8
tests/playwright/tests/db/columns/columnRelationalExtendedTests.spec.ts

@ -23,7 +23,7 @@ test.describe('Relational Columns', () => {
for (let i = 0; i < cityList.length; i++) {
await dashboard.grid.cell.verifyVirtualCell({
index: i,
columnHeader: 'City List',
columnHeader: 'Cities',
count: cityList[i].length,
type: 'hm',
options: { singular: 'City', plural: 'Cities' },
@ -33,7 +33,7 @@ test.describe('Relational Columns', () => {
// click on expand icon, open child list
await dashboard.grid.cell.inCellExpand({
index: 0,
columnHeader: 'City List',
columnHeader: 'Cities',
});
await dashboard.childList.verify({
cardTitle: ['Kabul'],
@ -92,7 +92,7 @@ test.describe('Relational Columns', () => {
for (let i = 0; i < filmList.length; i++) {
await dashboard.grid.cell.verifyVirtualCell({
index: i,
columnHeader: 'Film List',
columnHeader: 'Films',
// Count hardwired to avoid verifying all 19 entries
count: 19,
type: 'mm',
@ -102,7 +102,7 @@ test.describe('Relational Columns', () => {
// click on expand icon, open child list
await dashboard.grid.cell.inCellExpand({
index: 0,
columnHeader: 'Film List',
columnHeader: 'Films',
});
await dashboard.childList.verify({
cardTitle: filmList[0],

4
tests/playwright/tests/db/features/expandedFormUrl.spec.ts

@ -66,7 +66,7 @@ test.describe('Expanded form URL', () => {
title: 'CountryExpand',
});
await viewObj.toolbar.clickFields();
await viewObj.toolbar.fields.click({ title: 'City List' });
await viewObj.toolbar.fields.click({ title: 'Cities' });
}
// expand row & verify URL
@ -104,7 +104,7 @@ test.describe('Expanded form URL', () => {
url: 'rowId=1',
});
await dashboard.expandedForm.openChildCard({
column: 'City List',
column: 'Cities',
title: 'Kabul',
});
await dashboard.rootPage.waitForTimeout(1000);

4
tests/playwright/tests/db/features/filters.spec.ts

@ -949,7 +949,7 @@ test.describe('Filter Tests: Link to another record, Lookup, Rollup', () => {
await toolbar.filter.clickAddFilter();
for (let i = 0; i < filterList.length; i++) {
await verifyFilter({
column: 'City List',
column: 'Cities',
opType: filterList[i].op,
value: filterList[i].value,
result: { rowCount: filterList[i].rowCount },
@ -1003,7 +1003,7 @@ test.describe('Filter Tests: Link to another record, Lookup, Rollup', () => {
await dashboard.grid.column.create({
title: 'Rollup',
type: 'Rollup',
childTable: 'Address List',
childTable: 'Addresses',
childColumn: 'PostalCode',
rollupType: 'Sum',
});

2
tests/playwright/tests/db/features/keyboardShortcuts.spec.ts

@ -71,7 +71,7 @@ test.describe('Verify shortcuts', () => {
await grid.cell.click({ index: 0, columnHeader: 'Country' });
await page.waitForTimeout(1500);
await page.keyboard.press((await grid.isMacOs()) ? 'Meta+ArrowRight' : 'Control+ArrowRight');
await grid.cell.verifyCellActiveSelected({ index: 0, columnHeader: 'City List' });
await grid.cell.verifyCellActiveSelected({ index: 0, columnHeader: 'Cities' });
// Cmd + Right arrow
await page.keyboard.press((await grid.isMacOs()) ? 'Meta+ArrowLeft' : 'Control+ArrowLeft');

8
tests/playwright/tests/db/features/metaLTAR.spec.ts

@ -235,7 +235,7 @@ test.describe.serial('Test table', () => {
await dashboard.treeView.openTable({ title: 'Table3' });
const params = {
index: 0,
columnHeader: 'Table0 List',
columnHeader: 'Table0s',
count: 0,
value: [],
type: 'hm',
@ -283,7 +283,7 @@ test.describe.serial('Test table', () => {
// verify
await dashboard.treeView.openTable({ title: 'Table3' });
await dashboard.grid.column.verify({ title: 'Table0 List', isVisible: false });
await dashboard.grid.column.verify({ title: 'Table0s', isVisible: false });
await dashboard.grid.column.verify({ title: 'TableD:mm:TableE', isVisible: true });
///////////////////////////////////////////////////////////////////////////////////////////////
@ -303,7 +303,7 @@ test.describe.serial('Test table', () => {
await dashboard.grid.column.delete({ title: 'TableA:mm:TableA' });
// verify
await dashboard.grid.column.verify({ title: 'Table0 List', isVisible: false });
await dashboard.grid.column.verify({ title: 'Table0s', isVisible: false });
await dashboard.grid.column.verify({ title: 'TableA:mm:TableA', isVisible: false });
});
@ -316,6 +316,6 @@ test.describe.serial('Test table', () => {
await dashboard.grid.column.verify({ title: 'Table0', isVisible: false });
await dashboard.treeView.openTable({ title: 'Table3' });
await dashboard.grid.column.verify({ title: 'Table0 List', isVisible: false });
await dashboard.grid.column.verify({ title: 'Table0s', isVisible: false });
});
});

4
tests/playwright/tests/db/features/mobileMode.spec.ts

@ -45,7 +45,7 @@ test.describe('Mobile Mode', () => {
// verify form-view fields order
await form.verifyFormViewFieldsOrder({
fields: ['Country', 'LastUpdate', 'City List'],
fields: ['Country', 'LastUpdate', 'Cities'],
});
// reorder & verify
@ -54,7 +54,7 @@ test.describe('Mobile Mode', () => {
destinationField: 'Country',
});
await form.verifyFormViewFieldsOrder({
fields: ['LastUpdate', 'Country', 'City List'],
fields: ['LastUpdate', 'Country', 'Cities'],
});
await dashboard.treeView.openTable({ mobileMode: true, title: 'test-table-for-mobile-mode' });

8
tests/playwright/tests/db/general/cellSelection.spec.ts

@ -50,7 +50,7 @@ test.describe('Verify cell selection', () => {
await dashboard.treeView.openTable({ title: 'Country' });
await grid.selectRange({
start: { index: 0, columnHeader: 'Country' },
end: { index: 2, columnHeader: 'City List' },
end: { index: 2, columnHeader: 'Cities' },
});
expect(await grid.selectedCount()).toBe(9);
await grid.cell.get({ index: 0, columnHeader: 'Country' }).click();
@ -62,7 +62,7 @@ test.describe('Verify cell selection', () => {
await dashboard.treeView.openTable({ title: 'Country' });
await grid.selectRange({
start: { index: 0, columnHeader: 'Country' },
end: { index: 2, columnHeader: 'City List' },
end: { index: 2, columnHeader: 'Cities' },
});
expect(await grid.selectedCount()).toBe(9);
await grid.cell.get({ index: 5, columnHeader: 'Country' }).click();
@ -74,7 +74,7 @@ test.describe('Verify cell selection', () => {
await dashboard.treeView.openTable({ title: 'Country' });
await dashboard.grid.toolbar.fields.toggleShowSystemFields();
await grid.selectRange({
start: { index: 2, columnHeader: 'City List' },
start: { index: 2, columnHeader: 'Cities' },
end: { index: 0, columnHeader: 'Country' },
});
expect(await grid.selectedCount()).toBe(12);
@ -88,7 +88,7 @@ test.describe('Verify cell selection', () => {
await dashboard.treeView.openTable({ title: 'Country' });
await grid.selectRange({
start: { index: 0, columnHeader: 'Country' },
end: { index: 2, columnHeader: 'City List' },
end: { index: 2, columnHeader: 'Cities' },
});
await page.keyboard.press('ArrowRight');
expect(await grid.selectedCount()).toBe(1);

18
tests/playwright/tests/db/views/viewForm.spec.ts

@ -34,7 +34,7 @@ test.describe('Form view', () => {
// verify form-view fields order
await form.verifyFormViewFieldsOrder({
fields: ['Country', 'LastUpdate', 'City List'],
fields: ['Country', 'LastUpdate', 'Cities'],
});
// reorder & verify
@ -43,31 +43,31 @@ test.describe('Form view', () => {
destinationField: 'Country',
});
await form.verifyFormViewFieldsOrder({
fields: ['LastUpdate', 'Country', 'City List'],
fields: ['LastUpdate', 'Country', 'Cities'],
});
// remove & verify (drag-drop)
await form.removeField({ field: 'City List', mode: 'dragDrop' });
await form.removeField({ field: 'Cities', mode: 'dragDrop' });
await form.verifyFormViewFieldsOrder({
fields: ['LastUpdate', 'Country'],
});
// add & verify (drag-drop)
await form.addField({ field: 'City List', mode: 'dragDrop' });
await form.addField({ field: 'Cities', mode: 'dragDrop' });
await form.verifyFormViewFieldsOrder({
fields: ['LastUpdate', 'Country', 'City List'],
fields: ['LastUpdate', 'Country', 'Cities'],
});
// remove & verify (hide field button)
await form.removeField({ field: 'City List', mode: 'hideField' });
await form.removeField({ field: 'Cities', mode: 'hideField' });
await form.verifyFormViewFieldsOrder({
fields: ['LastUpdate', 'Country'],
});
// add & verify (hide field button)
await form.addField({ field: 'City List', mode: 'clickField' });
await form.addField({ field: 'Cities', mode: 'clickField' });
await form.verifyFormViewFieldsOrder({
fields: ['LastUpdate', 'Country', 'City List'],
fields: ['LastUpdate', 'Country', 'Cities'],
});
// remove-all & verify
@ -81,7 +81,7 @@ test.describe('Form view', () => {
await form.addAllFields();
await dashboard.rootPage.waitForTimeout(2000);
await form.verifyFormViewFieldsOrder({
fields: ['LastUpdate', 'Country', 'City List'],
fields: ['LastUpdate', 'Country', 'Cities'],
});
});

2
tests/playwright/tests/db/views/viewFormShareSurvey.spec.ts

@ -65,7 +65,7 @@ test.describe('Share form', () => {
await surveyForm.validate({
heading: 'Country Title',
subHeading: 'Country Form Subtitle',
fieldLabel: 'City List',
fieldLabel: 'Cities',
footer: '3 / 3',
});
await surveyForm.submitButton.click();

16
tests/playwright/tests/db/views/viewGridShare.spec.ts

@ -32,7 +32,7 @@ test.describe('Shared view', () => {
// hide column
await dashboard.grid.toolbar.fields.toggle({ title: 'Address2' });
await dashboard.grid.toolbar.fields.toggle({ title: 'Store List' });
await dashboard.grid.toolbar.fields.toggle({ title: 'Stores' });
// sort
await dashboard.grid.toolbar.sort.add({
@ -73,9 +73,9 @@ test.describe('Shared view', () => {
{ title: 'PostalCode', isVisible: true },
{ title: 'Phone', isVisible: true },
{ title: 'LastUpdate', isVisible: true },
{ title: 'Customer List', isVisible: true },
{ title: 'Staff List', isVisible: true },
{ title: 'Store List', isVisible: false },
{ title: 'Customers', isVisible: true },
{ title: 'Staffs', isVisible: true },
{ title: 'Stores', isVisible: false },
{ title: 'City', isVisible: true },
];
for (const column of expectedColumns) {
@ -281,15 +281,15 @@ const sqliteExpectedRecords2 = [
];
const expectedVirtualRecords = [
{ index: 0, columnHeader: 'Customer List', count: 1, type: 'hm' },
{ index: 1, columnHeader: 'Customer List', count: 1, type: 'hm' },
{ index: 0, columnHeader: 'Customers', count: 1, type: 'hm' },
{ index: 1, columnHeader: 'Customers', count: 1, type: 'hm' },
{ index: 0, columnHeader: 'City', count: 1, type: 'bt', value: ['Kanchrapara'] },
{ index: 1, columnHeader: 'City', count: 1, type: 'bt', value: ['Tafuna'] },
];
const sqliteExpectedVirtualRecords = [
{ index: 0, columnHeader: 'Customer List', count: 1, type: 'hm' },
{ index: 1, columnHeader: 'Customer List', count: 1, type: 'hm' },
{ index: 0, columnHeader: 'Customers', count: 1, type: 'hm' },
{ index: 1, columnHeader: 'Customers', count: 1, type: 'hm' },
{ index: 0, columnHeader: 'City', count: 1, type: 'bt', value: ['Davao'] },
{ index: 1, columnHeader: 'City', count: 1, type: 'bt', value: ['Nagareyama'] },
];

Loading…
Cancel
Save