Browse Source

test: use intercept for unlink

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3807/head
Raju Udava 2 years ago
parent
commit
9ee43eca55
  1. 1
      scripts/cypress/integration/common/3e_duration_column.js
  2. 7
      scripts/cypress/integration/common/3f_link_to_another_record.js

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

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

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

@ -94,6 +94,11 @@ export const genTest = (apiType, dbType) => {
// Unlink LTAR cell // Unlink LTAR cell
// //
function ltarUnlink(columnName, index) { function ltarUnlink(columnName, index) {
// http://localhost:8080/api/v1/db/meta/audits/comments/count?ids[]=1&fk_model_id=md_f4y7jp89pe8vkt
cy.intercept("GET", `/api/v1/db/meta/audits/comments/count?**`).as(
"unlinkCount"
);
// Click on cell to enable unlink icon // Click on cell to enable unlink icon
cy.get(`:nth-child(${index}) > [data-title="${columnName}"]`) cy.get(`:nth-child(${index}) > [data-title="${columnName}"]`)
.last() .last()
@ -107,7 +112,7 @@ export const genTest = (apiType, dbType) => {
.click(); .click();
// Glitch; hence wait // Glitch; hence wait
cy.wait(1000); cy.wait("@unlinkCount");
} }
// before(() => { // before(() => {

Loading…
Cancel
Save