From 2d825b690272b5138486e6a15330b8498406eb51 Mon Sep 17 00:00:00 2001 From: giancarlo Date: Wed, 24 Apr 2024 20:17:04 +0700 Subject: [PATCH] Refactor invitations.spec.ts for consistency Altered import order and formatting in the invitations.spec.ts file. Additionally, the text used for member-role-badge assertion tests has been capitalized to match the correct output. All changes were made to improve code readability and testing accuracy. --- .../e2e/tests/invitations/invitations.spec.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/e2e/tests/invitations/invitations.spec.ts b/apps/e2e/tests/invitations/invitations.spec.ts index 6815c229c..b71c1a4e8 100644 --- a/apps/e2e/tests/invitations/invitations.spec.ts +++ b/apps/e2e/tests/invitations/invitations.spec.ts @@ -1,4 +1,5 @@ -import { expect, Page, test } from '@playwright/test'; +import { Page, expect, test } from '@playwright/test'; + import { InvitationsPageObject } from './invitations.po'; test.describe('Invitations', () => { @@ -21,7 +22,7 @@ test.describe('Invitations', () => { const invites = [ { email, - role: 'member' + role: 'member', }, ]; @@ -43,7 +44,7 @@ test.describe('Invitations', () => { const invites = [ { email, - role: 'member' + role: 'member', }, ]; @@ -55,7 +56,9 @@ test.describe('Invitations', () => { const row = invitations.getInvitationRow(email); - await expect(row.locator('[data-test="member-role-badge"]')).toHaveText('owner'); + await expect(row.locator('[data-test="member-role-badge"]')).toHaveText( + 'Owner', + ); }); }); @@ -77,11 +80,11 @@ test.describe('Full Invitation Flow', () => { const invites = [ { email: invitations.auth.createRandomEmail(), - role: 'member' + role: 'member', }, { email: invitations.auth.createRandomEmail(), - role: 'member' + role: 'member', }, ]; @@ -89,7 +92,7 @@ test.describe('Full Invitation Flow', () => { const firstEmail = invites[0]!.email; - await expect(await invitations.getInvitations()).toHaveCount(2) + await expect(await invitations.getInvitations()).toHaveCount(2); // sign out and sign in with the first email await invitations.auth.signOut(); @@ -101,7 +104,7 @@ test.describe('Full Invitation Flow', () => { await invitations.auth.signUp({ email: firstEmail, password: 'password', - repeatPassword: 'password' + repeatPassword: 'password', }); await invitations.auth.visitConfirmEmailLink(firstEmail);