|
|
|
@ -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 |
|
|
|
|