Skip to content

Commit

Permalink
fixing enum
Browse files Browse the repository at this point in the history
  • Loading branch information
wrt95 committed Feb 6, 2024
1 parent d4aad18 commit 186e71c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/testing/playwright/enum/Language.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export enum Language {
NORWEGIAN = 'Norsk',
Norwegian = 'Norsk',
}
2 changes: 1 addition & 1 deletion frontend/testing/playwright/pages/LoginPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class LoginPage extends BasePage {
}

public async clickOnNorwegianLanguageOption(): Promise<void> {
await this.page.getByRole('menuitem', { name: Language.NORWEGIAN }).click();
await this.page.getByRole('menuitem', { name: Language.Norwegian }).click();
}

public async addSessionToSharableStorage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ test('That it is not possible to login with invalid credentials', async ({

const lang = await loginPage.getLanguage();

if (lang !== Language.NORWEGIAN) {
if (lang !== Language.Norwegian) {
await loginPage.clickOnLanguageMenu();
await loginPage.clickOnNorwegianLanguageOption();

const langAfterchange = await loginPage.getLanguage();
expect(langAfterchange).toBe(Language.NORWEGIAN);
expect(langAfterchange).toBe(Language.Norwegian);
} else {
expect(lang).toBe(Language.NORWEGIAN);
expect(lang).toBe(Language.Norwegian);
}

await loginPage.writeUsername(process.env.PLAYWRIGHT_USER);
Expand Down

0 comments on commit 186e71c

Please sign in to comment.