Skip to content

Commit

Permalink
[Custom population] Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
valtterikantanen committed Sep 9, 2024
1 parent 656f199 commit cf1b30c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cypress/e2e/Custom_population.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ const containsAmountOfStudents = (amount = 0) => {
}

const containsSpecificStudents = (studentnumbers = []) => {
cy.contains(`Students (${studentnumbers.length})`).click()
cy.contains(`Students (${studentnumbers.length})`)
.parent()
.then($parentDiv => {
if (!$parentDiv.hasClass('active')) cy.contains(`Students (${studentnumbers.length})`).click()
})

studentnumbers.forEach(s => cy.contains(s))
}
Expand Down

0 comments on commit cf1b30c

Please sign in to comment.