-
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.
Merge branch 'multitenancy_main' into feature/922-seperate-keycloak-f…
…or-multitenancy
- Loading branch information
Showing
30 changed files
with
704 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package ch.puzzle.okr.dto; | ||
|
||
public record NewUserDto(String firstname, String lastname, String email) { | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,50 @@ describe('Team management tests', () => { | |
}); | ||
}); | ||
|
||
describe('invite members', () => { | ||
it('invite two members', () => { | ||
const mailUserClaudia = uniqueSuffix('claudia.meier@test') + '.ch'; | ||
const mailUserStefan = uniqueSuffix('stefan.schmidt@test') + '.ch'; | ||
const firstNameClaudia = uniqueSuffix('Claudia'); | ||
const firstNameStefan = uniqueSuffix('Stefan'); | ||
|
||
cy.getByTestId('invite-member').click(); | ||
fillOutNewUser(firstNameClaudia, 'Meier', mailUserClaudia); | ||
cy.tabForward(); | ||
cy.tabForward(); | ||
cy.realPress('Enter'); | ||
fillOutNewUser(firstNameStefan, 'Schmidt', mailUserStefan); | ||
cy.tabForward(); | ||
cy.tabForward(); | ||
cy.realPress('Enter'); | ||
|
||
// test error messages | ||
fillOutNewUser('Robin', '', 'papierer'); | ||
cy.getByTestId('invite').click(); | ||
cy.contains('Angabe benötigt'); | ||
cy.contains('E-Mail ungültig'); | ||
cy.getByTestId('email-col_2').focus(); | ||
cy.realType('@puzzle.ch'); | ||
cy.contains('E-Mail ungültig').should('not.exist'); | ||
cy.contains('E-Mail existiert bereits'); | ||
cy.tabBackward(); | ||
cy.realType('Papirer'); | ||
cy.contains('Angabe benötigt').should('not.exist'); | ||
|
||
// delete last entry | ||
cy.tabForward(); | ||
cy.tabForward(); | ||
cy.realPress('Enter'); | ||
cy.contains('[email protected]').should('not.exist'); | ||
|
||
// save | ||
cy.getByTestId('invite').click(); | ||
cy.contains('Die Members wurden erfolgreich registriert'); | ||
cy.contains(firstNameClaudia); | ||
cy.contains(firstNameStefan); | ||
}); | ||
}); | ||
|
||
it('Navigate to Bobs profile and add him to BBT and LoremIpsum', () => { | ||
cy.intercept('PUT', '**/updateaddteammembership/*').as('updateEsha'); | ||
|
||
|
@@ -202,7 +246,7 @@ describe('Team management tests', () => { | |
cy.getByTestId('edit-okr-champion-checkbox').click(); | ||
cy.getByTestId('edit-okr-champion-readonly').contains('OKR Champion:'); | ||
cy.getByTestId('edit-okr-champion-readonly').contains('Ja'); | ||
cy.contains('Der User wurde erfolgreich aktualisiert.'); | ||
cy.contains('Der Member wurde erfolgreich aktualisiert.'); | ||
|
||
// reset okr champion to false | ||
cy.getByTestId('edit-okr-champion-edit').click(); | ||
|
@@ -362,3 +406,11 @@ function navigateToUser(userName: string) { | |
cy.get('td').contains(userName).click(); | ||
cy.wait('@getUser'); | ||
} | ||
|
||
function fillOutNewUser(firstname: string, lastname: string, email: string) { | ||
cy.realType(firstname, { delay: 1 }); | ||
cy.tabForward(); | ||
cy.realType(lastname, { delay: 1 }); | ||
cy.tabForward(); | ||
cy.realType(email, { delay: 1 }); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface NewUser { | ||
firstname: string; | ||
lastname: string; | ||
email: string; | ||
} |
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,5 @@ | ||
export interface NewUserForm<T> { | ||
firstname: T; | ||
email: T; | ||
lastname: T; | ||
} |
41 changes: 41 additions & 0 deletions
41
frontend/src/app/team-management/invite-user-dialog/invite-user-dialog.component.html
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 @@ | ||
<section mat-dialog-title> | ||
<div class="d-flex justify-content-between align-items-center position-relative dialog-header mt-1"> | ||
<span class="title w-100 mb-2"> | ||
<span>Members registrieren</span> | ||
</span> | ||
</div> | ||
</section> | ||
<mat-dialog-content> | ||
<div class="dialog-content" tabindex="-1"> | ||
<form> | ||
@for (userFormGroup of form.controls; track $index) { | ||
<div class="w-100 d-flex justify-content-between align-items-center pe-4"> | ||
<app-new-user | ||
(removeUser)="removeUser($index)" | ||
[index]="$index" | ||
[userFormGroup]="userFormGroup" | ||
[triedToSubmit]="triedToSubmit" | ||
></app-new-user> | ||
</div> | ||
} | ||
<div class="w-100 d-flex justify-content-start"> | ||
<button (click)="addUser()" class="px-0 mb-3 pe-2 align-new-icon" color="primary" mat-button> | ||
<span class="d-flex align-items-center fw-bold add-text"> | ||
<img alt="Add User button" class="add-cross-button" src="/assets/icons/new-icon.svg" /> | ||
Weiterer Member hinzufügen | ||
</span> | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</mat-dialog-content> | ||
<mat-dialog-actions> | ||
<div class="d-flex justify-content-between p-0 mt-2" mat-dialog-actions> | ||
<div class="d-flex p-0"> | ||
<button color="primary" [attr.data-testId]="'invite'" mat-flat-button type="submit" (click)="registerUsers()"> | ||
Einladen | ||
</button> | ||
<button color="primary" mat-button mat-dialog-close class="ms-2">Abbrechen</button> | ||
</div> | ||
</div> | ||
</mat-dialog-actions> |
Empty file.
Oops, something went wrong.