Skip to content

Commit

Permalink
test: use the new fn for eval chip text
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkrulltott committed Jan 15, 2024
1 parent 2cb847f commit 688160e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
13 changes: 4 additions & 9 deletions cypress/integration/createTrackedEntity.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
selectProgramForTE,
selectTrackedEntityWithType,
} from '../helpers/dimensions.js'
import { assertChipContainsText } from '../helpers/layout.js'
import { clickMenubarUpdateButton } from '../helpers/menubar.js'
import { goToStartPage } from '../helpers/startScreen.js'
import { expectTableToBeVisible } from '../helpers/table.js'
Expand Down Expand Up @@ -103,7 +104,7 @@ const setUpTable = () => {

expectTableToBeVisible()

cy.getBySelLike('layout-chip').contains(`${entityDimensionName}: all`)
assertChipContainsText(entityDimensionName, 'all')
}

// const runTests = () => {
Expand All @@ -125,10 +126,7 @@ const setUpTable = () => {
// .contains('Organisation unit: 1 selected')
// .should('be.visible')

// cy.getBySel('columns-axis')
// .findBySelLike('layout-chip')
// .contains(`${entityDimensionName}: all`)
// .should('be.visible')
// assertChipContainsText(entityDimensionName, 'all')

// cy.getBySel('columns-axis')
// .findBySelLike('layout-chip')
Expand Down Expand Up @@ -185,10 +183,7 @@ const setUpTable = () => {
// .contains('Organisation unit: 1 selected')
// .should('be.visible')

// cy.getBySel('columns-axis')
// .findBySelLike('layout-chip')
// .contains(`${entityDimensionName}: all`)
// .should('be.visible')
// assertChipContainsText(entityDimensionName, 'all')

// cy.getBySel('filters-axis')
// .findBySelLike('layout-chip')
Expand Down
5 changes: 1 addition & 4 deletions cypress/integration/programStatus.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ describe(['>=41'], 'program status (tracked entity)', () => {
.contains('Enrollment PROGRAM_STATUS')
.should('be.visible')

cy.getBySel('columns-axis')
.findBySelLike('layout-chip')
.contains(`${dimensionName}: all`)
.should('be.visible')
assertChipContainsText(dimensionName, 'all')

// Add filter 'Completed'

Expand Down

0 comments on commit 688160e

Please sign in to comment.