|
|
@ -81,7 +81,8 @@ export const genTest = (apiType, dbType, testMode) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
before(() => { |
|
|
|
before(() => { |
|
|
|
cy.fileHook(); |
|
|
|
cy.restoreLocalStorage(); |
|
|
|
|
|
|
|
|
|
|
|
if( testMode === 'CY_QUICK') { |
|
|
|
if( testMode === 'CY_QUICK') { |
|
|
|
// cy.task("copyFile")
|
|
|
|
// cy.task("copyFile")
|
|
|
|
loginPage.signIn(roles.owner.credentials); |
|
|
|
loginPage.signIn(roles.owner.credentials); |
|
|
@ -102,7 +103,20 @@ export const genTest = (apiType, dbType, testMode) => { |
|
|
|
cy.restoreLocalStorage(); |
|
|
|
cy.restoreLocalStorage(); |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
after(() => {}); |
|
|
|
// afterEach(() => {
|
|
|
|
|
|
|
|
// cy.saveLocalStorage();
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
after(() => { |
|
|
|
|
|
|
|
// sign out
|
|
|
|
|
|
|
|
cy.visit(`/`); |
|
|
|
|
|
|
|
cy.wait(5000); |
|
|
|
|
|
|
|
cy.get('.nc-menu-accounts').should('exist').click(); |
|
|
|
|
|
|
|
cy.getActiveMenu().find('.ant-dropdown-menu-item').eq(1).click(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cy.wait(5000); |
|
|
|
|
|
|
|
cy.get('button:contains("SIGN")').should('exist') |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it("Verify Schema", () => { |
|
|
|
it("Verify Schema", () => { |
|
|
|
cy.openTableTab("Film", 3) |
|
|
|
cy.openTableTab("Film", 3) |
|
|
@ -221,7 +235,9 @@ export const genTest = (apiType, dbType, testMode) => { |
|
|
|
it("Verify Views & Shared base", () => { |
|
|
|
it("Verify Views & Shared base", () => { |
|
|
|
cy.openTableTab("Film", 3); |
|
|
|
cy.openTableTab("Film", 3); |
|
|
|
mainPage.toggleRightSidebar(); |
|
|
|
mainPage.toggleRightSidebar(); |
|
|
|
cy.get('.nc-form-view-item').eq(0) |
|
|
|
cy.get('.nc-form-view-item:visible') |
|
|
|
|
|
|
|
.should('exist') |
|
|
|
|
|
|
|
.eq(0) |
|
|
|
.click({ force: true }) |
|
|
|
.click({ force: true }) |
|
|
|
|
|
|
|
|
|
|
|
// Header & description should exist
|
|
|
|
// Header & description should exist
|
|
|
@ -345,29 +361,38 @@ export const genTest = (apiType, dbType, testMode) => { |
|
|
|
mainPage.getPagination(">").click(); |
|
|
|
mainPage.getPagination(">").click(); |
|
|
|
mainPage |
|
|
|
mainPage |
|
|
|
.getPagination(2) |
|
|
|
.getPagination(2) |
|
|
|
.should("have.class", "v-pagination__item--active"); |
|
|
|
.should("have.class", "ant-pagination-item-active"); |
|
|
|
|
|
|
|
|
|
|
|
// verify < pagination option
|
|
|
|
// verify < pagination option
|
|
|
|
mainPage.getPagination("<").click(); |
|
|
|
mainPage.getPagination("<").click(); |
|
|
|
mainPage |
|
|
|
mainPage |
|
|
|
.getPagination(1) |
|
|
|
.getPagination(1) |
|
|
|
.should("have.class", "v-pagination__item--active"); |
|
|
|
.should("have.class", "ant-pagination-item-active"); |
|
|
|
|
|
|
|
|
|
|
|
cy.closeTableTab("Actor"); |
|
|
|
cy.closeTableTab("Actor"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it("Verify Fields, Filter & Sort", () => { |
|
|
|
it("Verify Fields, Filter & Sort", () => { |
|
|
|
cy.openTableTab("Actor", 25); |
|
|
|
cy.openTableTab("Actor", 25); |
|
|
|
|
|
|
|
mainPage.toggleRightSidebar(); |
|
|
|
|
|
|
|
|
|
|
|
cy.get(".nc-grid-view-item").eq(1).click() |
|
|
|
cy.get(".nc-grid-view-item").eq(1).click() |
|
|
|
|
|
|
|
|
|
|
|
cy.get(".nc-grid-header-cell").contains('Name').should("be.visible"); |
|
|
|
cy.get(".nc-grid-header").find(`th[data-title="Name"]`).should("be.visible"); |
|
|
|
cy.get(".nc-grid-header-cell").contains('Notes').should("be.visible"); |
|
|
|
cy.get(".nc-grid-header").find(`th[data-title="Notes"]`).should("be.visible"); |
|
|
|
|
|
|
|
cy.get(".nc-grid-header").find(`th[data-title="Attachments"]`).should("not.exist"); |
|
|
|
|
|
|
|
cy.get(".nc-grid-header").find(`th[data-title="Status"]`).should("be.visible"); |
|
|
|
|
|
|
|
cy.get(".nc-grid-header").find(`th[data-title="Film"]`).should("be.visible"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// cy.get(".nc-grid-header").contains('Notes').should("be.visible");
|
|
|
|
// fix me!
|
|
|
|
// fix me!
|
|
|
|
if(testMode !== 'AT_IMPORT') cy.get(".nc-grid-header-cell").contains('Attachments').should("not.be.visible"); |
|
|
|
// if(testMode !== 'AT_IMPORT') cy.get(".nc-grid-header-cell").contains('Attachments').should("not.be.visible");
|
|
|
|
cy.get(".nc-grid-header-cell").contains('Status').should("be.visible"); |
|
|
|
// cy.get(".nc-grid-header-cell").contains('Status').should("be.visible");
|
|
|
|
cy.get(".nc-grid-header-cell").contains('Film').should("be.visible"); |
|
|
|
// cy.get(".nc-grid-header-cell").contains('Film').should("be.visible");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cy.wait(2000); |
|
|
|
|
|
|
|
cy.get(".nc-fields-menu-btn").click() |
|
|
|
|
|
|
|
|
|
|
|
cy.get(".nc-fields-menu-btn").click(); |
|
|
|
|
|
|
|
cy.getActiveMenu().find(`[type="checkbox"]`).eq(0).should('be.checked') |
|
|
|
cy.getActiveMenu().find(`[type="checkbox"]`).eq(0).should('be.checked') |
|
|
|
cy.getActiveMenu().find(`[type="checkbox"]`).eq(1).should('be.checked') |
|
|
|
cy.getActiveMenu().find(`[type="checkbox"]`).eq(1).should('be.checked') |
|
|
|
cy.getActiveMenu().find(`[type="checkbox"]`).eq(2).should('not.be.checked') |
|
|
|
cy.getActiveMenu().find(`[type="checkbox"]`).eq(2).should('not.be.checked') |
|
|
@ -407,15 +432,18 @@ export const genTest = (apiType, dbType, testMode) => { |
|
|
|
if( testMode === 'CY_QUICK') { |
|
|
|
if( testMode === 'CY_QUICK') { |
|
|
|
|
|
|
|
|
|
|
|
cy.openTableTab("Producer", 3) |
|
|
|
cy.openTableTab("Producer", 3) |
|
|
|
|
|
|
|
mainPage.toggleRightSidebar(); |
|
|
|
|
|
|
|
|
|
|
|
cy.get('.nc-grid-view-item').should('have.length', 4) |
|
|
|
cy.get('.nc-grid-view-item').should('have.length', 4) |
|
|
|
cy.get('.nc-form-view-item').should('have.length', 4) |
|
|
|
cy.get('.nc-form-view-item').should('have.length', 4) |
|
|
|
cy.get('.nc-gallery-view-item').should('have.length', 3) |
|
|
|
cy.get('.nc-gallery-view-item').should('have.length', 3) |
|
|
|
|
|
|
|
|
|
|
|
// LinkToAnotherRecord hm relation
|
|
|
|
// LinkToAnotherRecord hm relation
|
|
|
|
mainPage.getCell("FilmRead", 1).scrollIntoView(); |
|
|
|
mainPage.getCell("FilmRead", 1).scrollIntoView(); |
|
|
|
cy.get( |
|
|
|
cy.get('[data-title="FilmRead"] > .h-full > .nc-virtual-cell > .w-full > .chips > .chip > .name') |
|
|
|
':nth-child(1) > [data-col="FilmRead"] > .nc-virtual-cell > .v-lazy > .d-100 > .chips > :nth-child(1) > .v-chip__content > .name' |
|
|
|
// cy.get(
|
|
|
|
) |
|
|
|
// ':nth-child(1) > [data-col="FilmRead"] > .nc-virtual-cell > .v-lazy > .d-100 > .chips > :nth-child(1) > .v-chip__content > .name'
|
|
|
|
|
|
|
|
// )
|
|
|
|
.contains('Movie-1') |
|
|
|
.contains('Movie-1') |
|
|
|
.should("exist"); |
|
|
|
.should("exist"); |
|
|
|
|
|
|
|
|
|
|
|