-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dashboard): reset all atoms on organisation change (#1717)
* fix(dashboard): reset all atoms on organisation change * add new test
- Loading branch information
1 parent
2cb3513
commit 6b0c9f8
Showing
3 changed files
with
34 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,4 +103,21 @@ test("Person creation", async ({ page }) => { | |
await expect(page).toHaveURL("http://localhost:8090/person"); | ||
|
||
await expect(page.getByRole("cell", { name: person1Name })).toBeVisible(); | ||
|
||
await test.step("Login with user from other organisation should clear the cache", async () => { | ||
await page.getByRole("button", { name: "User Admin Test - 5" }).click(); | ||
await page.getByRole("menuitem", { name: "Se déconnecter et vider le cache" }).click(); | ||
await expect(page).toHaveURL("http://localhost:8090/auth"); | ||
|
||
await page.getByLabel("Email").fill("[email protected]"); | ||
await page.getByLabel("Mot de passe").fill("secret"); | ||
await page.getByRole("button", { name: "Se connecter" }).click(); | ||
await page.getByLabel("Clé de chiffrement d'organisation").fill("plouf"); | ||
await page.getByRole("button", { name: "Se connecter" }).click(); | ||
await expect(page).toHaveURL("http://localhost:8090/reception?calendarTab=2"); | ||
await page.getByRole("link", { name: "Personnes suivies" }).click(); | ||
await expect(page).toHaveURL("http://localhost:8090/person"); | ||
|
||
await expect(page.getByRole("cell", { name: person1Name })).not.toBeVisible(); | ||
}); | ||
}); |