Skip to content

Commit

Permalink
chore: use hardcoded dev version for running e2e prod tests (#3240)
Browse files Browse the repository at this point in the history
* chore: use hardcoded dev version for running e2e prod tests

* chore: consolidate visualization error test
  • Loading branch information
jenniferarnesen authored Oct 8, 2024
1 parent 9ed1ebd commit 04dee94
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/verify-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
call-workflow-e2e-prod:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
needs: [build, lint, test, setup-matrix]
uses: dhis2/workflows/.github/workflows/analytics-e2e-tests-prod.yml@master
uses: dhis2/workflows/.github/workflows/analytics-e2e-tests-prod.yml@feat/support-hardcoded-dev-version
with:
should_record: ${{ contains(github.event.head_commit.message, '[e2e record]') || contains(join(github.event.pull_request.labels.*.name), 'e2e record')}}
spec-group: ${{ needs.setup-matrix.outputs.matrix }}
Expand Down
38 changes: 19 additions & 19 deletions cypress/integration/customErrors/visualizationError.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,49 +33,49 @@ const REGULAR_ITEM = {
}

describe('Visualization error', () => {
it('navigates to the start page and changes vis type to PT', () => {
it('displays an error when item is not valid for column chart', () => {
// navigate to the start page and change vis type to PT
goToStartPage()
changeVisType(visTypeDisplayNames[VIS_TYPE_PIVOT_TABLE])
})
it("selects period 'This year'", () => {

// select period 'This year'
openDimension(DIMENSION_ID_PERIOD)
unselectAllItemsByButton()
selectRelativePeriods(['This year'], 'Years')
clickDimensionModalUpdateButton()
})
it('selects a narrative item', () => {

// select a narrative item
openDimension(DIMENSION_ID_DATA)
inputSearchTerm('narrative')
selectDataElements([NARRATIVE_ITEM.name])
clickDimensionModalUpdateButton()
expectVisualizationToBeVisible(VIS_TYPE_PIVOT_TABLE)
})
it('narrative item is displayed correctly', () => {

// narrative item is displayed correctly
cy.contains(NARRATIVE_ITEM.content)
})
it('selects a regular item', () => {

// select a regular item
openDimension(DIMENSION_ID_DATA)
selectDataElements([REGULAR_ITEM.name])
clickDimensionModalUpdateButton()
expectVisualizationToBeVisible(VIS_TYPE_PIVOT_TABLE)
})
it('both items are displayed correctly', () => {

// both items are displayed correctly
cy.contains(NARRATIVE_ITEM.content)
cy.contains(REGULAR_ITEM.content)
})

it('changes vis type to Column', () => {
// change vis type to Column
changeVisType(visTypeDisplayNames[VIS_TYPE_COLUMN])
})
it('regular item is displayed correctly', () => {

// regular item is displayed correctly
cy.contains(REGULAR_ITEM.content)
})
it('removes the regular item', () => {

// remove the regular item
openDimension(DIMENSION_ID_DATA)
unselectItemByDoubleClick(REGULAR_ITEM.name)
clickDimensionModalUpdateButton()
})
it('error is shown', () => {

// error is shown
expectErrorToContainTitle('Invalid data type')
})
})

0 comments on commit 04dee94

Please sign in to comment.