Browse Source

Merge pull request #3967 from nocodb/test/add-new-row-tooltip

test: ensure add new row tooltip disappears
pull/3975/head
Raju Udava 2 years ago committed by GitHub
parent
commit
67b1ad1f35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      scripts/cypress/integration/common/1b_table_column_operations.js
  2. 2
      scripts/cypress/integration/common/3a_filter_sort_fields_operations.js
  3. 3
      scripts/cypress/integration/common/3e_duration_column.js
  4. 3
      scripts/cypress/integration/common/3f_link_to_another_record.js
  5. 2
      scripts/cypress/integration/common/4f_grid_view_share.js
  6. 2
      scripts/cypress/integration/common/4f_pg_grid_view_share.js
  7. 3
      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")

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

@ -52,7 +52,7 @@ export const genTest = (apiType, dbType) => {
);
// add a row to end of Country table
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

@ -127,8 +127,7 @@ export const genTest = (apiType, dbType) => {
isNewRow = false
) => {
if (isNewRow) {
cy.get(".nc-add-new-row-btn:visible").should("exist");
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")

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

@ -183,8 +183,7 @@ 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();
mainPage.addNewRowExpand("Sheet2");
// Title
cy.get(".nc-expand-col-Title")

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

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

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

@ -428,7 +428,7 @@ export const genTest = (apiType, dbType) => {
it(`Generate default Shared GRID view URL`, () => {
// add row
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/8a_webhook.js

@ -148,8 +148,7 @@ function clearServerData() {
}
function addNewRow(index, cellValue) {
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