influxdb/ui/cypress/e2e/dashboardsView.test.ts

57 lines
1.4 KiB
TypeScript
Raw Normal View History

import {Organization} from '../../src/types'
describe('Dashboard', () => {
beforeEach(() => {
cy.flush()
cy.signin().then(({body}) => {
cy.wrap(body.org).as('org')
})
2019-04-01 19:07:29 +00:00
cy.fixture('routes').then(({orgs}) => {
cy.get<Organization>('@org').then(({id}) => {
cy.visit(`${orgs}/${id}/dashboards`)
})
})
})
it('can edit a dashboards name', () => {
cy.get<Organization>('@org').then(({id}) => {
cy.createDashboard(id).then(({body}) => {
2019-04-01 19:07:29 +00:00
cy.fixture('routes').then(({orgs}) => {
cy.visit(`${orgs}/${id}/dashboards/${body.id}`)
})
})
})
const newName = 'new 🅱ashboard'
cy.get('.renamable-page-title--title').click()
style(clockface): upgrade to 0.0.18 (#14458) * Update dependency * Fix appearance of signin form * Fix appearance of inline label editor * Update implementation of dropdown * Remove comment * Fix appearance of auto refresh dropdown * Update implementation of time range dropdown * Update implementation of time zone dropdown * Update implementation of window selector * Fix missing button text in window selector Oooooops * Update implementation of time format dropdown * Update implementation of column selector * Update implementation of geometry dropdown * Ensure line graphs have a default color palette * Update implementation of color scheme dropdown * Update implementation of heat map color selector * Update dropdown implementations in histogram options * Update implementation of Variable Builder dropdowns * Update implementation of buckets dropdown * Tweak color of slide toggle in token row to be green * Update implementation of Generate Token dropdown * Update snapshot tests * Update bucket dropdown tests * Fix query builder test * Update onboarding buttons test * Fix some e2e tests * Fix tokens e2e tests * Fix variables e2e tests * Update implemenation of view type dropdown Also removing the empty view type from existence Co-Authored-By: Christopher Henn <chnn@users.noreply.github.com> * Fix query builder add card button Made it less prone to breakage * Fix appearance of VEO * Update styles of renamable page title * Update styles using button or icon or input * Ensure time range dropdown is not blank initially * Update implementation of variable tooltip dropdown * Update implementation of dropdowns in Add Members form * Update implementation of Color dropdown * Update implementation of dropdowns in scatter plot options * Upddate implementation of precision dropdown * Update implementation of sort by table option dropdown * Update implementation of dashboards dropdown in save as menu * Update implementations of dropdowns in task form * Update Variable control bar dropdowns * Delete unused component * Remove unused imports * Update bucket dropdown implementation in delete data form * Update searchable dropdown to use new clockface components * Delete local dropdown components * Fix failing unit tests * blerp * Coerce type in view type dropdown * Fix onboarding styles * Fix e2e tests Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com> * Fix last e2e test Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com> * build(e2e): allow cypress to run with webpack dev server
2019-07-25 19:13:51 +00:00
cy.get('.cf-input-field')
.type(newName)
.type('{enter}')
2019-04-01 19:07:29 +00:00
cy.fixture('routes').then(({orgs}) => {
cy.get<Organization>('@org').then(({id}) => {
cy.visit(`${orgs}/${id}/dashboards`)
})
})
Inline Label Editing from Dashboards Index (#12384) * Use client generated Label in dashboard actions * Fetch labels when dashboards index loads * Add styles for "colorless" labels * Implement inline label editing from dashboard cards * Fine tune label deletion * Create createLabelAJAX function Co-Authored-By: Delmer <ofthedelmer@users.noreply.github.com> * Make inline label creation work in dashboards index Co-Authored-By: Delmer <ofthedelmer@users.noreply.github.com> * WIP use ILabel as the defacto label type * Ensure a label can be updated without having to change the name * Ensure all fields in a Label can be changed in the overlay * WIP write e2e tests for inline labelling Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com> * wip: dashboard brittle * wip dashboards * Position inline labels popover such that it doesn't collide with the navbar * chore: run all dashboard tests 25 times * Ensure that there is a dashboard with a name that matches the search test query * Appease the lint gods with mortal sacrifice * Remove unit test in favor of e2e test Everything the unit test is testing is also tested by the e2e test Co-Authored-By: Delmer <ofthedelmer@users.noreply.github.com> * Remove for loop and fix search name assertion Co-Authored-By: Delmer <ofthedelmer@users.noreply.github.com> Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com> * Fix affected task test Co-Authored-By: Delmer <ofthedelmer@users.noreply.github.com> Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com> * Fix incorrectly named reference in e2e test Co-Authored-By: Delmer <ofthedelmer@users.noreply.github.com> Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com> * Undo go file change * Add guard back in * Undo changes to go file
2019-03-08 17:11:30 +00:00
cy.getByTestID('dashboard-card').should('contain', newName)
})
it('can create a cell', () => {
cy.get<Organization>('@org').then(({id}) => {
cy.createDashboard(id).then(({body}) => {
2019-04-01 19:07:29 +00:00
cy.fixture('routes').then(({orgs}) => {
cy.visit(`${orgs}/${id}/dashboards/${body.id}`)
})
})
})
cy.getByTestID('add-cell--button').click()
cy.getByTestID('save-cell--button').click()
cy.getByTestID('cell--view-empty').should('have.length', 1)
})
})