Skip to content

Commit 3f58d09

Browse files
committed
refactor: clean up test imports and formatting for consistency
- Updated import statements in multiple E2E test files to ensure consistent usage of the Playwright test library. - Improved code readability by formatting the assertion in the notification web push test for better clarity. - Enhanced maintainability of test files by aligning import structures across different test cases.
1 parent b862e1a commit 3f58d09

5 files changed

Lines changed: 9 additions & 5 deletions

apps/api/src/test/notification-webpush.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,9 @@ describe('notification web push (API integration)', () => {
395395
}
396396
expect(firstArg).toHaveLength(2);
397397
expect(firstArg).toEqual(expect.arrayContaining([ownerId, otherUser.id]));
398-
expect(vi.mocked(webPush.sendNotification)).toHaveBeenCalledTimes(ownerSubCount + otherSubCount);
398+
expect(vi.mocked(webPush.sendNotification)).toHaveBeenCalledTimes(
399+
ownerSubCount + otherSubCount
400+
);
399401
await deleteAllWebPushSubscriptionsForUser(ownerId);
400402
await deleteAllWebPushSubscriptionsForUser(otherUser.id);
401403
listSpy.mockRestore();

apps/management-web/e2e/bucket-detail-url-state-contract.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { expect, test } from '@playwright/test';
21
import type { Page } from '@playwright/test';
32

3+
import { expect, test } from '@playwright/test';
4+
45
import { loginAsManagementSuperAdmin } from './helpers/advancedFixtures';
56
import { actionAndCapture, capturePageLoad } from './helpers/stepScreenshots';
67
import { setE2EUserContext } from './helpers/userContext';

apps/management-web/e2e/user-detail-limited-admin-users-read.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { expect, test } from '@playwright/test';
22

33
import { loginAsLimitedAdmin } from './helpers/advancedFixtures';
44
import { expectInvalidRouteShowsNotFound } from './helpers/flowHelpers';
5-
import { actionAndCapture, capturePageLoad } from './helpers/stepScreenshots';
65
import { E2E_NONEXISTENT_ENTITY_ID } from './helpers/seedConstants';
6+
import { actionAndCapture, capturePageLoad } from './helpers/stepScreenshots';
77
import { setE2EUserContext } from './helpers/userContext';
88

99
const E2E_MAIN_USER_ID = '11111111-1111-4111-a111-111111111111';

apps/management-web/e2e/user-detail-super-admin-full-crud.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { expect, test } from '@playwright/test';
22

33
import { loginAsManagementSuperAdmin } from './helpers/advancedFixtures';
44
import { expectInvalidRouteShowsNotFound } from './helpers/flowHelpers';
5-
import { actionAndCapture, capturePageLoad } from './helpers/stepScreenshots';
65
import { E2E_NONEXISTENT_ENTITY_ID } from './helpers/seedConstants';
6+
import { actionAndCapture, capturePageLoad } from './helpers/stepScreenshots';
77
import { setE2EUserContext } from './helpers/userContext';
88

99
const E2E_MAIN_USER_ID = '11111111-1111-4111-a111-111111111111';

apps/web/e2e/bucket-detail-url-state-contract.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { expect, test } from '@playwright/test';
21
import type { Page } from '@playwright/test';
32

3+
import { expect, test } from '@playwright/test';
4+
45
import { loginAsWebE2EUserAndExpectDashboard } from './helpers/advancedFixtures';
56
import { actionAndCapture, capturePageLoad } from './helpers/stepScreenshots';
67
import { setE2EUserContext } from './helpers/userContext';

0 commit comments

Comments
 (0)