|
|
@ -2,7 +2,7 @@ import { loginPage } from "../../support/page_objects/navigation" |
|
|
|
import { isTestSuiteActive } from "../../support/page_objects/projectConstants" |
|
|
|
import { isTestSuiteActive } from "../../support/page_objects/projectConstants" |
|
|
|
import { mainPage } from "../../support/page_objects/mainPage" |
|
|
|
import { mainPage } from "../../support/page_objects/mainPage" |
|
|
|
|
|
|
|
|
|
|
|
let baseURL = '' |
|
|
|
let storedURL = '' |
|
|
|
|
|
|
|
|
|
|
|
// 0: all enabled
|
|
|
|
// 0: all enabled
|
|
|
|
// 1: field hide
|
|
|
|
// 1: field hide
|
|
|
@ -31,7 +31,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
.then(($obj) => { |
|
|
|
.then(($obj) => { |
|
|
|
cy.get('body').type('{esc}') |
|
|
|
cy.get('body').type('{esc}') |
|
|
|
// viewURL.push($obj.text())
|
|
|
|
// viewURL.push($obj.text())
|
|
|
|
viewURL[viewName] = $obj.text() |
|
|
|
viewURL[viewName] = $obj.text().trim() |
|
|
|
cy.wait(1000) |
|
|
|
cy.wait(1000) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}
|
|
|
|
}
|
|
|
@ -88,7 +88,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
|
|
|
|
|
|
|
|
// store base URL- to re-visit and delete form view later
|
|
|
|
// store base URL- to re-visit and delete form view later
|
|
|
|
cy.url().then((url) => { |
|
|
|
cy.url().then((url) => { |
|
|
|
baseURL = url |
|
|
|
storedURL = url |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
@ -127,7 +127,9 @@ export const genTest = (type, xcdb) => { |
|
|
|
|
|
|
|
|
|
|
|
it(`Share ${viewType.toUpperCase()} view : Visit URL, Verify title`, () => { |
|
|
|
it(`Share ${viewType.toUpperCase()} view : Visit URL, Verify title`, () => { |
|
|
|
// visit public view
|
|
|
|
// visit public view
|
|
|
|
cy.visit(viewURL['combined']) |
|
|
|
cy.visit(viewURL['combined'], { |
|
|
|
|
|
|
|
baseUrl: null |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// wait for public view page to load!
|
|
|
|
// wait for public view page to load!
|
|
|
|
cy.wait(5000) |
|
|
|
cy.wait(5000) |
|
|
@ -374,7 +376,9 @@ export const genTest = (type, xcdb) => { |
|
|
|
|
|
|
|
|
|
|
|
it(`Delete ${viewType.toUpperCase()} view`, () => { |
|
|
|
it(`Delete ${viewType.toUpperCase()} view`, () => { |
|
|
|
// go back to base page
|
|
|
|
// go back to base page
|
|
|
|
cy.visit(baseURL) |
|
|
|
cy.visit(storedURL, { |
|
|
|
|
|
|
|
baseUrl: null |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// number of view entries should be 2 before we delete
|
|
|
|
// number of view entries should be 2 before we delete
|
|
|
|
cy.get('.nc-view-item').its('length').should('eq', 2) |
|
|
|
cy.get('.nc-view-item').its('length').should('eq', 2) |
|
|
@ -483,7 +487,7 @@ export const genTest = (type, xcdb) => { |
|
|
|
cy.saveLocalStorage() |
|
|
|
cy.saveLocalStorage() |
|
|
|
// store base URL- to re-visit and delete form view later
|
|
|
|
// store base URL- to re-visit and delete form view later
|
|
|
|
cy.url().then((url) => { |
|
|
|
cy.url().then((url) => { |
|
|
|
baseURL = url |
|
|
|
storedURL = url |
|
|
|
generateViewLink('rowColUpdate') |
|
|
|
generateViewLink('rowColUpdate') |
|
|
|
})
|
|
|
|
})
|
|
|
|
}) |
|
|
|
}) |
|
|
@ -491,7 +495,9 @@ export const genTest = (type, xcdb) => { |
|
|
|
after(() => { |
|
|
|
after(() => { |
|
|
|
// close table
|
|
|
|
// close table
|
|
|
|
cy.restoreLocalStorage(); |
|
|
|
cy.restoreLocalStorage(); |
|
|
|
cy.visit(baseURL) |
|
|
|
cy.visit(storedURL, { |
|
|
|
|
|
|
|
baseUrl: null |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// delete row
|
|
|
|
// delete row
|
|
|
|
mainPage.getPagination(5).click() |
|
|
|
mainPage.getPagination(5).click() |
|
|
@ -527,7 +533,9 @@ export const genTest = (type, xcdb) => { |
|
|
|
// visit public view
|
|
|
|
// visit public view
|
|
|
|
cy.log(viewURL['rowColUpdate']) |
|
|
|
cy.log(viewURL['rowColUpdate']) |
|
|
|
cy.restoreLocalStorage(); |
|
|
|
cy.restoreLocalStorage(); |
|
|
|
cy.visit(viewURL['rowColUpdate']) //5
|
|
|
|
cy.visit(viewURL['rowColUpdate'], { |
|
|
|
|
|
|
|
baseUrl: null |
|
|
|
|
|
|
|
}) //5
|
|
|
|
// wait for public view page to load!
|
|
|
|
// wait for public view page to load!
|
|
|
|
cy.wait(5000) |
|
|
|
cy.wait(5000) |
|
|
|
}) |
|
|
|
}) |
|
|
|