Browse Source

tests: close modal in 2b tests

pull/4141/head
braks 2 years ago
parent
commit
eb76e7b22d
  1. 28
      scripts/cypress/integration/common/2b_table_with_m2m_column.js

28
scripts/cypress/integration/common/2b_table_with_m2m_column.js

@ -49,8 +49,7 @@ export const genTest = (apiType, dbType) => {
.getCell("Film List", 1)
.should("exist")
.trigger("mouseover")
.click();
cy.get(".nc-action-icon").eq(0).should("exist").click({ force: true });
.get(".nc-action-icon").eq(0).should("exist").click({ force: true });
// GUI-v2 Kludge:
// validations
@ -70,26 +69,8 @@ export const genTest = (apiType, dbType) => {
cy.getActiveModal(".nc-modal-child-list")
.find("button:contains(Link to 'Film')")
.click()
.then(() => {
// Link record form validation
cy.getActiveModal(".nc-modal-link-record")
.contains("Link record")
.should("exist");
cy.getActiveModal(".nc-modal-link-record")
.find(".nc-reload")
.should("exist");
cy.getActiveModal(".nc-modal-link-record")
.find('button:contains("Add new record")')
.should("exist");
cy.getActiveModal(".nc-modal-link-record")
.find(".ant-card")
.eq(0)
.contains("ACE GOLDFINGER")
.should("exist");
cy.getActiveModal(".nc-modal-link-record")
.find("button.ant-modal-close")
.click();
});
cy.getActiveModal('.nc-modal-link-record').find('.ant-modal-close').click()
});
it("Expand first linked card, validate", () => {
@ -98,8 +79,7 @@ export const genTest = (apiType, dbType) => {
.getCell("Film List", 1)
.should("exist")
.trigger("mouseover")
.click();
cy.get(".nc-action-icon").eq(0).should("exist").click({ force: true });
.get(".nc-action-icon").eq(0).should("exist").click({ force: true });
cy.getActiveModal(".nc-modal-child-list")
.find(".ant-card")

Loading…
Cancel
Save