Browse Source

[test] cypress: grid view extended test cases (virtual column/ row-col updates/ password protection)

Signed-off-by: Raju Udava <sivadstala@gmail.com>
pull/679/head
Raju Udava 3 years ago
parent
commit
d45ed3260d
  1. 140
      cypress/integration/common/4b_table_view_share.js
  2. 491
      cypress/integration/common/4f_grid_view_share.js
  3. 4
      cypress/integration/test/masterSuite.js
  4. 22
      cypress/support/page_objects/mainPage.js

140
cypress/integration/common/4b_table_view_share.js

@ -1,121 +1,93 @@
import { mainPage } from "../../support/page_objects/mainPage"
import { loginPage } from "../../support/page_objects/navigation"
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"
const shareViewWithPwd = (pwdCorrect, pwd) => {
let baseURL = ''
let linkText = ''
cy.get('.v-navigation-drawer__content > .container')
.find('.v-list > .v-list-item')
.contains('Share View')
.click()
// No password- unprotected link
if(''==pwd) {
// copy link text, visit URL
cy.getActiveModal().find('.share-link-box')
.contains('http', {timeout: 10000})
.then(($obj) => {
let linkText = $obj.text()
cy.log(linkText)
cy.visit(linkText)
// wait for share view page to load!
cy.wait(5000)
cy.get('body').find('.v-dialog.v-dialog--active').should('not.exist')
})
const generateLinkWithPwd = () => {
// password protected link
} else {
// enable checkbox & feed pwd, save
cy.getActiveModal().find('[role="switch"][type="checkbox"]').click( {force: true} )
cy.getActiveModal().find('input[type="password"]').type('123456')
cy.getActiveModal().find('button:contains("Save password")').click()
// copy link text, visit URL
cy.getActiveModal().find('.share-link-box')
.then(($obj) => {
let linkText = $obj.text()
cy.log(linkText)
cy.visit(linkText)
// wait for share view page to load!
cy.wait(5000)
// feed password
cy.getActiveModal().find('input[type="password"]').type(pwd)
cy.getActiveModal().find('button:contains("Unlock")').click()
cy.wait(1000)
// if pwd is incorrect, active modal requesting to feed in password again
// will remain
if(pwdCorrect) {
cy.get('body').find('.v-dialog.v-dialog--active').should('not.exist')
}
else {
cy.get('body').find('.v-dialog.v-dialog--active').should('exist')
}
})
}
}
// delete created views
//
const deleteCreatedViews = () => {
cy.get('.v-navigation-drawer__content > .container')
.find('.v-list > .v-list-item')
.contains('Share View')
.parent().find('button.mdi-dots-vertical').click()
.click()
// wait, as URL initially will be /undefined
cy.wait(500)
cy.getActiveMenu().find('.v-list-item').contains('Views List').click()
// enable checkbox & feed pwd, save
cy.getActiveModal().find('[role="switch"][type="checkbox"]').click( {force: true} )
cy.getActiveModal().find('input[type="password"]').type('123456')
cy.getActiveModal().find('button:contains("Save password")').click()
cy.get(1000)
// copy link text, visit URL
cy.getActiveModal().find('.share-link-box')
.then(($obj) => {
cy.get('th:contains("View Link")').parent().parent()
.next().find('tr').each((tableRow) => {
cy.wrap(tableRow).find('button').last().click()
cy.wait(1000)
linkText = $obj.text()
cy.log(linkText)
})
}
export const genTest = (type, xcdb) => {
if(!isTestSuiteActive(type, xcdb)) return;
describe(`${type.toUpperCase()} api - Clipboard access`, () => {
describe(`${type.toUpperCase()} api - Shared VIEWs (GRID)`, () => {
// Run once before test- create project (rest/graphql)
//
before(() => {
cy.openTableTab('City')
// store base URL- to re-visit and delete form view later
cy.url().then((url) => {
baseURL = url
})
generateLinkWithPwd()
})
beforeEach(() => {
// loginPage.loginAndOpenProject(type)
cy.openTableTab('City');
cy.restoreLocalStorage();
})
it('Share view without password', () => {
shareViewWithPwd(true, '')
afterEach(() => {
cy.saveLocalStorage();
})
it('Share view with correct password', () => {
shareViewWithPwd(true, '123456')
cy.visit(linkText)
// wait for share view page to load!
cy.wait(1000)
// feed password
cy.getActiveModal().find('input[type="password"]').type('123456')
cy.getActiveModal().find('button:contains("Unlock")').click()
cy.wait(1000)
// if pwd is incorrect, active modal requesting to feed in password again will persist
cy.get('body').find('.v-dialog.v-dialog--active').should('not.exist')
})
it('Share view with incorrect password', () => {
shareViewWithPwd(false, 'abc')
cy.visit(linkText)
// wait for share view page to load!
cy.wait(1000)
// feed password
cy.getActiveModal().find('input[type="password"]').type('abc')
cy.getActiveModal().find('button:contains("Unlock")').click()
cy.wait(1000)
// if pwd is incorrect, active modal requesting to feed in password again will persist
cy.get('body').find('.v-dialog.v-dialog--active').should('exist')
})
it('Delete view', deleteCreatedViews )
it('Delete view', () => {
cy.visit(baseURL)
mainPage.deleteCreatedViews()
})
after(() => {
cy.get('[href="#table||db||City"]').find('button.mdi-close').click()
})
// // clean up
// after( () => {
// loginPage.signIn({ username: 'user@nocodb.com', password: 'Password123.' })
// projectsPage.deleteProject(projectName)
// })
})
})
}

491
cypress/integration/common/4f_grid_view_share.js

@ -3,39 +3,19 @@ import { isTestSuiteActive } from "../../support/page_objects/projectConstants"
import { mainPage } from "../../support/page_objects/mainPage"
let baseURL = ''
let viewURL = []
export const genTest = (type, xcdb) => {
if(!isTestSuiteActive(type, xcdb)) return;
describe(`${type.toUpperCase()} api - Table views`, () => {
const name = 'Test' + Date.now();
// Run once before test- create project (rest/graphql)
//
before(() => {
// loginPage.loginAndOpenProject(type)
// open a table to work on views
//
cy.openTableTab('Country');
})
// 0: all enabled
// 1: field hide
// 2: field sort
// 3: field filter
// 4: default (address table): for view operation validation
// 5: default (country table): for update row/column validation
let viewURL = {}
beforeEach(() => {
cy.restoreLocalStorage();
})
export const genTest = (type, xcdb) => {
if(!isTestSuiteActive(type, xcdb)) return;
afterEach(() => {
cy.saveLocalStorage();
})
after(() => {
// close table
cy.get('[href="#table||db||Country"]').find('button.mdi-close').click()
})
const generateViewLink = () => {
const generateViewLink = (viewName) => {
// click on share view
cy.get('.v-navigation-drawer__content > .container')
.find('.v-list > .v-list-item')
@ -43,197 +23,364 @@ export const genTest = (type, xcdb) => {
.click()
// wait, as URL initially will be /undefined
cy.wait(500)
cy.wait(1000)
// copy link text, visit URL
cy.getActiveModal().find('.share-link-box')
.contains('/nc/view/', {timeout: 10000})
.then(($obj) => {
cy.get('body').type('{esc}')
viewURL.push($obj.text())
// viewURL.push($obj.text())
viewURL[viewName] = $obj.text()
cy.wait(1000)
})
}
}
describe(`${type.toUpperCase()} api - GRID VIEW`, () => {
// Run once before test- create project (rest/graphql)
//
before(() => {
// open a table to work on views
//
cy.openTableTab('Country');
cy.saveLocalStorage()
})
// Common routine to create/edit/delete GRID & GALLERY view
// Input: viewType - 'grid'/'gallery'
//
const viewTest = (viewType) => {
beforeEach(() => {
cy.restoreLocalStorage();
})
afterEach(() => {
cy.saveLocalStorage();
})
it(`Create ${viewType} view`, () => {
// create a normal public view
cy.get(`.nc-create-${viewType}-view`).click();
cy.getActiveModal().find('button:contains(Submit)').click()
cy.wait(1000)
after(() => {
// close table
// mainPage.deleteCreatedViews()
cy.get('[href="#table||db||Country"]').find('button.mdi-close').click()
})
// Common routine to create/edit/delete GRID & GALLERY view
// Input: viewType - 'grid'/'gallery'
//
const viewTest = (viewType) => {
it(`Create ${viewType} view`, () => {
// create a normal public view
cy.get(`.nc-create-${viewType}-view`).click();
cy.getActiveModal().find('button:contains(Submit)').click()
cy.wait(1000)
// create view for fields verification
cy.get(`.nc-create-${viewType}-view`).click();
cy.getActiveModal().find('button:contains(Submit)').click()
cy.wait(1000)
// create view for Sort verification
cy.get(`.nc-create-${viewType}-view`).click();
cy.getActiveModal().find('button:contains(Submit)').click()
cy.wait(1000)
// create view for Filter verification
cy.get(`.nc-create-${viewType}-view`).click();
cy.getActiveModal().find('button:contains(Submit)').click()
cy.wait(1000)
// store base URL- to re-visit and delete form view later
cy.url().then((url) => {
baseURL = url
})
})
// create view for fields verification
cy.get(`.nc-create-${viewType}-view`).click();
cy.getActiveModal().find('button:contains(Submit)').click()
cy.wait(1000)
it(`Share ${viewType} view generate URL with all fields enabled`, () => {
cy.get(`.nc-view-item.nc-${viewType}-view-item`).contains('Country1').click()
generateViewLink('default')
cy.log(viewURL['default'])
})
it(`Share ${viewType} view generate URL with a field hidden`, () => {
cy.get(`.nc-view-item.nc-${viewType}-view-item`).contains('Country2').click()
mainPage.hideUnhideField('LastUpdate')
generateViewLink('hide')
})
it(`Share ${viewType} view generate URL with a field sorted`, () => {
cy.get(`.nc-view-item.nc-${viewType}-view-item`).contains('Country3').click()
mainPage.sortField('Country', 'Z -> A')
generateViewLink('sort')
})
it(`Share ${viewType} view generate URL with a field filtered`, () => {
cy.get(`.nc-view-item.nc-${viewType}-view-item`).contains('Country4').click()
mainPage.filterField('Country', 'is equal', 'India')
generateViewLink('filter')
})
it(`Share ${viewType} view : Access URL with a field hidden`, () => {
// visit public view
cy.visit(viewURL['hide'])
// wait for public view page to load!
cy.wait(5000)
// verify column headers
cy.get('[data-col="Country"]').should('exist')
cy.get('[data-col="LastUpdate"]').should('not.exist')
cy.get('[data-col="Country => City"]').should('exist')
// country column content verification before sort
mainPage.getCell("Country", 1).contains("Afghanistan").should('exist')
mainPage.getCell("Country", 2).contains("Algeria").should('exist')
mainPage.getCell("Country", 3).contains("American Samoa").should('exist')
})
// create view for Sort verification
cy.get(`.nc-create-${viewType}-view`).click();
cy.getActiveModal().find('button:contains(Submit)').click()
cy.wait(1000)
it.skip(`Share ${viewType} view : Access URL with a field sorted`, () => {
// visit public view
cy.visit(viewURL['sort'])
// wait for public view page to load!
cy.wait(5000)
// verify column headers
cy.get('[data-col="Country"]').should('exist')
cy.get('[data-col="LastUpdate"]').should('exist')
cy.get('[data-col="Country => City"]').should('exist')
// country column content verification before sort
mainPage.getCell("Country", 1).contains("Zambia").should('exist')
})
// create view for Filter verification
cy.get(`.nc-create-${viewType}-view`).click();
cy.getActiveModal().find('button:contains(Submit)').click()
cy.wait(1000)
it(`Share ${viewType} view : Access URL with a field filtered`, () => {
// visit public view
cy.visit(viewURL['filter'])
// wait for public view page to load!
cy.wait(5000)
// store base URL- to re-visit and delete form view later
cy.url().then((url) => {
baseURL = url
// verify column headers
cy.get('[data-col="Country"]').should('exist')
cy.get('[data-col="LastUpdate"]').should('exist')
cy.get('[data-col="Country => City"]').should('exist')
// country column content verification before sort
mainPage.getCell("Country", 1).contains("India").should('exist')
})
it(`Share ${viewType} view : Access URL with all fields enabled`, () => {
// visit public view
cy.visit(viewURL['default'])
// wait for public view page to load!
cy.wait(5000)
// verify column headers
cy.get('[data-col="Country"]').should('exist')
cy.get('[data-col="LastUpdate"]').should('exist')
cy.get('[data-col="Country => City"]').should('exist')
// country column content verification before sort
mainPage.getCell("Country", 1).contains("Afghanistan").should('exist')
mainPage.getCell("Country", 2).contains("Algeria").should('exist')
mainPage.getCell("Country", 3).contains("American Samoa").should('exist')
})
})
it(`Share ${viewType} view generate URL with all fields enabled`, () => {
cy.get(`.nc-view-item.nc-${viewType}-view-item`).contains('Country1').click()
generateViewLink()
cy.log(viewURL)
})
it(`Share ${viewType} view : Enable sort`, () => {
// Sort menu operations (Country Column, Z->A)
mainPage.sortField('Country', 'Z -> A')
mainPage.getCell("Country", 1).contains("Zambia").should('exist')
})
it(`Share ${viewType} view generate URL with a field hidden`, () => {
cy.get(`.nc-view-item.nc-${viewType}-view-item`).contains('Country2').click()
mainPage.hideUnhideField('LastUpdate')
generateViewLink()
})
it(`Share ${viewType} view : Disable sort`, () => {
// remove sort and validate
mainPage.clearSort()
mainPage.getCell("Country", 1).contains("Afghanistan").should('exist')
})
it(`Share ${viewType} view generate URL with a field sorted`, () => {
cy.get(`.nc-view-item.nc-${viewType}-view-item`).contains('Country3').click()
mainPage.sortField('Country', 'Z -> A')
generateViewLink()
})
it(`Share ${viewType} view : Create Filter`, () => {
// add filter & validate
mainPage.filterField('Country', 'is equal', 'India')
cy.wait(1000)
mainPage.getCell("Country", 1).contains("India").should('exist')
})
it(`Share ${viewType} view generate URL with a field filtered`, () => {
cy.get(`.nc-view-item.nc-${viewType}-view-item`).contains('Country4').click()
mainPage.filterField('Country', 'is equal', 'India')
generateViewLink()
it(`Share ${viewType} view : Delete Filter`, () => {
// Remove sort and Validate
mainPage.filterReset()
mainPage.getCell("Country", 1).contains("Afghanistan").should('exist')
})
})
it(`Delete ${viewType} view`, () => {
// go back to base page
cy.visit(baseURL)
it(`Share ${viewType} view : Access URL with a field hidden`, () => {
// visit public view
cy.visit(viewURL[1])
// number of view entries should be 2 before we delete
cy.get('.nc-view-item').its('length').should('eq', 5)
// click on delete icon (becomes visible on hovering mouse)
cy.get('.nc-view-delete-icon').eq(3).click({ force: true })
cy.wait(1000)
cy.get('.nc-view-delete-icon').eq(2).click({ force: true })
cy.wait(1000)
cy.get('.nc-view-delete-icon').eq(1).click({ force: true })
cy.wait(1000)
cy.get('.nc-view-delete-icon').eq(0).click({ force: true })
cy.wait(1000)
// confirm if the number of veiw entries is reduced by 1
cy.get('.nc-view-item').its('length').should('eq', 1)
})
}
// below scenario's will be invoked twice, once for rest & then for graphql
viewTest('grid')
})
// wait for public view page to load!
cy.wait(5000)
describe(`${type.toUpperCase()} api - Grid view/ Virtual column verification`, () => {
// verify column headers
cy.get('[data-col="Country"]').should('exist')
cy.get('[data-col="LastUpdate"]').should('not.exist')
cy.get('[data-col="Country => City"]').should('exist')
// country column content verification before sort
mainPage.getCell("Country", 1).contains("Afghanistan").should('exist')
mainPage.getCell("Country", 2).contains("Algeria").should('exist')
mainPage.getCell("Country", 3).contains("American Samoa").should('exist')
before(() => {
// Address table has belongs to, has many & many-to-many
cy.openTableTab('Address');
cy.saveLocalStorage()
// store base URL- to re-visit and delete form view later
cy.url().then((url) => {
baseURL = url
generateViewLink('virtualColumn')
})
})
it(`Share ${viewType} view : Access URL with a field sorted`, () => {
// visit public view
cy.visit(viewURL[2])
// wait for public view page to load!
cy.wait(5000)
// verify column headers
cy.get('[data-col="Country"]').should('exist')
cy.get('[data-col="LastUpdate"]').should('exist')
cy.get('[data-col="Country => City"]').should('exist')
beforeEach(() => {
cy.restoreLocalStorage();
})
// country column content verification before sort
mainPage.getCell("Country", 1).contains("Zambia").should('exist')
afterEach(() => {
cy.saveLocalStorage();
})
it(`Share ${viewType} view : Access URL with a field filtered`, () => {
// visit public view
cy.visit(viewURL[3])
// wait for public view page to load!
cy.wait(5000)
// verify column headers
cy.get('[data-col="Country"]').should('exist')
cy.get('[data-col="LastUpdate"]').should('exist')
cy.get('[data-col="Country => City"]').should('exist')
// country column content verification before sort
mainPage.getCell("Country", 1).contains("India").should('exist')
})
after(() => {
// close table
cy.visit(baseURL)
mainPage.deleteCreatedViews()
cy.get('[href="#table||db||Address"]').find('button.mdi-close').click()
})
it(`Share ${viewType} view : Access URL with all fields enabled`, () => {
it(`Generate default Shared GRID view URL`, () => {
// visit public view
cy.visit(viewURL[0])
cy.visit(viewURL['virtualColumn'])
// wait for public view page to load!
cy.wait(5000)
})
it(`Share GRID view : Virtual column validation > has many`, () => {
// verify column headers
cy.get('[data-col="Country"]').should('exist')
cy.get('[data-col="LastUpdate"]').should('exist')
cy.get('[data-col="Country => City"]').should('exist')
// country column content verification before sort
mainPage.getCell("Country", 1).contains("Afghanistan").should('exist')
mainPage.getCell("Country", 2).contains("Algeria").should('exist')
mainPage.getCell("Country", 3).contains("American Samoa").should('exist')
cy.get('[data-col="Address => Customer"]').should('exist')
cy.get('[data-col="Address => Staff"]').should('exist')
cy.get('[data-col="City <= Address"]').should('exist')
cy.get('[data-col="Address <=> Staff"]').should('exist')
// has many field validation
mainPage.getCell("Address => Staff", 3).click().find('button.mdi-close-thick').should('not.exist')
mainPage.getCell("Address => Staff", 3).click().find('button.mdi-plus').should('not.exist')
mainPage.getCell("Address => Staff", 3).click().find('button.mdi-arrow-expand').click()
cy.getActiveModal().find('button.mdi-reload').should('exist')
cy.getActiveModal().find('button').contains('Link to').should('not.exist')
cy.getActiveModal().find('.child-card').contains('Mike').should('exist')
cy.getActiveModal().find('.child-card').find('button').should('not.exist')
cy.get('body').type('{esc}')
})
it(`Share ${viewType} view : Enable sort`, () => {
// Sort menu operations (Country Column, Z->A)
mainPage.sortField('Country', 'Z -> A')
mainPage.getCell("Country", 1).contains("Zambia").should('exist')
it(`Share GRID view : Virtual column validation > belongs to`, () => {
// belongs to field validation
mainPage.getCell("City <= Address", 1).click().find('button.mdi-close-thick').should('not.exist')
mainPage.getCell("City <= Address", 1).click().find('button.mdi-arrow-expand').should('not.exist')
mainPage.getCell("City <= Address", 1).find('.v-chip').contains('Lethbridge').should('exist')
})
it(`Share ${viewType} view : Disable sort`, () => {
// remove sort and validate
mainPage.clearSort()
mainPage.getCell("Country", 1).contains("Afghanistan").should('exist')
it(`Share GRID view : Virtual column validation > many to many`, () => {
// many-to-many field validation
mainPage.getCell("Address <=> Staff", 1).click().find('button.mdi-close-thick').should('not.exist')
mainPage.getCell("Address <=> Staff", 1).click().find('button.mdi-plus').should('not.exist')
mainPage.getCell("Address <=> Staff", 1).click().find('button.mdi-arrow-expand').click()
cy.getActiveModal().find('button.mdi-reload').should('exist')
cy.getActiveModal().find('button').contains('Link to').should('not.exist')
cy.getActiveModal().find('.child-card').contains('Mike').should('exist')
cy.getActiveModal().find('.child-card').find('button').should('not.exist')
cy.get('body').type('{esc}')
})
})
it(`Share ${viewType} view : Create Filter`, () => {
// add filter & validate
mainPage.filterField('Country', 'is equal', 'India')
cy.wait(1000)
mainPage.getCell("Country", 1).contains("India").should('exist')
describe(`${type.toUpperCase()} api - Grid view/ row-column update verification`, () => {
before(() => {
// Address table has belongs to, has many & many-to-many
cy.openTableTab('Country')
cy.saveLocalStorage()
// store base URL- to re-visit and delete form view later
cy.url().then((url) => {
baseURL = url
generateViewLink('rowColUpdate')
})
})
it(`Share ${viewType} view : Delete Filter`, () => {
// Remove sort and Validate
mainPage.filterReset()
mainPage.getCell("Country", 1).contains("Afghanistan").should('exist')
})
it(`Delete ${viewType} view`, () => {
// go back to base page
after(() => {
// close table
cy.restoreLocalStorage();
cy.visit(baseURL)
// number of view entries should be 2 before we delete
cy.get('.nc-view-item').its('length').should('eq', 5)
// delete row
mainPage.getPagination(5).click()
cy.wait(3000)
mainPage.getRow(10).find('.mdi-checkbox-blank-outline').click({ force: true })
mainPage.getCell("Country", 10).rightclick()
cy.getActiveMenu().contains('Delete Selected Row').click()
// delete column
cy.get(`th:contains('dummy') .mdi-menu-down`)
.trigger('mouseover')
.click()
cy.get('.nc-column-delete').click()
cy.get('button:contains(Confirm)').click()
mainPage.deleteCreatedViews()
// close table
cy.get('[href="#table||db||Country"]').find('button.mdi-close').click()
})
// click on delete icon (becomes visible on hovering mouse)
cy.get('.nc-view-delete-icon').eq(3).click({ force: true })
it(`Generate default Shared GRID view URL`, () => {
// add row
cy.get('.nc-add-new-row-btn').click({force: true})
cy.get('#data-table-form-Country > input').first().click().type('a')
cy.contains('Save Row').filter('button').click({ force: true })
cy.wait(1000)
cy.get('.nc-view-delete-icon').eq(2).click({ force: true })
cy.wait(1000)
// add column
mainPage.addColumn('dummy')
cy.wait(5000)
cy.get('.nc-view-delete-icon').eq(1).click({ force: true })
cy.wait(1000)
// visit public view
cy.log(viewURL['rowColUpdate'])
cy.restoreLocalStorage();
cy.visit(viewURL['rowColUpdate']) //5
// wait for public view page to load!
cy.wait(5000)
})
cy.get('.nc-view-delete-icon').eq(0).click({ force: true })
cy.wait(1000)
// confirm if the number of veiw entries is reduced by 1
cy.get('.nc-view-item').its('length').should('eq', 1)
it(`Share GRID view : new row visible`, () => {
// verify row
cy.get(`.v-pagination > li:contains('5') button`).click()
cy.wait(3000)
mainPage.getCell('Country', 10).contains('a').should('exist')
})
}
// below scenario's will be invoked twice, once for rest & then for graphql
viewTest('grid')
})
it.skip(`Share GRID view : new column visible`, () => {
// verify column headers
cy.get('[data-col="dummy"]').should('exist')
})
})
}
// invoke for different API types supported

4
cypress/integration/test/masterSuite.js

@ -15,7 +15,7 @@ let t3b = require('../common/3b_formula_column')
let t3c = require('../common/3c_lookup_column')
let t3d = require('../common/3d_rollup_column')
let t4a = require('../common/4a_table_view_grid_gallery_form')
// disabled let t4b = require('../common/4b_table_view_share')
let t4b = require('../common/4b_table_view_share')
let t4c = require('../common/4c_form_view_detailed')
let t4d = require('../common/4d_table_view_grid_locked')
let t4e = require('../common/4e_form_view_share')
@ -39,7 +39,7 @@ const nocoTestSuite = (type, xcdb) => {
t3c.genTest(type, xcdb)
t3d.genTest(type, xcdb)
t4a.genTest(type, xcdb)
// disabled t4b.genTest(type, xcdb)
t4b.genTest(type, xcdb)
t4c.genTest(type, xcdb)
t4d.genTest(type, xcdb)
t4e.genTest(type, xcdb)

22
cypress/support/page_objects/mainPage.js

@ -186,6 +186,28 @@ export class _mainPage {
cy.get('.nc-filter-item-remove-btn').click()
cy.get('.nc-filter-menu-btn').click()
}
// delete created views
//
deleteCreatedViews = () => {
cy.get('.v-navigation-drawer__content > .container')
.find('.v-list > .v-list-item')
.contains('Share View')
.parent().find('button.mdi-dots-vertical').click()
cy.getActiveMenu().find('.v-list-item').contains('Views List').click()
cy.get(1000)
cy.get('th:contains("View Link")').parent().parent()
.next().find('tr').each((tableRow) => {
cy.wrap(tableRow).find('button').last().click()
cy.wait(1000)
})
.then(() => {
cy.get('.v-overlay__content > .d-flex > .v-icon').click()
})
}
}

Loading…
Cancel
Save