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 // Expanded form insert
await dashboard.toolbar.clickAddNewRow(); await dashboard.grid.toolbar.clickAddNewRow();
await dashboard.expandedForm.fillField({ await dashboard.expandedForm.fillField({
columnTitle: "Title", columnTitle: "Title",
value: "2a", 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.showAnotherFormRadioButton.click();
await dashboard.form.showAnotherFormAfter5SecRadioButton.click(); await dashboard.form.showAnotherFormAfter5SecRadioButton.click();
await dashboard.toolbar.clickShareView(); await dashboard.form.toolbar.clickShareView();
await dashboard.toolbar.shareView.toggleSurveyMode(); 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.waitForTimeout(2000);
await dashboard.rootPage.goto(surveyLink); await dashboard.rootPage.goto(surveyLink);
await dashboard.rootPage.waitForTimeout(2000); 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.closeTab({ title: "Team & Auth" });
await dashboard.treeView.openTable({ title: "Country" }); await dashboard.treeView.openTable({ title: "Country" });
await dashboard.toolbar.viewsMenu.verifyCollaborativeMode(); await dashboard.grid.toolbar.viewsMenu.verifyCollaborativeMode();
// enable view lock // enable view lock
await dashboard.toolbar.viewsMenu.click({ await dashboard.grid.toolbar.viewsMenu.click({
menu: "Collaborative View", menu: "Collaborative View",
subMenu: "Locked View", subMenu: "Locked View",
}); });
// verify view lock // verify view lock
await dashboard.toolbar.viewsMenu.verifyLockMode(); await dashboard.grid.toolbar.viewsMenu.verifyLockMode();
// enable collaborative view // enable collaborative view
await dashboard.toolbar.viewsMenu.click({ await dashboard.grid.toolbar.viewsMenu.click({
menu: "Locked View", menu: "Locked View",
subMenu: "Collaborative 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" }); await dashboard.treeView.openTable({ title: "Address" });
// hide column // hide column
await dashboard.toolbar.fields.toggle({ title: "Address2" }); await dashboard.grid.toolbar.fields.toggle({ title: "Address2" });
// sort // sort
await dashboard.toolbar.sort.addSort({ await dashboard.grid.toolbar.sort.addSort({
columnTitle: "District", columnTitle: "District",
isAscending: false, isAscending: false,
}); });
// filter // filter
await dashboard.toolbar.filter.addNew({ await dashboard.grid.toolbar.filter.addNew({
columnTitle: "Address", columnTitle: "Address",
value: "Ab", value: "Ab",
opType: "is like", opType: "is like",
@ -47,8 +47,8 @@ test.describe("Shared view", () => {
mainPageLink = page.url(); mainPageLink = page.url();
// share with password disabled, download enabled // share with password disabled, download enabled
await dashboard.toolbar.clickShareView(); await dashboard.grid.toolbar.clickShareView();
sharedLink = await dashboard.toolbar.shareView.getShareLink(); sharedLink = await dashboard.grid.toolbar.shareView.getShareLink();
/** /**
* 2. Access shared view: verify * 2. Access shared view: verify
@ -182,13 +182,13 @@ test.describe("Shared view", () => {
await dashboard.treeView.openTable({ title: "Country" }); await dashboard.treeView.openTable({ title: "Country" });
// enable password & verify share link // enable password & verify share link
await dashboard.toolbar.clickShareView(); await dashboard.grid.toolbar.clickShareView();
await dashboard.toolbar.shareView.enablePassword("p@ssword"); await dashboard.grid.toolbar.shareView.enablePassword("p@ssword");
// disable download // disable download
await dashboard.toolbar.shareView.toggleDownload(); await dashboard.grid.toolbar.shareView.toggleDownload();
sharedLink = await dashboard.toolbar.shareView.getShareLink(); sharedLink = await dashboard.grid.toolbar.shareView.getShareLink();
await dashboard.toolbar.shareView.close(); await dashboard.grid.toolbar.shareView.close();
// add new column, record after share view creation // add new column, record after share view creation
await dashboard.grid.column.create({ await dashboard.grid.column.create({

Loading…
Cancel
Save