-
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
a8cb985
commit 5452e3b
Showing
8 changed files
with
71 additions
and
33 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
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
41 changes: 41 additions & 0 deletions
41
frontend/cypress/support/helper/pom-helper/dialogs/inviteMembersDialog.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,41 @@ | ||
import Dialog from './dialog'; | ||
import { uniqueSuffix } from '../../utils'; | ||
|
||
export default class InviteMembersDialog extends Dialog { | ||
private readonly firstnames: string[] = []; | ||
|
||
override validatePage() { | ||
super.validatePage(); | ||
this.getPage().contains('Members registrieren').should('exist'); | ||
} | ||
|
||
enterUser(firstName: string, lastName: string, email: string) { | ||
firstName = uniqueSuffix(firstName); | ||
email = uniqueSuffix(email); | ||
this.firstnames.push(firstName); | ||
const firstNameInput = cy.get('[formcontrolname="firstname"]').last(); | ||
const lastNameInput = cy.get('[formcontrolname="lastname"]').last(); | ||
const emailInput = cy.get('[formcontrolname="email"]').last(); | ||
this.fillInput(firstNameInput, firstName); | ||
this.fillInput(lastNameInput, lastName); | ||
this.fillInput(emailInput, email); | ||
return this; | ||
} | ||
|
||
addAnotherUser() { | ||
cy.contains('Weiterer Member hinzufügen').click(); | ||
return this; | ||
} | ||
getFirstNames() { | ||
return this.firstnames; | ||
} | ||
|
||
override submit() { | ||
cy.getByTestId('invite').click(); | ||
return this.firstnames; | ||
} | ||
|
||
getPage(): Cypress.Chainable<JQuery<HTMLElement>> { | ||
return cy.get('app-invite-user-dialog'); | ||
} | ||
} |
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
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