chore: log out at the beggining of each test

pull/5911/head
k3yi0 2022-04-25 15:04:18 +02:00
parent 69f2110d49
commit 03173b3146
3 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,6 @@
describe('Use Dashboards', () => {
beforeEach(() => {
cy.OAuthLogout()
cy.OAuthLogin('test')
cy.deleteDashboards()
cy.removeConnections()
@ -47,6 +48,7 @@ describe('Use Dashboards', () => {
GROUP BY time(:interval:) FILL(null)`
beforeEach(() => {
cy.OAuthLogout()
cy.OAuthLogin('test')
cy.deleteUser('Reader')
cy.deleteDashboards()
@ -56,7 +58,6 @@ describe('Use Dashboards', () => {
cy.createUser('Reader', 'oauth-mock', 'oauth2')
cy.OAuthLogout()
cy.OAuthLogin('Reader')
cy.visit('/')
})
it('use dashboards as user with reader role', () => {
@ -65,7 +66,7 @@ describe('Use Dashboards', () => {
cy.getByTestID('create-dashboard-button').should('not.exist')
cy.get('.form-control').type('Empty')
cy.getByTestID('dashboard-panel').should('have.text', `Looks like you dont have any dashboards`)
cy.get('.form-control').clear().type('Dashboard')
cy.get('.form-control').clear().type('Dashboard')
cy.getByTestID('Unnamed Dashboard').click()
cy.get('.dashboard-empty--menu').should('not.exist')
cy.getByTestID('add-cell').should('not.exist')

View File

@ -1,5 +1,6 @@
describe('query builder', () => {
beforeEach(() => {
cy.OAuthLogout()
cy.OAuthLogin('test')
cy.deleteDashboards()
cy.removeConnections()

View File

@ -1,5 +1,6 @@
describe('Welcome Page', () => {
beforeEach(() => {
cy.OAuthLogout()
cy.OAuthLogin('test')
cy.removeConnections()
cy.visit('/')
@ -11,6 +12,7 @@ describe('Welcome Page', () => {
cy.get('[id="Connection Name"]').clear().type(Cypress.env('connectionName'))
cy.get('[id="Username"]').clear().type(Cypress.env('username'))
cy.get('[id="Password"]').clear().type(Cypress.env('password'))
if (Cypress.env('influxDBURL').startsWith('https')){
cy.get('.wizard-checkbox--label').contains('Unsafe SSL').click()
}