Browse Source

test: ensure add new row tooltip disappears

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3967/head
Raju Udava 2 years ago
parent
commit
16bea00945
  1. 5
      scripts/cypress/integration/common/1b_table_column_operations.js
  2. 3
      scripts/cypress/integration/common/3a_filter_sort_fields_operations.js
  3. 3
      scripts/cypress/integration/common/3e_duration_column.js
  4. 5
      scripts/cypress/integration/common/3f_link_to_another_record.js
  5. 3
      scripts/cypress/integration/common/4f_grid_view_share.js
  6. 3
      scripts/cypress/integration/common/4f_pg_grid_view_share.js
  7. 5
      scripts/cypress/integration/common/8a_webhook.js
  8. 15
      scripts/cypress/support/page_objects/mainPage.js

5
scripts/cypress/integration/common/1b_table_column_operations.js

@ -8,10 +8,7 @@ export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(apiType, dbType)) return;
function addNewRow(index, cellValue) {
cy.get(".nc-add-new-row-btn:visible").should("exist");
cy.get(".nc-add-new-row-btn").click();
cy.wait(2000);
mainPage.addNewRowExpand("tablex");
// cy.get("#data-table-form-Title > input").first().type(cellValue);
cy.get(".nc-expand-col-Title")

3
scripts/cypress/integration/common/3a_filter_sort_fields_operations.js

@ -52,7 +52,8 @@ export const genTest = (apiType, dbType) => {
);
// add a row to end of Country table
cy.get(".nc-add-new-row-btn").click();
// cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("Country");
cy.get(".nc-expand-col-Country")
.find(".nc-cell > input")
.first()

3
scripts/cypress/integration/common/3e_duration_column.js

@ -128,7 +128,8 @@ export const genTest = (apiType, dbType) => {
) => {
if (isNewRow) {
cy.get(".nc-add-new-row-btn:visible").should("exist");
cy.get(".nc-add-new-row-btn").click();
// cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("DurationTable");
} else {
// mainPage.getRow(index).find(".nc-row-expand-icon").click({ force: true });
cy.get(".nc-row-expand")

5
scripts/cypress/integration/common/3f_link_to_another_record.js

@ -183,8 +183,9 @@ export const genTest = (apiType, dbType) => {
cy.openTableTab("Sheet2", 0);
// Click on `Add new row` button
cy.get(".nc-add-new-row-btn:visible").should("exist");
cy.get(".nc-add-new-row-btn").click();
// cy.get(".nc-add-new-row-btn:visible").should("exist");
// cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("Sheet2");
// Title
cy.get(".nc-expand-col-Title")

3
scripts/cypress/integration/common/4f_grid_view_share.js

@ -401,7 +401,8 @@ export const genTest = (apiType, dbType) => {
it(`Generate default Shared GRID view URL`, () => {
// add row
cy.get(".nc-add-new-row-btn").click();
// cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("Country");
cy.get(".nc-expand-col-Country")
.find(".nc-cell > input")
.should("exist")

3
scripts/cypress/integration/common/4f_pg_grid_view_share.js

@ -428,7 +428,8 @@ export const genTest = (apiType, dbType) => {
it(`Generate default Shared GRID view URL`, () => {
// add row
cy.get(".nc-add-new-row-btn").click();
// cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("Country");
cy.get(".nc-expand-col-Country")
.find(".nc-cell > input")
.should("exist")

5
scripts/cypress/integration/common/8a_webhook.js

@ -148,8 +148,9 @@ function clearServerData() {
}
function addNewRow(index, cellValue) {
cy.get(".nc-add-new-row-btn:visible").should("exist");
cy.get(".nc-add-new-row-btn").click();
// cy.get(".nc-add-new-row-btn:visible").should("exist");
// cy.get(".nc-add-new-row-btn").click();
mainPage.addNewRowExpand("Temp");
cy.get(".nc-expand-col-Title")
.should("exist")

15
scripts/cypress/support/page_objects/mainPage.js

@ -161,6 +161,21 @@ export class _mainPage {
});
};
addNewRowExpand(table) {
cy.get(".nc-add-new-row-btn:visible").should("exist");
cy.get(".nc-add-new-row-btn").click();
// cy.wait(2000);
// cy.get(`.nc-tooltip-content:contains("Add new row")`).should("not.exist");
// 'Add new row' tooltip persists for a while; force click on header to make it disappear
cy.get(
`.nc-drawer-expanded-form .nc-expanded-form-header :contains("${table}")`
)
.should("exist")
.click({ force: true });
}
// addExistingUserToProject = (emailId, role) => {
// cy.get('.v-list-item:contains("Team & Auth")').click();
// cy.get(`tr:contains(${emailId})`)

Loading…
Cancel
Save