Skip to content

Commit

Permalink
test: update tests according to new ou dialog behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenrikoverland committed Dec 5, 2024
1 parent db357a2 commit 4364835
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions cypress/integration/orgUnitDimension.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
expectOrgUnitDimensionModalToBeVisible,
expectOrgUnitDimensionToNotBeLoading,
expectOrgUnitItemToBeSelected,
expectOrgUnitTreeToBeDisabled,
expectOrgUnitTreeToBeEnabled,
openOuDimension,
selectOrgUnitTreeItem,
Expand Down Expand Up @@ -45,7 +44,7 @@ describe(`Org unit dimension`, () => {
openOuDimension(DIMENSION_ID_ORGUNIT)
expectOrgUnitDimensionModalToBeVisible()
expectOrgUnitDimensionToNotBeLoading()
expectOrgUnitTreeToBeDisabled()
expectOrgUnitTreeToBeEnabled()
deselectUserOrgUnit(TEST_DEFAULT_ORG_UNIT)
selectOrgUnitTreeItem(TEST_ROOT)
selectOrgUnitTreeItem(TEST_DISTRICT_1)
Expand Down Expand Up @@ -143,20 +142,19 @@ describe(`Org unit dimension`, () => {
expectOrgUnitItemToBeSelected(TEST_ROOT)
expectOrgUnitTreeToBeEnabled()
selectUserOrgUnit(TEST_USER_ORG_UNIT)
expectOrgUnitTreeToBeDisabled()
expectOrgUnitTreeToBeEnabled()
clickOrgUnitDimensionModalUpdateButton()
expectTableToBeVisible()
assertChipContainsText('Organisation unit', 1)
assertChipContainsText('Organisation unit', 2)
assertTooltipContainsEntries([TEST_USER_ORG_UNIT])

cy.log(`deselects '${TEST_USER_ORG_UNIT}'`)
openOuDimension(DIMENSION_ID_ORGUNIT)
expectOrgUnitDimensionModalToBeVisible()
expectOrgUnitDimensionToNotBeLoading()
expectOrgUnitTreeToBeDisabled()
expectOrgUnitTreeToBeEnabled()
deselectUserOrgUnit(TEST_USER_ORG_UNIT)
expectOrgUnitTreeToBeEnabled()
selectOrgUnitTreeItem(TEST_ROOT)
expectOrgUnitItemToBeSelected(TEST_ROOT)
clickOrgUnitDimensionModalUpdateButton()
expectTableToBeVisible()
Expand All @@ -174,7 +172,7 @@ describe(`Org unit dimension`, () => {
openOuDimension(DIMENSION_ID_ORGUNIT)
expectOrgUnitDimensionModalToBeVisible()
expectOrgUnitDimensionToNotBeLoading()
expectOrgUnitTreeToBeDisabled()
expectOrgUnitTreeToBeEnabled()
deselectUserOrgUnit(TEST_DEFAULT_ORG_UNIT)
TEST_DISTRICTS.forEach((district) => selectOrgUnitTreeItem(district))
toggleOrgUnitLevel(TEST_LEVEL)
Expand Down

0 comments on commit 4364835

Please sign in to comment.