playwright: Add check to ensure test is authenticated
In order to fix the flakiness in cockpit plugin tests introduced by the single login, the tests need a check if they are authenticated at the start of their execution and relog in case the session expired.
This commit is contained in:
parent
0597541af2
commit
0319c81b41
9 changed files with 98 additions and 21 deletions
|
|
@ -3,6 +3,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|||
|
||||
import { test } from '../fixtures/customizations';
|
||||
import { isHosted } from '../helpers/helpers';
|
||||
import { ensureAuthenticated } from '../helpers/login';
|
||||
import {
|
||||
navigateToOptionalSteps,
|
||||
ibFrame,
|
||||
|
|
@ -27,6 +28,8 @@ test('Create a blueprint with Kernel customization', async ({
|
|||
// Delete the blueprint after the run fixture
|
||||
await cleanup.add(() => deleteBlueprint(page, blueprintName));
|
||||
|
||||
await ensureAuthenticated(page);
|
||||
|
||||
// Navigate to IB landing page and get the frame
|
||||
await navigateToLandingPage(page);
|
||||
const frame = await ibFrame(page);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue