chore(e2e): remove test running 100 times (#12777)
* chore(e2e): remove test running 100 times * fix: add orgID to createLabelpull/12785/head
parent
49d025ba64
commit
47882c8818
|
@ -56,21 +56,19 @@ describe('Dashboards', () => {
|
||||||
cy.visit('/dashboards')
|
cy.visit('/dashboards')
|
||||||
})
|
})
|
||||||
|
|
||||||
for (let i = 0; i < 100; i++) {
|
it('can delete a dashboard', () => {
|
||||||
it.only('can delete a dashboard', () => {
|
cy.getByTestID('dashboard-card').should('have.length', 2)
|
||||||
cy.getByTestID('dashboard-card').should('have.length', 2)
|
|
||||||
|
|
||||||
cy.getByTestID('dashboard-card')
|
cy.getByTestID('dashboard-card')
|
||||||
.first()
|
.first()
|
||||||
.trigger('mouseover')
|
.trigger('mouseover')
|
||||||
.within(() => {
|
.within(() => {
|
||||||
cy.getByTestID('context-delete-menu').click()
|
cy.getByTestID('context-delete-menu').click()
|
||||||
cy.getByTestID('context-delete-dashboard').click()
|
cy.getByTestID('context-delete-dashboard').click()
|
||||||
})
|
})
|
||||||
|
|
||||||
cy.getByTestID('dashboard-card').should('have.length', 1)
|
cy.getByTestID('dashboard-card').should('have.length', 1)
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
it('can edit a dashboards name', () => {
|
it('can edit a dashboards name', () => {
|
||||||
const newName = 'new 🅱️ashboard'
|
const newName = 'new 🅱️ashboard'
|
||||||
|
@ -123,20 +121,22 @@ describe('Dashboards', () => {
|
||||||
it('can add an existing label to a dashboard', () => {
|
it('can add an existing label to a dashboard', () => {
|
||||||
const labelName = 'swogglez'
|
const labelName = 'swogglez'
|
||||||
|
|
||||||
cy.createLabel(labelName).then(() => {
|
cy.get<Organization>('@org').then(({id}) => {
|
||||||
cy.getByTestID(`inline-labels--add`)
|
cy.createLabel(labelName, id).then(() => {
|
||||||
.first()
|
cy.getByTestID(`inline-labels--add`)
|
||||||
.click()
|
.first()
|
||||||
|
.click()
|
||||||
|
|
||||||
cy.getByTestID('inline-labels--popover').within(() => {
|
cy.getByTestID('inline-labels--popover').within(() => {
|
||||||
cy.getByTestID(`label--pill ${labelName}`).click()
|
cy.getByTestID(`label--pill ${labelName}`).click()
|
||||||
})
|
|
||||||
|
|
||||||
cy.getByTestID('dashboard-card')
|
|
||||||
.first()
|
|
||||||
.within(() => {
|
|
||||||
cy.getByTestID(`label--pill ${labelName}`).should('be.visible')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
cy.getByTestID('dashboard-card')
|
||||||
|
.first()
|
||||||
|
.within(() => {
|
||||||
|
cy.getByTestID(`label--pill ${labelName}`).should('be.visible')
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -100,13 +100,15 @@ export const createVariable = (
|
||||||
}
|
}
|
||||||
|
|
||||||
export const createLabel = (
|
export const createLabel = (
|
||||||
name?: string
|
name?: string,
|
||||||
|
orgID?: string
|
||||||
): Cypress.Chainable<Cypress.Response> => {
|
): Cypress.Chainable<Cypress.Response> => {
|
||||||
return cy.request({
|
return cy.request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/api/v2/labels',
|
url: '/api/v2/labels',
|
||||||
body: {
|
body: {
|
||||||
name,
|
name,
|
||||||
|
orgID,
|
||||||
properties: {
|
properties: {
|
||||||
description: `test ${name}`,
|
description: `test ${name}`,
|
||||||
color: '#ff0054',
|
color: '#ff0054',
|
||||||
|
|
Loading…
Reference in New Issue