@@ -2,53 +2,12 @@ import { faker } from '@faker-js/faker'
22import type { Page } from '@playwright/test'
33import { expect } from '@playwright/test'
44
5- // Retrieve frontend URL from environment variables (see playwright.config.ts)
6- export const clientURL = process . env . KEYCLOAK_REDIRECT_URI || 'http://change-me'
7-
8- export interface Credentials {
9- username : string
10- password : string
11- email : string
12- }
13-
14- // Users referenced in Keycloak dev realm (../keycloak/realms/realm-dev.json)
15- export const adminUser : Credentials = {
16- username : 'admin' ,
17- password : 'admin' ,
18- 19- }
20- export const testUser : Credentials = {
21- username : 'test' ,
22- password : 'test' ,
23- 24- }
25- export const cnolletUser : Credentials = {
26- username : 'cnollet' ,
27- password : 'test' ,
28- 29- }
30-
315interface Resources {
326 cpu : number
337 gpu : number
348 memory : number
359}
3610
37- export async function signInCloudPiNative ( {
38- page,
39- credentials,
40- } : {
41- page : Page
42- credentials : Credentials
43- } ) {
44- const { username, password } = credentials
45- await page . getByRole ( 'link' , { name : 'Se connecter' } ) . click ( )
46- await page . getByRole ( 'textbox' , { name : 'Username or email' } ) . fill ( username )
47- await page . getByRole ( 'textbox' , { name : 'Password' } ) . fill ( password )
48- await page . getByRole ( 'button' , { name : 'Sign In' } ) . click ( )
49- await expect ( page . locator ( '#top' ) ) . toContainText ( 'Cloud π Native' )
50- }
51-
5211// Assuming we are on the Home page, create a random project with given name, or a generated one
5312export async function addProject ( {
5413 page,
0 commit comments