From 1c01d544a2b7cb231b9470a7424109d8096d5f38 Mon Sep 17 00:00:00 2001 From: alter-eggo Date: Tue, 20 Jun 2023 18:23:25 +0400 Subject: [PATCH] feat: migrate profile legacy test, closes #3709 --- playwright.config.ts | 5 + .../components/update-action.layout.tsx | 4 +- test-app/src/components/profile.tsx | 6 +- .../profile/profile-updating.selector.ts | 4 - .../integration/profile/profile.spec.ts | 110 ------------------ .../page-objects/profile-updating.page.ts | 30 ----- .../profile-updating.page.ts | 17 +++ tests/page-object-models/test-app.page.ts | 36 ++++++ .../selectors/test-app.selectors.ts | 4 +- tests/specs/profile/profile.spec.ts | 76 ++++++++++++ 10 files changed, 142 insertions(+), 150 deletions(-) delete mode 100644 tests-legacy/integration/profile/profile-updating.selector.ts delete mode 100644 tests-legacy/integration/profile/profile.spec.ts delete mode 100644 tests-legacy/page-objects/profile-updating.page.ts create mode 100644 tests/page-object-models/profile-updating.page.ts create mode 100644 tests/page-object-models/test-app.page.ts rename tests-legacy/integration/profile/profile-test-app.selectors.ts => tests/selectors/test-app.selectors.ts (51%) create mode 100644 tests/specs/profile/profile.spec.ts diff --git a/playwright.config.ts b/playwright.config.ts index b129066f..f0cc574b 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -23,4 +23,9 @@ export default defineConfig({ use: { ...devices['Desktop Chrome'] }, }, ], + webServer: { + command: 'yarn dev:test-app', + port: 3000, + timeout: 15000, + }, }); diff --git a/src/app/pages/update-profile-request/components/update-action.layout.tsx b/src/app/pages/update-profile-request/components/update-action.layout.tsx index f526bce9..0fc363ec 100644 --- a/src/app/pages/update-profile-request/components/update-action.layout.tsx +++ b/src/app/pages/update-profile-request/components/update-action.layout.tsx @@ -1,5 +1,5 @@ import { Button, Stack } from '@stacks/ui'; -import { ProfileUpdatingSelectors } from '@tests-legacy/integration/profile/profile-updating.selector'; +import { TestAppSelectors } from '@tests/selectors/test-app.selectors'; interface UpdateActionProfileProps { onUpdateProfile: () => Promise; @@ -18,7 +18,7 @@ export function UpdateActionLayout({ Cancel