chore(cypress): adjust dashboard test

pull/5948/head
k3yi0 2022-06-29 15:13:54 +02:00
parent 427dd995be
commit 31144cda53
1 changed files with 16 additions and 9 deletions

View File

@ -32,8 +32,8 @@ describe('Use Dashboards', () => {
describe('Use Dashboards as reader', () => {
beforeEach(() => {
cy.createDashboard('Reader Dashboard').then(() => {
cy.createChronografUser('Reader', 'oauth-mock', 'oauth2').then(() => {
cy.createChronografUser('Reader', 'oauth-mock', 'oauth2').then(() => {
cy.createDashboard('Reader Dashboard').then(() => {
cy.getByTestID('dashboard-panel')
.should('be.visible')
.then(() => {
@ -65,13 +65,20 @@ describe('Use Dashboards', () => {
cy.get('.template-control-bar').should('exist').and('be.visible')
cy.get('.annotation-control-bar').should('not.exist')
cy.getByTestID('show-annotations--button').should('be.visible').click()
cy.get('.annotation-control-bar').should('exist').and('be.visible').within(() => {
cy.getByTestID('add-template-variable').should('not.exist')
cy.getByTestID('add-annotation--button').should('not.exist')
cy.getByTestID('wizard-bucket-selected').click()
cy.getByTestID('dropdown--item').contains('Filter Annotations By Tags').click()
cy.getByTestID('add-annotation-filter--button').should('exist').and('be.visible')
})
cy.get('.annotation-control-bar')
.should('exist')
.and('be.visible')
.within(() => {
cy.getByTestID('add-template-variable').should('not.exist')
cy.getByTestID('add-annotation--button').should('not.exist')
cy.getByTestID('wizard-bucket-selected').click()
cy.getByTestID('dropdown--item')
.contains('Filter Annotations By Tags')
.click()
cy.getByTestID('add-annotation-filter--button')
.should('exist')
.and('be.visible')
})
cy.reload().then(() => {
cy.get('.page-header--title')