chore(cypress): rename "flush" to "toInitialState"

pull/5936/head
k3yi0 2022-06-13 11:28:09 +02:00
parent 68ee8e7fe5
commit 9fcd9b579d
6 changed files with 8 additions and 8 deletions

View File

@ -25,7 +25,7 @@ import {
createInfluxDB,
deleteInfluxDB,
deleteInfluxDBs,
flush,
toInitialState,
writePoints
} from './support/commands'
@ -56,7 +56,7 @@ declare global {
createInfluxDB: typeof createInfluxDB
deleteInfluxDB: typeof deleteInfluxDB
deleteInfluxDBs: typeof deleteInfluxDBs
flush: typeof flush
toInitialState: typeof toInitialState
writePoints: typeof writePoints
}
}

View File

@ -3,7 +3,7 @@ describe('Use Admin tab', () => {
let sourceId: string
beforeEach(() => {
cy.flush()
cy.toInitialState()
cy.createInfluxDBConnection()
cy.get('@connections').then(sources => {
sourceId = sources[0].id

View File

@ -1,6 +1,6 @@
describe('Use Dashboards', () => {
beforeEach(() => {
cy.flush()
cy.toInitialState()
cy.createInfluxDBConnection()
cy.visit('/login')
cy.get('@connections').then(connections => {

View File

@ -2,7 +2,7 @@ describe('query builder', () => {
let influxDB: any
beforeEach(() => {
cy.flush()
cy.toInitialState()
cy.createInfluxDBConnection()
cy.createDashboard()
cy.get('@connections').then((sources: any) => {

View File

@ -1,6 +1,6 @@
describe('Welcome Page', () => {
beforeEach(() => {
cy.flush()
cy.toInitialState()
cy.OAuthLogout()
})

View File

@ -546,7 +546,7 @@ function wrapChronografUsers() {
/**
* Set application to a default state.
*/
export function flush() {
export function toInitialState() {
cy.OAuthLogin('test')
cy.visit('/')
cy.request({
@ -590,5 +590,5 @@ Cypress.Commands.add('deleteInfluxDBRoles', deleteInfluxDBRoles)
Cypress.Commands.add('createInfluxDB', createInfluxDB)
Cypress.Commands.add('deleteInfluxDB', deleteInfluxDB)
Cypress.Commands.add('deleteInfluxDBs', deleteInfluxDBs)
Cypress.Commands.add('flush', flush)
Cypress.Commands.add('toInitialState', toInitialState)
Cypress.Commands.add('writePoints', writePoints)