-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5452e3b
commit ac80c57
Showing
4 changed files
with
57 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
frontend/cypress/support/helper/pom-helper/filterHelper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { PageObjectMapperBase } from './pageObjectMapperBase'; | ||
|
||
export default class FilterHelper extends PageObjectMapperBase { | ||
validatePage(): void {} | ||
|
||
optionShouldBeSelected(text: string, onOverview = true): this { | ||
if (onOverview) { | ||
cy.contains('h1:visible', text).should('have.length', 1); | ||
} | ||
this.getOption(text).should('have.length', 1).should('have.css', 'background-color').and('eq', 'rgb(30, 90, 150)'); | ||
return this; | ||
} | ||
|
||
optionShouldNotBeSelected(text: string): this { | ||
cy.contains('h1:visible', text).should('not.exist'); | ||
this.getOption(text) | ||
.should('have.length', 1) | ||
.should('have.css', 'background-color') | ||
.and('eq', 'rgb(255, 255, 255)'); | ||
return this; | ||
} | ||
|
||
toggleOption(text: string): this { | ||
this.getOption(text).click(); | ||
return this; | ||
} | ||
|
||
private getOption(text: string): Cypress.Chainable<JQuery<HTMLElement>> { | ||
return cy.contains('mat-chip:visible', text); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.