-
Notifications
You must be signed in to change notification settings - Fork 34
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
Showing
4 changed files
with
45 additions
and
10 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
30 changes: 30 additions & 0 deletions
30
e2e/cypress/support/common/inputs/coverageUserSelectInput.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,30 @@ | ||
import {Input} from './input'; | ||
import {Popup} from '../ui'; | ||
|
||
/** | ||
* Wrapper class for a searchable user select input field | ||
* @extends Input | ||
*/ | ||
export class CoverageUserSelectInput extends Input { | ||
type(value) { | ||
cy.log('Common.SearchableSelectInput.type'); | ||
const popup = new Popup('.p-dropdown-panel'); | ||
|
||
this.element.click(); | ||
popup.waitTillOpen(); | ||
|
||
popup.element.find('input') | ||
.type(value); | ||
|
||
popup.element.find('li') | ||
.first() | ||
.click(); | ||
|
||
popup.waitTillClosed(); | ||
} | ||
|
||
expect(value) { | ||
cy.log('Common.SearchableSelectInput.expect'); | ||
this.element.should('contain.text', value); | ||
} | ||
} |
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