Fix IDP tests with additional cleanup (#3191)
This commit is contained in:
parent
de8258a4af
commit
821085935f
2 changed files with 15 additions and 1 deletions
|
@ -234,7 +234,14 @@ describe("User creation", () => {
|
|||
]);
|
||||
});
|
||||
|
||||
after(() => adminClient.deleteUser(usernameIdpLinksTest));
|
||||
after(async () => {
|
||||
await adminClient.deleteUser(usernameIdpLinksTest);
|
||||
await Promise.all(
|
||||
identityProviders.map((idp) =>
|
||||
adminClient.deleteIdentityProvider(idp.alias)
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
usersPage.goToUserListTab().goToUserDetailsPage(usernameIdpLinksTest);
|
||||
|
|
|
@ -200,6 +200,13 @@ class AdminClient {
|
|||
});
|
||||
}
|
||||
|
||||
async deleteIdentityProvider(idpAlias: string) {
|
||||
await this.login();
|
||||
await this.client.identityProviders.del({
|
||||
alias: idpAlias,
|
||||
});
|
||||
}
|
||||
|
||||
async unlinkAccountIdentityProvider(
|
||||
username: string,
|
||||
idpDisplayName: string
|
||||
|
|
Loading…
Reference in a new issue