Browse Source

feat(testing): Integrated toolbar changes

pull/3848/head
Muhammed Mustafa 2 years ago
parent
commit
a508ab8160
  1. 2
      scripts/playwright/tests/linkToAnotherRecord.spec.ts
  2. 6
      scripts/playwright/tests/viewFormShareSurvey.spec.ts
  3. 10
      scripts/playwright/tests/viewGridLocked.spec.ts
  4. 20
      scripts/playwright/tests/viewGridShare.spec.ts

2
scripts/playwright/tests/linkToAnotherRecord.spec.ts

@ -53,7 +53,7 @@ test.describe("LTAR create & update", () => {
// Expanded form insert
await dashboard.toolbar.clickAddNewRow();
await dashboard.grid.toolbar.clickAddNewRow();
await dashboard.expandedForm.fillField({
columnTitle: "Title",
value: "2a",

6
scripts/playwright/tests/viewFormShareSurvey.spec.ts

@ -30,10 +30,10 @@ test.describe("Share form", () => {
});
await dashboard.form.showAnotherFormRadioButton.click();
await dashboard.form.showAnotherFormAfter5SecRadioButton.click();
await dashboard.toolbar.clickShareView();
await dashboard.toolbar.shareView.toggleSurveyMode();
await dashboard.form.toolbar.clickShareView();
await dashboard.form.toolbar.shareView.toggleSurveyMode();
const surveyLink = await dashboard.toolbar.shareView.getShareLink();
const surveyLink = await dashboard.form.toolbar.shareView.getShareLink();
await dashboard.rootPage.waitForTimeout(2000);
await dashboard.rootPage.goto(surveyLink);
await dashboard.rootPage.waitForTimeout(2000);

10
scripts/playwright/tests/viewGridLocked.spec.ts

@ -16,23 +16,23 @@ test.describe("Grid view locked", () => {
await dashboard.closeTab({ title: "Team & Auth" });
await dashboard.treeView.openTable({ title: "Country" });
await dashboard.toolbar.viewsMenu.verifyCollaborativeMode();
await dashboard.grid.toolbar.viewsMenu.verifyCollaborativeMode();
// enable view lock
await dashboard.toolbar.viewsMenu.click({
await dashboard.grid.toolbar.viewsMenu.click({
menu: "Collaborative View",
subMenu: "Locked View",
});
// verify view lock
await dashboard.toolbar.viewsMenu.verifyLockMode();
await dashboard.grid.toolbar.viewsMenu.verifyLockMode();
// enable collaborative view
await dashboard.toolbar.viewsMenu.click({
await dashboard.grid.toolbar.viewsMenu.click({
menu: "Locked View",
subMenu: "Collaborative View",
});
await dashboard.toolbar.viewsMenu.verifyCollaborativeMode();
await dashboard.grid.toolbar.viewsMenu.verifyCollaborativeMode();
});
});

20
scripts/playwright/tests/viewGridShare.spec.ts

@ -31,14 +31,14 @@ test.describe("Shared view", () => {
await dashboard.treeView.openTable({ title: "Address" });
// hide column
await dashboard.toolbar.fields.toggle({ title: "Address2" });
await dashboard.grid.toolbar.fields.toggle({ title: "Address2" });
// sort
await dashboard.toolbar.sort.addSort({
await dashboard.grid.toolbar.sort.addSort({
columnTitle: "District",
isAscending: false,
});
// filter
await dashboard.toolbar.filter.addNew({
await dashboard.grid.toolbar.filter.addNew({
columnTitle: "Address",
value: "Ab",
opType: "is like",
@ -47,8 +47,8 @@ test.describe("Shared view", () => {
mainPageLink = page.url();
// share with password disabled, download enabled
await dashboard.toolbar.clickShareView();
sharedLink = await dashboard.toolbar.shareView.getShareLink();
await dashboard.grid.toolbar.clickShareView();
sharedLink = await dashboard.grid.toolbar.shareView.getShareLink();
/**
* 2. Access shared view: verify
@ -182,13 +182,13 @@ test.describe("Shared view", () => {
await dashboard.treeView.openTable({ title: "Country" });
// enable password & verify share link
await dashboard.toolbar.clickShareView();
await dashboard.toolbar.shareView.enablePassword("p@ssword");
await dashboard.grid.toolbar.clickShareView();
await dashboard.grid.toolbar.shareView.enablePassword("p@ssword");
// disable download
await dashboard.toolbar.shareView.toggleDownload();
await dashboard.grid.toolbar.shareView.toggleDownload();
sharedLink = await dashboard.toolbar.shareView.getShareLink();
await dashboard.toolbar.shareView.close();
sharedLink = await dashboard.grid.toolbar.shareView.getShareLink();
await dashboard.grid.toolbar.shareView.close();
// add new column, record after share view creation
await dashboard.grid.column.create({

Loading…
Cancel
Save