Browse Source

(test) cypress: enable csv download verification for different roles

Signed-off-by: Raju Udava <sivadstala@gmail.com>
pull/743/head
Raju Udava 3 years ago
parent
commit
f261b6d066
  1. 11
      scripts/cypress/integration/common/5a_user_role.js
  2. 4
      scripts/cypress/integration/common/6d_language_validation.js
  3. 2
      scripts/cypress/integration/test/restMisc.js

11
scripts/cypress/integration/common/5a_user_role.js

@ -145,6 +145,17 @@ export const genTest = (type, xcdb) => {
//done() //done()
}) })
it(`[${roles[roleType].name}] Download files`, () => {
let storedRecords = [
`City,LastUpdate,City => Address,Country <= City`,
`A Corua (La Corua),2006-02-14T23:15:25.000Z,939 Probolinggo Loop,Spain`,
`Abha,2006-02-14T23:15:25.000Z,733 Mandaluyong Place,Saudi Arabia`,
`Abu Dhabi,2006-02-14T23:15:25.000Z,535 Ahmadnagar Manor,United Arab Emirates`,
`Acua,2006-02-14T23:15:25.000Z,1789 Saint-Denis Parkway,Mexico`
]
mainPage.downloadAndVerifyCsv(`City_exported_1.csv`, storedRecords)
})
// after(() => { // after(() => {
// if ('viewer' == roleType) { // if ('viewer' == roleType) {
// loginPage.loginAndOpenProject('graphql', false) // loginPage.loginAndOpenProject('graphql', false)

4
scripts/cypress/integration/common/6d_language_validation.js

@ -8,8 +8,8 @@ export const genTest = (type, xcdb) => {
describe(`Language support`, () => { describe(`Language support`, () => {
before(() => { before(() => {
loginPage.signIn(roles.owner.credentials) //loginPage.signIn(roles.owner.credentials)
//mainPage.toolBarTopLeft(mainPage.HOME).click() mainPage.toolBarTopLeft(mainPage.HOME).click()
}) })
const langVerification = (idx, lang) => { const langVerification = (idx, lang) => {

2
scripts/cypress/integration/test/restMisc.js

@ -19,8 +19,8 @@ const nocoTestSuite = (type, xcdb) => {
} }
t6b.genTest(type, xcdb) t6b.genTest(type, xcdb)
t6c.genTest(type, xcdb)
t6d.genTest(type, xcdb) t6d.genTest(type, xcdb)
t6c.genTest(type, xcdb)
// **deletes created project, hence place it @ end // **deletes created project, hence place it @ end
t6e.genTest(type, xcdb) t6e.genTest(type, xcdb)
} }

Loading…
Cancel
Save