Browse Source

test: fix iFrame cell validation

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3655/head
Raju Udava 2 years ago
parent
commit
1daba9050b
  1. 33
      scripts/cypress/integration/common/6g_base_share.js

33
scripts/cypress/integration/common/6g_base_share.js

@ -65,15 +65,15 @@ export const genTest = (apiType, dbType) => {
beforeEach(() => {
cy.restoreLocalStorage();
})
});
afterEach(() => {
cy.saveLocalStorage();
})
});
it(`Generate base share URL`, () => {
// click SHARE
cy.get(".nc-share-base:visible").should('exist').click();
cy.get(".nc-share-base:visible").should("exist").click();
// Click on readonly base text
cy.getActiveModal().find(".nc-disable-shared-base").click();
@ -85,8 +85,8 @@ export const genTest = (apiType, dbType) => {
cy.getActiveModal().find(".nc-shared-base-role").click();
cy.getActiveSelection('.nc-dropdown-share-base-role')
.find('.ant-select-item')
cy.getActiveSelection(".nc-dropdown-share-base-role")
.find(".ant-select-item")
.eq(1)
.click();
@ -130,12 +130,12 @@ style="background: transparent; "></iframe>
loginPage.loginAndOpenProject(apiType, dbType);
// click SHARE
cy.get(".nc-share-base:visible").should('exist').click();
cy.get(".nc-share-base:visible").should("exist").click();
cy.getActiveModal().find(".nc-shared-base-role").click();
cy.getActiveSelection('.nc-dropdown-share-base-role')
.find('.ant-select-item')
cy.getActiveSelection(".nc-dropdown-share-base-role")
.find(".ant-select-item")
.eq(0)
.click();
@ -148,7 +148,6 @@ style="background: transparent; "></iframe>
describe(`${apiType.toUpperCase()} iFrame Test`, () => {
// https://docs.cypress.io/api/commands/visit#Prefixes
it("Generate & verify embed HTML IFrame", { baseUrl: null }, () => {
let filePath = "scripts/cypress/fixtures/sampleFiles/iFrame.html";
cy.log(filePath);
cy.visit(filePath, { baseUrl: null });
@ -157,7 +156,9 @@ style="background: transparent; "></iframe>
cy.frameLoaded(".nc-embed");
// cy.openTableTab("Country", 25);
cy.iframe().find(`.nc-project-tree-tbl-Actor`, {timeout: 10000}).should("exist")
cy.iframe()
.find(`.nc-project-tree-tbl-Actor`, { timeout: 10000 })
.should("exist")
.first()
.click({ force: true });
@ -169,11 +170,15 @@ style="background: transparent; "></iframe>
cy.iframe().find(".nc-actions-menu-btn").should("exist");
// validate data (row-1)
cy.iframe().find(`.nc-grid-cell`).eq(1).contains("PENELOPE").should("exist");
cy.iframe().find(`.nc-grid-cell`).eq(2).contains("GUINESS").should("exist");
cy.iframe()
.find(`.nc-grid-cell:eq(1):contains("PENELOPE")`)
.should("exist");
cy.iframe()
.find(`.nc-grid-cell:eq(2):contains("GUINESS")`)
.should("exist");
});
})
}
});
};
/**
* @copyright Copyright (c) 2021, Xgene Cloud Ltd

Loading…
Cancel
Save