Skip to content

Commit d6ebe4c

Browse files
authored
fix: fix signout (#2437)
* fix signout * fix signout * fix signout
1 parent 5dd743c commit d6ebe4c

File tree

4 files changed

+34
-35
lines changed

4 files changed

+34
-35
lines changed

e2e-tests/playwright/e2e/authProviders/basic-authentication.spec.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ test.describe("Standard authentication providers: Basic authentication", () => {
5151

5252
// Guest login should work
5353
await common.loginAsGuest();
54-
await page.goto("/");
55-
await uiHelper.openSidebar("Settings");
54+
await page.goto("/settings");
5655
await common.signOut();
5756
});
5857

@@ -125,15 +124,15 @@ test.describe("Standard authentication providers: Basic authentication", () => {
125124
constants.AZURE_LOGIN_PASSWORD,
126125
);
127126

128-
await uiHelper.openSidebar("Settings");
127+
await page.goto("/settings");
129128
await uiHelper.verifyParagraph(constants.AZURE_LOGIN_USERNAME);
130129

131130
// check no entities are in the catalog
132131
const api = new APIHelper();
133132
api.UseStaticToken(constants.STATIC_API_TOKEN);
134133
const catalogUsers = await api.getAllCatalogUsersFromAPI();
135134
expect(catalogUsers.totalItems).toBe(0);
136-
await uiHelper.openSidebar("Settings");
135+
await page.goto("/settings");
137136
await common.signOut();
138137
});
139138

e2e-tests/playwright/e2e/authProviders/github-provider.spec.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ test.describe("Standard authentication providers: Github Provider", () => {
117117
timeout: 90 * 1000,
118118
});
119119

120-
await uiHelper.openSidebar("Settings");
120+
await page.goto("/settings");
121121
await common.signOut();
122122
});
123123

@@ -242,7 +242,7 @@ test.describe("Standard authentication providers: Github Provider", () => {
242242
constants.GH_USER_PASSWORD,
243243
constants.AUTH_PROVIDERS_GH_USER_2FA,
244244
);
245-
await uiHelper.openSidebar("Settings");
245+
await page.goto("/settings");
246246
await common.signOut();
247247
await context.clearCookies();
248248
});
@@ -293,7 +293,7 @@ test.describe("Standard authentication providers: Github Provider", () => {
293293
});
294294
});
295295

296-
test("Move a user to another group in Github", async () => {
296+
test.skip("Move a user to another group in Github", async () => {
297297
test.setTimeout(300 * 1000);
298298

299299
// move a user to another group -> ensure user can still login
@@ -339,7 +339,7 @@ test.describe("Standard authentication providers: Github Provider", () => {
339339
timeout: 90 * 1000,
340340
});
341341

342-
await uiHelper.openSidebar("Settings");
342+
await page.goto("/settings");
343343
await common.signOut();
344344

345345
await waitForNextSync("github", syncTime);
@@ -384,7 +384,7 @@ test.describe("Standard authentication providers: Github Provider", () => {
384384
timeout: 60 * 1000,
385385
});
386386

387-
await uiHelper.openSidebar("Settings");
387+
await page.goto("/settings");
388388
await common.signOut();
389389
await context.clearCookies();
390390
});
@@ -452,7 +452,7 @@ test.describe("Standard authentication providers: Github Provider", () => {
452452
timeout: 30 * 1000,
453453
});
454454

455-
await uiHelper.openSidebar("Settings");
455+
await page.goto("/settings");
456456
await common.signOut();
457457
await context.clearCookies();
458458
});
@@ -530,7 +530,7 @@ test.describe("Standard authentication providers: Github Provider", () => {
530530
constants.GH_TEAMS["team_2"].name + "_renamed",
531531
);
532532

533-
await uiHelper.openSidebar("Settings");
533+
await page.goto("/settings");
534534
// user should see the entities again
535535
await expect(async () => {
536536
await page.reload();
@@ -549,7 +549,7 @@ test.describe("Standard authentication providers: Github Provider", () => {
549549
constants.GH_TEAMS["team_2"].name + "_renamed",
550550
);
551551

552-
await uiHelper.openSidebar("Settings");
552+
await page.goto("/settings");
553553
await common.signOut();
554554
await context.clearCookies();
555555
});

e2e-tests/playwright/e2e/authProviders/microsoft-provider.spec.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ test.describe("Standard authentication providers: Micorsoft Azure EntraID", () =
135135
timeout: 90 * 1000,
136136
});
137137

138-
await uiHelper.openSidebar("Settings");
138+
await page.goto("/settings");
139139
await common.signOut();
140140
await context.clearCookies();
141141
});
@@ -299,7 +299,7 @@ test.describe("Standard authentication providers: Micorsoft Azure EntraID", () =
299299
});
300300
});
301301

302-
test("Move a user to another group in Microsoft EntraID", async () => {
302+
test.skip("Move a user to another group in Microsoft EntraID", async () => {
303303
test.setTimeout(300 * 1000);
304304
// move a user to another group -> user can still login
305305
// move user_2 to location_admin
@@ -342,7 +342,7 @@ test.describe("Standard authentication providers: Micorsoft Azure EntraID", () =
342342
timeout: 120 * 1000,
343343
});
344344

345-
await uiHelper.openSidebar("Settings");
345+
await page.goto("/settings");
346346
await common.signOut();
347347
await context.clearCookies(); // If we don't clear cookies, Microsoft Login popup will present the last logger user
348348

@@ -395,7 +395,7 @@ test.describe("Standard authentication providers: Micorsoft Azure EntraID", () =
395395
timeout: 120 * 1000,
396396
});
397397

398-
await uiHelper.openSidebar("Settings");
398+
await page.goto("/settings");
399399
await common.signOut();
400400
await context.clearCookies(); // If we don't clear cookies, Microsoft Login popup will present the last logger user
401401
});
@@ -429,7 +429,7 @@ test.describe("Standard authentication providers: Micorsoft Azure EntraID", () =
429429
constants.RHSSO76_DEFAULT_PASSWORD,
430430
);
431431

432-
await uiHelper.openSidebar("Settings");
432+
await page.goto("/settings");
433433
await common.signOut();
434434
await context.clearCookies(); // If we don't clear cookies, Microsoft Login popup will present the last logger user
435435

@@ -469,7 +469,7 @@ test.describe("Standard authentication providers: Micorsoft Azure EntraID", () =
469469
timeout: 30 * 1000,
470470
});
471471

472-
await uiHelper.openSidebar("Settings");
472+
await page.goto("/settings");
473473
await common.signOut();
474474
await context.clearCookies(); // If we don't clear cookies, Microsoft Login popup will present the last logger user
475475
});
@@ -531,7 +531,7 @@ test.describe("Standard authentication providers: Micorsoft Azure EntraID", () =
531531
constants.RHSSO76_DEFAULT_PASSWORD,
532532
);
533533

534-
await uiHelper.openSidebar("Settings");
534+
await page.goto("/settings");
535535
await common.signOut();
536536
await context.clearCookies(); // If we don't clear cookies, Microsoft Login popup will present the last logger user
537537
});
@@ -566,7 +566,7 @@ test.describe("Standard authentication providers: Micorsoft Azure EntraID", () =
566566
constants.RHSSO76_DEFAULT_PASSWORD,
567567
);
568568

569-
await uiHelper.openSidebar("Settings");
569+
await page.goto("/settings");
570570
await common.signOut();
571571
await context.clearCookies();
572572

@@ -655,7 +655,7 @@ test.describe("Standard authentication providers: Micorsoft Azure EntraID", () =
655655
constants.MSGRAPH_GROUPS["group_6"].displayName + "_renamed",
656656
);
657657

658-
await uiHelper.openSidebar("Settings");
658+
await page.goto("/settings");
659659
// user should see the entities again
660660
await expect(async () => {
661661
await page.reload();
@@ -674,7 +674,7 @@ test.describe("Standard authentication providers: Micorsoft Azure EntraID", () =
674674
constants.MSGRAPH_GROUPS["group_6"].displayName + "_renamed",
675675
);
676676

677-
await uiHelper.openSidebar("Settings");
677+
await page.goto("/settings");
678678
await common.signOut();
679679
await context.clearCookies(); // If we don't clear cookies, Microsoft Login popup will present the last logger user
680680
});

e2e-tests/playwright/e2e/authProviders/rhsso-76-provider.spec.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ for (const version of ["RHBK"]) {
120120
constants.RHSSO76_USERS["user_1"].username,
121121
constants.RHSSO76_DEFAULT_PASSWORD,
122122
);
123-
await uiHelper.openSidebar("Settings");
123+
await page.goto("/settings");
124124
await uiHelper.verifyHeading(
125125
await rhssoHelper.getRHSSOUserDisplayName(
126126
constants.RHSSO76_USERS["user_1"],
@@ -184,7 +184,7 @@ for (const version of ["RHBK"]) {
184184
constants.RHSSO76_USERS["user_1"].username,
185185
constants.RHSSO76_DEFAULT_PASSWORD,
186186
);
187-
await uiHelper.openSidebar("Settings");
187+
await page.goto("/settings");
188188
await uiHelper.verifyHeading(
189189
await rhssoHelper.getRHSSOUserDisplayName(
190190
constants.RHSSO76_USERS["user_1"],
@@ -241,7 +241,7 @@ for (const version of ["RHBK"]) {
241241
constants.RHSSO76_USERS["user_1"].username,
242242
constants.RHSSO76_DEFAULT_PASSWORD,
243243
);
244-
await uiHelper.openSidebar("Settings");
244+
await page.goto("/settings");
245245
await uiHelper.verifyHeading(
246246
rhssoHelper.getRHSSOUserDisplayName(constants.RHSSO76_USERS["user_1"]),
247247
);
@@ -252,7 +252,7 @@ for (const version of ["RHBK"]) {
252252
constants.RHSSO76_USERS["jenny_doe"].username,
253253
constants.RHSSO76_DEFAULT_PASSWORD,
254254
);
255-
await uiHelper.openSidebar("Settings");
255+
await page.goto("/settings");
256256
await uiHelper.verifyHeading(
257257
rhssoHelper.getRHSSOUserDisplayName(
258258
constants.RHSSO76_USERS["jenny_doe"],
@@ -265,7 +265,7 @@ for (const version of ["RHBK"]) {
265265
constants.RHSSO76_USERS["user_2"].username,
266266
constants.RHSSO76_DEFAULT_PASSWORD,
267267
);
268-
await uiHelper.openSidebar("Settings");
268+
await page.goto("/settings");
269269
await uiHelper.verifyHeading(
270270
rhssoHelper.getRHSSOUserDisplayName(constants.RHSSO76_USERS["user_2"]),
271271
);
@@ -405,7 +405,7 @@ for (const version of ["RHBK"]) {
405405
});
406406
});
407407

408-
test(`${version} - move a user to another group in ${version}`, async () => {
408+
test.skip(`${version} - move a user to another group in ${version}`, async () => {
409409
test.setTimeout(300 * 1000);
410410
LOGGER.info(`Executing testcase: ${test.info().title}`);
411411

@@ -445,7 +445,7 @@ for (const version of ["RHBK"]) {
445445
expect(statusBefore).toBe(403);
446446

447447
// logout
448-
await uiHelper.openSidebar("Settings");
448+
await page.goto("/settings");
449449
await common.signOut();
450450
}).toPass({
451451
intervals: [1_000, 2_000, 5_000],
@@ -499,7 +499,7 @@ for (const version of ["RHBK"]) {
499499
timeout: 60 * 1000,
500500
});
501501

502-
await uiHelper.openSidebar("Settings");
502+
await page.goto("/settings");
503503
await common.signOut();
504504
});
505505

@@ -518,7 +518,7 @@ for (const version of ["RHBK"]) {
518518
constants.RHSSO76_DEFAULT_PASSWORD,
519519
);
520520

521-
await uiHelper.openSidebar("Settings");
521+
await page.goto("/settings");
522522
await common.signOut();
523523

524524
// group_4 should exist in rhdh
@@ -572,7 +572,7 @@ for (const version of ["RHBK"]) {
572572
timeout: 30 * 1000,
573573
});
574574

575-
await uiHelper.openSidebar("Settings");
575+
await page.goto("/settings");
576576
await common.signOut();
577577
});
578578

@@ -626,7 +626,7 @@ for (const version of ["RHBK"]) {
626626
constants.RHSSO76_DEFAULT_PASSWORD,
627627
);
628628

629-
await uiHelper.openSidebar("Settings");
629+
await page.goto("/settings");
630630
await common.signOut();
631631
});
632632

@@ -722,7 +722,7 @@ for (const version of ["RHBK"]) {
722722
constants.RHSSO76_GROUPS["group_2"].name + "_renamed",
723723
);
724724

725-
await uiHelper.openSidebar("Settings");
725+
await page.goto("/settings");
726726
// user should see the entities again
727727
await expect(async () => {
728728
await page.reload();
@@ -742,7 +742,7 @@ for (const version of ["RHBK"]) {
742742
constants.RHSSO76_GROUPS["group_2"].name + "_renamed",
743743
);
744744

745-
await uiHelper.openSidebar("Settings");
745+
await page.goto("/settings");
746746
await common.signOut();
747747
});
748748

0 commit comments

Comments
 (0)