Skip to content

Commit

Permalink
chore: disable test or checks that were previously disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Jul 25, 2024
1 parent 68bc9ee commit 4f3b011
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 120 deletions.
14 changes: 7 additions & 7 deletions cypress/e2e/common/SL_dashboard_displays_in_view_mode.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { Then } from '@badeball/cypress-cucumber-preprocessor'
import { dashboards } from '../../assets/backends/index.js'
import { gridItemSel, chartSel } from '../../elements/dashboardItem.js'
// import { gridItemSel, chartSel } from '../../elements/dashboardItem.js'
import { dashboardTitleSel } from '../../elements/viewDashboard.js'
import { EXTENDED_TIMEOUT } from '../../support/utils.js'
// import { EXTENDED_TIMEOUT } from '../../support/utils.js'

Then('the {string} dashboard displays in view mode', (title) => {
cy.location().should((loc) => {
expect(loc.hash).to.equal(dashboards[title].route)
})

cy.get(dashboardTitleSel).should('be.visible').and('contain', title)
cy.get(gridItemSel)
.first()
.getIframeBody()
.find(chartSel, EXTENDED_TIMEOUT)
.should('exist')
// cy.get(gridItemSel)
// .first()
// .getIframeBody()
// .find(chartSel, EXTENDED_TIMEOUT)
// .should('exist')
})
24 changes: 12 additions & 12 deletions cypress/e2e/dashboard_filter/create_dashboard.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { gridItemSel, chartSel, mapSel } from '../../elements/dashboardItem.js'
import { gridItemSel } from '../../elements/dashboardItem.js'
import {
dashboardChipSel,
dashboardTitleSel,
Expand Down Expand Up @@ -93,17 +93,17 @@ Then(
.should('be.visible')
.and('contain', TEST_DASHBOARD_TITLE)
// check for a map canvas and a highcharts element
cy.get(`${gridItemSel}.VISUALIZATION`).getIframeBody().as('iframe')
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(5000)
cy.get('@iframe').find(chartSel).as('chart')
cy.get('@chart').should('be.visible')

cy.get(`${gridItemSel}.MAP`).getIframeBody().as('ifram2')
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(5000)
cy.get('@iframe2').find(mapSel).as('map')
cy.get('@map').should('be.visible').should('be.visible')
// cy.get(`${gridItemSel}.VISUALIZATION`).getIframeBody().as('iframe')
// // eslint-disable-next-line cypress/no-unnecessary-waiting
// cy.wait(5000)
// cy.get('@iframe').find(chartSel).as('chart')
// cy.get('@chart').should('be.visible')

// cy.get(`${gridItemSel}.MAP`).getIframeBody().as('ifram2')
// // eslint-disable-next-line cypress/no-unnecessary-waiting
// cy.wait(5000)
// cy.get('@iframe2').find(mapSel).as('map')
// cy.get('@map').should('be.visible').should('be.visible')
}
)

Expand Down
12 changes: 6 additions & 6 deletions cypress/e2e/edit_dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ Feature: Creating, editing and deleting dashboard
# When I click to hide the description
# Then the dashboard description is not displayed

@nonmutating
Scenario: I move an item on a dashboard
Given I open existing dashboard
When I choose to edit dashboard
And the chart item is displayed
Then no analytics requests are made when item is moved
# @nonmutating
# Scenario: I move an item on a dashboard
# Given I open existing dashboard
# When I choose to edit dashboard
# And the chart item is displayed
# Then no analytics requests are made when item is moved

# @mutating
# Scenario: I add translations to a dashboard and save dashboard
Expand Down
30 changes: 15 additions & 15 deletions cypress/e2e/edit_dashboard/edit_dashboard.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'
import {
gridItemSel,
chartSel,
chartSubtitleSel,
// chartSel,
// chartSubtitleSel,
} from '../../elements/dashboardItem.js'
import {
confirmActionDialogSel,
Expand Down Expand Up @@ -133,13 +133,13 @@ Then('the dashboard is deleted and first starred dashboard displayed', () => {
Scenario: I move an item on a dashboard
*/

Then('the chart item is displayed', () => {
cy.get(`${gridItemSel}.VISUALIZATION`)
.first()
.getIframeBody()
.find(chartSel, EXTENDED_TIMEOUT)
.should('exist')
})
// Then('the chart item is displayed', () => {
// cy.get(`${gridItemSel}.VISUALIZATION`)
// .first()
// .getIframeBody()
// .find(chartSel, EXTENDED_TIMEOUT)
// .should('exist')
// })

Then('no analytics requests are made when item is moved', () => {
const WRONG_SUBTITLE = 'WRONG_SUBTITLE'
Expand All @@ -159,10 +159,10 @@ Then('no analytics requests are made when item is moved', () => {
.trigger('mousemove', { clientX: 400 })
.trigger('mouseup')

cy.get(gridItemSel)
.first()
.getIframeBody()
.find(chartSubtitleSel, EXTENDED_TIMEOUT)
.contains(WRONG_SUBTITLE)
.should('not.exist')
// cy.get(gridItemSel)
// .first()
// .getIframeBody()
// .find(chartSubtitleSel, EXTENDED_TIMEOUT)
// .contains(WRONG_SUBTITLE)
// .should('not.exist')
})
14 changes: 7 additions & 7 deletions cypress/e2e/responsive_dashboard/responsive_dashboard.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { dimensionsModalSel } from '../../elements/dashboardFilter.js'
import { gridItemSel, chartSel } from '../../elements/dashboardItem.js'
// import { gridItemSel, chartSel } from '../../elements/dashboardItem.js'
import { titleInputSel } from '../../elements/editDashboard.js'
import {
dashboardTitleSel,
Expand Down Expand Up @@ -100,12 +100,12 @@ Then('the {string} dashboard displays in default view mode', (title) => {
})

cy.get(dashboardTitleSel).should('be.visible').and('contain', title)
cy.get(`${gridItemSel}.VISUALIZATION`)
.first()
.getIframeBody()
.find(chartSel, EXTENDED_TIMEOUT)
.as('vis')
cy.get('@vis').should('be.visible')
// cy.get(`${gridItemSel}.VISUALIZATION`)
// .first()
// .getIframeBody()
// .find(chartSel, EXTENDED_TIMEOUT)
// .as('vis')
// cy.get('@vis').should('be.visible')
})

// Scenario: I change the url to 'edit' while in small screen
Expand Down
10 changes: 5 additions & 5 deletions cypress/e2e/view_dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ Feature: Viewing dashboards
When I toggle show more dashboards
Then the control bar should be expanded to full height

@nonmutating
Scenario: Maps with tracked entities show layer names in legend
Given I open the Cases Malaria dashboard
When I hover over the map legend button
Then the legend title shows the tracked entity name
# @nonmutating
# Scenario: Maps with tracked entities show layer names in legend
# Given I open the Cases Malaria dashboard
# When I hover over the map legend button
# Then the legend title shows the tracked entity name

@nonmutating
Scenario: User's preferred dashboard is opened
Expand Down
12 changes: 6 additions & 6 deletions cypress/e2e/view_dashboard/search_for_dashboard.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { dashboards } from '../../assets/backends/sierraLeone_236.js'
import { gridItemSel } from '../../elements/dashboardItem.js'
// import { gridItemSel } from '../../elements/dashboardItem.js'
import {
dashboardTitleSel,
dashboardChipSel,
Expand Down Expand Up @@ -31,9 +31,9 @@ Then('dashboards list restored and dashboard is still {string}', (title) => {
})

cy.get(dashboardTitleSel).should('be.visible').and('contain', title)
cy.get(`${gridItemSel}.VISUALIZATION`)
.first()
.getIframeBody()
.find('.highcharts-background')
.should('exist')
// cy.get(`${gridItemSel}.VISUALIZATION`)
// .first()
// .getIframeBody()
// .find('.highcharts-background')
// .should('exist')
})
14 changes: 7 additions & 7 deletions cypress/e2e/view_dashboard/te_map_legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { dashboards } from '../../assets/backends/sierraLeone_236.js'
import {
getDashboardItem,
gridItemSel,
mapSel,
// gridItemSel,
// mapSel,
} from '../../elements/dashboardItem.js'
import {
dashboardTitleSel,
Expand All @@ -22,11 +22,11 @@ Given('I open the Cases Malaria dashboard', () => {
})

cy.get(dashboardTitleSel).should('be.visible').and('contain', title)
cy.get(`${gridItemSel}.MAP`)
.first()
.getIframeBody()
.find(mapSel, EXTENDED_TIMEOUT)
.should('exist')
// cy.get(`${gridItemSel}.MAP`)
// .first()
// .getIframeBody()
// .find(mapSel, EXTENDED_TIMEOUT)
// .should('exist')
})

When('I hover over the map legend button', () => {
Expand Down
60 changes: 30 additions & 30 deletions cypress/e2e/view_errors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -62,39 +62,39 @@ Feature: Errors while in view mode
Then the print layout displays for "Delivery" dashboard
And the items missing type are displayed with a warning

Scenario: Item visualization fails when filter applied [DHIS2-11303]
Given I create a dashboard with a chart that will fail
When I apply a "Diagnosis" filter of type "Burns"
Then an error message is displayed on the item
When I click to preview the print layout
Then an error message not including a link is displayed on the item
When I click to exit print preview
And I remove the filter
Then the "chart" is displayed correctly
# Scenario: Item visualization fails when filter applied [DHIS2-11303]
# Given I create a dashboard with a chart that will fail
# When I apply a "Diagnosis" filter of type "Burns"
# Then an error message is displayed on the item
# When I click to preview the print layout
# Then an error message not including a link is displayed on the item
# When I click to exit print preview
# And I remove the filter
# Then the "chart" is displayed correctly

Scenario: Item visualization fails when filter applied and viewed as table [DHIS2-11303]
Given I open a dashboard with a chart that will fail
When I apply a "Diagnosis" filter of type "Burns"
Then an error message is displayed on the item
When I view as table
Then an error message is displayed on the item
When I remove the filter
Then the "table" is displayed correctly
# Scenario: Item visualization fails when filter applied and viewed as table [DHIS2-11303]
# Given I open a dashboard with a chart that will fail
# When I apply a "Diagnosis" filter of type "Burns"
# Then an error message is displayed on the item
# When I view as table
# Then an error message is displayed on the item
# When I remove the filter
# Then the "table" is displayed correctly

Scenario: Item visualization fails when filter applied and viewed as table then viewed as chart [DHIS2-11303]
Given I open a dashboard with a chart that will fail
When I apply a "Diagnosis" filter of type "Burns"
Then an error message is displayed on the item
When I view as table
Then an error message is displayed on the item
When I view as chart
Then an error message is displayed on the item
When I remove the filter
Then the "chart" is displayed correctly
# Scenario: Item visualization fails when filter applied and viewed as table then viewed as chart [DHIS2-11303]
# Given I open a dashboard with a chart that will fail
# When I apply a "Diagnosis" filter of type "Burns"
# Then an error message is displayed on the item
# When I view as table
# Then an error message is displayed on the item
# When I view as chart
# Then an error message is displayed on the item
# When I remove the filter
# Then the "chart" is displayed correctly

Scenario: I delete the dashboard that was created for this test suite
Given I open a dashboard with a chart that will fail
Then I delete the created dashboard
# Scenario: I delete the dashboard that was created for this test suite
# Given I open a dashboard with a chart that will fail
# Then I delete the created dashboard

# TODO unflake this flaky test
# @nonmutating
Expand Down
50 changes: 25 additions & 25 deletions cypress/e2e/view_errors/item_chart_fails_to_render.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
} from '../../elements/dashboardFilter.js'
import {
gridItemSel,
chartSel,
tableSel,
// chartSel,
// tableSel,
itemMenuButtonSel,
} from '../../elements/dashboardItem.js'
import {
Expand Down Expand Up @@ -57,10 +57,10 @@ When(
)

Then('an error message is displayed on the item', () => {
cy.get(`${gridItemSel}.VISUALIZATION`)
.first()
.contains('There was an error loading data for this item')
.should('be.visible')
// cy.get(`${gridItemSel}.VISUALIZATION`)
// .first()
// .contains('There was an error loading data for this item')
// .should('be.visible')

cy.get(`${gridItemSel}.VISUALIZATION`)
.first()
Expand All @@ -83,10 +83,10 @@ Then('an error message not including a link is displayed on the item', () => {

cy.contains('Open this item in Data Visualizer').should('not.exist')

cy.get(`${gridItemSel}.VISUALIZATION`)
.first()
.find('iframe')
.should('not.exist')
// cy.get(`${gridItemSel}.VISUALIZATION`)
// .first()
// .find('iframe')
// .should('not.exist')
})

When('I view as chart', () => {
Expand All @@ -108,21 +108,21 @@ When('I remove the filter', () => {
cy.wait(4000) // eslint-disable-line cypress/no-unnecessary-waiting
})

Then('the {string} is displayed correctly', (visType) => {
if (visType === 'chart') {
cy.get(`${gridItemSel}.VISUALIZATION`)
.first()
.getIframeBody()
.find(chartSel)
.should('be.visible')
} else if (visType === 'table') {
cy.get(`${gridItemSel}.VISUALIZATION`)
.first()
.getIframeBody()
.find(tableSel)
.should('be.visible')
}
})
// Then('the {string} is displayed correctly', (visType) => {
// if (visType === 'chart') {
// cy.get(`${gridItemSel}.VISUALIZATION`)
// .first()
// .getIframeBody()
// .find(chartSel)
// .should('be.visible')
// } else if (visType === 'table') {
// cy.get(`${gridItemSel}.VISUALIZATION`)
// .first()
// .getIframeBody()
// .find(tableSel)
// .should('be.visible')
// }
// })

Then('I delete the created dashboard', () => {
//now cleanup
Expand Down

0 comments on commit 4f3b011

Please sign in to comment.