diff --git a/system-tests/src/tests/add-regrading.spec.ts b/system-tests/src/tests/admin/add-regrading.spec.ts similarity index 100% rename from system-tests/src/tests/add-regrading.spec.ts rename to system-tests/src/tests/admin/add-regrading.spec.ts diff --git a/system-tests/src/tests/exercise-service.spec.ts b/system-tests/src/tests/admin/exercise-service.spec.ts similarity index 92% rename from system-tests/src/tests/exercise-service.spec.ts rename to system-tests/src/tests/admin/exercise-service.spec.ts index 00432ec55b4e..e3a6289b1ebc 100644 --- a/system-tests/src/tests/exercise-service.spec.ts +++ b/system-tests/src/tests/admin/exercise-service.spec.ts @@ -1,7 +1,7 @@ import { expect, Page, test } from "@playwright/test" -import expectUrlPathWithRandomUuid from "../utils/expect" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import expectUrlPathWithRandomUuid from "@/utils/expect" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/playground-views.test.ts b/system-tests/src/tests/admin/playground.spec.ts similarity index 97% rename from system-tests/src/tests/playground-views.test.ts rename to system-tests/src/tests/admin/playground.spec.ts index e3859242ec04..c7467619ff07 100644 --- a/system-tests/src/tests/playground-views.test.ts +++ b/system-tests/src/tests/admin/playground.spec.ts @@ -1,6 +1,6 @@ import { test } from "@playwright/test" -import { scrollLocatorsParentIframeToViewIfNeeded } from "../utils/iframeLocators" +import { scrollLocatorsParentIframeToViewIfNeeded } from "@/utils/iframeLocators" test("Playground views works", async ({ page }) => { await page.goto("http://project-331.local/playground-views") diff --git a/system-tests/src/tests/langs/langs.spec.ts b/system-tests/src/tests/api/langs.spec.ts similarity index 95% rename from system-tests/src/tests/langs/langs.spec.ts rename to system-tests/src/tests/api/langs.spec.ts index d673bd087198..b536d15528d2 100644 --- a/system-tests/src/tests/langs/langs.spec.ts +++ b/system-tests/src/tests/api/langs.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" test.use({ storageState: "src/states/langs@example.com.json", diff --git a/system-tests/src/tests/login/login.spec.ts b/system-tests/src/tests/authentication/login.spec.ts similarity index 98% rename from system-tests/src/tests/login/login.spec.ts rename to system-tests/src/tests/authentication/login.spec.ts index 6b76d1e9093b..f06418d96109 100644 --- a/system-tests/src/tests/login/login.spec.ts +++ b/system-tests/src/tests/authentication/login.spec.ts @@ -6,7 +6,7 @@ import { test, } from "@playwright/test" -import { logout } from "../../utils/logout" +import { logout } from "@/utils/logout" test.describe("Login session with Playwright", () => { /// Login state to use diff --git a/system-tests/src/tests/user-research-consent.spec.ts b/system-tests/src/tests/authentication/research-consent.spec.ts similarity index 96% rename from system-tests/src/tests/user-research-consent.spec.ts rename to system-tests/src/tests/authentication/research-consent.spec.ts index d38ce4f1714a..a4696fa9b152 100644 --- a/system-tests/src/tests/user-research-consent.spec.ts +++ b/system-tests/src/tests/authentication/research-consent.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test("Research consent form is visible on login, if not yet answered", async ({ page, diff --git a/system-tests/src/tests/certificates/configure-certificate.test.ts b/system-tests/src/tests/course-features/certificates/configure-certificate.spec.ts similarity index 97% rename from system-tests/src/tests/certificates/configure-certificate.test.ts rename to system-tests/src/tests/course-features/certificates/configure-certificate.spec.ts index c8c128b15fcd..09fdd4730266 100644 --- a/system-tests/src/tests/certificates/configure-certificate.test.ts +++ b/system-tests/src/tests/course-features/certificates/configure-certificate.spec.ts @@ -1,6 +1,6 @@ import { test } from "@playwright/test" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/certificates/generate-certificate.test.ts b/system-tests/src/tests/course-features/certificates/generate-certificate.spec.ts similarity index 91% rename from system-tests/src/tests/certificates/generate-certificate.test.ts rename to system-tests/src/tests/course-features/certificates/generate-certificate.spec.ts index 9ac6560e43a9..38ee659dfd3b 100644 --- a/system-tests/src/tests/certificates/generate-certificate.test.ts +++ b/system-tests/src/tests/course-features/certificates/generate-certificate.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/suspected-cheaters.spec.ts b/system-tests/src/tests/course-features/cheating-detection/manage.spec.ts similarity index 98% rename from system-tests/src/tests/suspected-cheaters.spec.ts rename to system-tests/src/tests/course-features/cheating-detection/manage.spec.ts index 2364aa1f4e26..90faa1ae82c6 100644 --- a/system-tests/src/tests/suspected-cheaters.spec.ts +++ b/system-tests/src/tests/course-features/cheating-detection/manage.spec.ts @@ -1,6 +1,6 @@ import { BrowserContext, expect, test } from "@playwright/test" -import { answerExercise } from "./peer-reviews/peer_review_utils" +import { answerExercise } from "@/tests/exercises/peer-reviews/peer-review-utils" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/code-giveaway.spec.ts b/system-tests/src/tests/course-features/code-giveaway/manage.spec.ts similarity index 100% rename from system-tests/src/tests/code-giveaway.spec.ts rename to system-tests/src/tests/course-features/code-giveaway/manage.spec.ts diff --git a/system-tests/src/tests/feedback/feedback.spec.ts b/system-tests/src/tests/course-features/feedback/give-and-manage.spec.ts similarity index 93% rename from system-tests/src/tests/feedback/feedback.spec.ts rename to system-tests/src/tests/course-features/feedback/give-and-manage.spec.ts index 23fe2a29888c..08b5e33baa9c 100644 --- a/system-tests/src/tests/feedback/feedback.spec.ts +++ b/system-tests/src/tests/course-features/feedback/give-and-manage.spec.ts @@ -1,13 +1,12 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" -import expectUrlPathWithRandomUuid from "../../utils/expect" -import { getLocatorForNthExerciseServiceIframe } from "../../utils/iframeLocators" -import { login } from "../../utils/login" -import { logout } from "../../utils/logout" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" - import { feedbackTooltipClass } from "@/shared-module/common/styles/constants" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectUrlPathWithRandomUuid from "@/utils/expect" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import { login } from "@/utils/login" +import { logout } from "@/utils/logout" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/proposed-edits/proposed-edits.spec.ts b/system-tests/src/tests/course-features/feedback/proposed-edits.spec.ts similarity index 96% rename from system-tests/src/tests/proposed-edits/proposed-edits.spec.ts rename to system-tests/src/tests/course-features/feedback/proposed-edits.spec.ts index f53c523e3aa9..19d982a0a683 100644 --- a/system-tests/src/tests/proposed-edits/proposed-edits.spec.ts +++ b/system-tests/src/tests/course-features/feedback/proposed-edits.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" -import { getLocatorForNthExerciseServiceIframe } from "../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/glossary.spec.ts b/system-tests/src/tests/course-features/glossary/manage.spec.ts similarity index 94% rename from system-tests/src/tests/glossary.spec.ts rename to system-tests/src/tests/course-features/glossary/manage.spec.ts index 5721d830a568..808e5e8b69c8 100644 --- a/system-tests/src/tests/glossary.spec.ts +++ b/system-tests/src/tests/course-features/glossary/manage.spec.ts @@ -1,8 +1,8 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" -import { waitForFooterTranslationsToLoad } from "../utils/waitingUtils" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" +import { waitForFooterTranslationsToLoad } from "@/utils/waitingUtils" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/glossary-tooltip.spec.ts b/system-tests/src/tests/course-features/glossary/tooltip.spec.ts similarity index 80% rename from system-tests/src/tests/glossary-tooltip.spec.ts rename to system-tests/src/tests/course-features/glossary/tooltip.spec.ts index f4a30079360c..b3ec14db494a 100644 --- a/system-tests/src/tests/glossary-tooltip.spec.ts +++ b/system-tests/src/tests/course-features/glossary/tooltip.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/material-reference.spec.ts b/system-tests/src/tests/course-features/references/manage.spec.ts similarity index 97% rename from system-tests/src/tests/material-reference.spec.ts rename to system-tests/src/tests/course-features/references/manage.spec.ts index 60e42e1a95da..0d4a78e12ac5 100644 --- a/system-tests/src/tests/material-reference.spec.ts +++ b/system-tests/src/tests/course-features/references/manage.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/research-form.spec.ts b/system-tests/src/tests/course-features/research-form/manage.spec.ts similarity index 95% rename from system-tests/src/tests/research-form.spec.ts rename to system-tests/src/tests/course-features/research-form/manage.spec.ts index d1aab5e1eee5..d1482d3e46f3 100644 --- a/system-tests/src/tests/research-form.spec.ts +++ b/system-tests/src/tests/course-features/research-form/manage.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/content-search.spec.ts b/system-tests/src/tests/course-features/search/content-search.spec.ts similarity index 93% rename from system-tests/src/tests/content-search.spec.ts rename to system-tests/src/tests/course-features/search/content-search.spec.ts index a8e7a021630f..bb766b4d5608 100644 --- a/system-tests/src/tests/content-search.spec.ts +++ b/system-tests/src/tests/course-features/search/content-search.spec.ts @@ -1,8 +1,8 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectUrlPathWithRandomUuid from "../utils/expect" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectUrlPathWithRandomUuid from "@/utils/expect" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/mark-as-spam.spec.ts b/system-tests/src/tests/course-features/spam-reporting/mark-as-spam.spec.ts similarity index 100% rename from system-tests/src/tests/mark-as-spam.spec.ts rename to system-tests/src/tests/course-features/spam-reporting/mark-as-spam.spec.ts diff --git a/system-tests/src/tests/creating-course-and-returning-an-exercise.spec.ts b/system-tests/src/tests/course-management/creation/create-course-with-exercise.spec.ts similarity index 97% rename from system-tests/src/tests/creating-course-and-returning-an-exercise.spec.ts rename to system-tests/src/tests/course-management/creation/create-course-with-exercise.spec.ts index bd5da5dbb525..1fc28047cb70 100644 --- a/system-tests/src/tests/creating-course-and-returning-an-exercise.spec.ts +++ b/system-tests/src/tests/course-management/creation/create-course-with-exercise.spec.ts @@ -1,11 +1,11 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectUrlPathWithRandomUuid from "../utils/expect" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectUrlPathWithRandomUuid from "@/utils/expect" import { getLocatorForNthExerciseServiceIframe, scrollLocatorsParentIframeToViewIfNeeded, -} from "../utils/iframeLocators" +} from "@/utils/iframeLocators" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/join-course-only-by-code.spec.ts b/system-tests/src/tests/course-management/enrollment/join-by-code.spec.ts similarity index 100% rename from system-tests/src/tests/join-course-only-by-code.spec.ts rename to system-tests/src/tests/course-management/enrollment/join-by-code.spec.ts diff --git a/system-tests/src/tests/course-export.spec.ts b/system-tests/src/tests/course-management/export/course-export.spec.ts similarity index 100% rename from system-tests/src/tests/course-export.spec.ts rename to system-tests/src/tests/course-management/export/course-export.spec.ts diff --git a/system-tests/src/tests/course-instance-management/add-completions.spec.ts b/system-tests/src/tests/course-management/instances/add-completions.spec.ts similarity index 95% rename from system-tests/src/tests/course-instance-management/add-completions.spec.ts rename to system-tests/src/tests/course-management/instances/add-completions.spec.ts index debb9e752715..6f24327c4304 100644 --- a/system-tests/src/tests/course-instance-management/add-completions.spec.ts +++ b/system-tests/src/tests/course-management/instances/add-completions.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from "@playwright/test" -import { downloadToString } from "../../utils/download" -import { showNextToastsInfinitely, showToastsNormally } from "../../utils/notificationUtils" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import { downloadToString } from "@/utils/download" +import { showNextToastsInfinitely, showToastsNormally } from "@/utils/notificationUtils" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/course-instance-management/add-completions.spec.ts-snapshots/manual-completion-after-posting-completions-small-desktop-chromium-linux.png b/system-tests/src/tests/course-management/instances/add-completions.spec.ts-snapshots/manual-completion-after-posting-completions-small-desktop-chromium-linux.png similarity index 100% rename from system-tests/src/tests/course-instance-management/add-completions.spec.ts-snapshots/manual-completion-after-posting-completions-small-desktop-chromium-linux.png rename to system-tests/src/tests/course-management/instances/add-completions.spec.ts-snapshots/manual-completion-after-posting-completions-small-desktop-chromium-linux.png diff --git a/system-tests/src/tests/course-instance-management/course-instance-management.spec.ts b/system-tests/src/tests/course-management/instances/course-instance-management.spec.ts similarity index 96% rename from system-tests/src/tests/course-instance-management/course-instance-management.spec.ts rename to system-tests/src/tests/course-management/instances/course-instance-management.spec.ts index 983bbafe7fda..efbe39b5f80d 100644 --- a/system-tests/src/tests/course-instance-management/course-instance-management.spec.ts +++ b/system-tests/src/tests/course-management/instances/course-instance-management.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { downloadToString } from "../../utils/download" -import { showNextToastsInfinitely, showToastsNormally } from "../../utils/notificationUtils" +import { downloadToString } from "@/utils/download" +import { showNextToastsInfinitely, showToastsNormally } from "@/utils/notificationUtils" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/change-course-language.spec.ts b/system-tests/src/tests/course-management/language/change-user-preference.spec.ts similarity index 96% rename from system-tests/src/tests/change-course-language.spec.ts rename to system-tests/src/tests/course-management/language/change-user-preference.spec.ts index cb353934720c..2b9862a6296e 100644 --- a/system-tests/src/tests/change-course-language.spec.ts +++ b/system-tests/src/tests/course-management/language/change-user-preference.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/course-language-versions.spec.ts b/system-tests/src/tests/course-management/language/versions.spec.ts similarity index 96% rename from system-tests/src/tests/course-language-versions.spec.ts rename to system-tests/src/tests/course-management/language/versions.spec.ts index f190cd1801ca..15587741e9ef 100644 --- a/system-tests/src/tests/course-language-versions.spec.ts +++ b/system-tests/src/tests/course-management/language/versions.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/language.teacher@example.com.json", diff --git a/system-tests/src/tests/course-modules/course-modules.spec.ts b/system-tests/src/tests/course-management/modules/manage.spec.ts similarity index 98% rename from system-tests/src/tests/course-modules/course-modules.spec.ts rename to system-tests/src/tests/course-management/modules/manage.spec.ts index f4799d2c525a..837ab8c4c1f2 100644 --- a/system-tests/src/tests/course-modules/course-modules.spec.ts +++ b/system-tests/src/tests/course-management/modules/manage.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from "@playwright/test" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/permissions.spec.ts b/system-tests/src/tests/course-management/permissions/manage.spec.ts similarity index 94% rename from system-tests/src/tests/permissions.spec.ts rename to system-tests/src/tests/course-management/permissions/manage.spec.ts index 6a715215a10e..72a667f62302 100644 --- a/system-tests/src/tests/permissions.spec.ts +++ b/system-tests/src/tests/course-management/permissions/manage.spec.ts @@ -1,11 +1,7 @@ import { expect, test } from "@playwright/test" -import { - hideToasts, - showNextToastsInfinitely, - showToastsNormally, -} from "../utils/notificationUtils" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { hideToasts, showNextToastsInfinitely, showToastsNormally } from "@/utils/notificationUtils" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/resetting-progress.spec.ts b/system-tests/src/tests/course-management/progress/reset.spec.ts similarity index 98% rename from system-tests/src/tests/resetting-progress.spec.ts rename to system-tests/src/tests/course-management/progress/reset.spec.ts index d3787e59566f..790e9ae1e461 100644 --- a/system-tests/src/tests/resetting-progress.spec.ts +++ b/system-tests/src/tests/course-management/progress/reset.spec.ts @@ -1,6 +1,6 @@ import { BrowserContext, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/draft.spec.ts b/system-tests/src/tests/course-management/status/draft.spec.ts similarity index 98% rename from system-tests/src/tests/draft.spec.ts rename to system-tests/src/tests/course-management/status/draft.spec.ts index 06b40199adcc..5fdf9c018bbf 100644 --- a/system-tests/src/tests/draft.spec.ts +++ b/system-tests/src/tests/course-management/status/draft.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.describe("anonymous user", () => { test("cannot see draft course", async ({ page }) => { diff --git a/system-tests/src/tests/audio.spec.ts b/system-tests/src/tests/course-material/blocks/audio.spec.ts similarity index 94% rename from system-tests/src/tests/audio.spec.ts rename to system-tests/src/tests/course-material/blocks/audio.spec.ts index 33bb4b2812bc..f633bd5db5a1 100644 --- a/system-tests/src/tests/audio.spec.ts +++ b/system-tests/src/tests/course-material/blocks/audio.spec.ts @@ -1,6 +1,6 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/author.spec.ts b/system-tests/src/tests/course-material/blocks/author.spec.ts similarity index 78% rename from system-tests/src/tests/author.spec.ts rename to system-tests/src/tests/course-material/blocks/author.spec.ts index e8a78d35c76f..fc9049427d69 100644 --- a/system-tests/src/tests/author.spec.ts +++ b/system-tests/src/tests/course-material/blocks/author.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/course-material/custom-iframe.spec.ts b/system-tests/src/tests/course-material/blocks/custom-iframe.spec.ts similarity index 94% rename from system-tests/src/tests/course-material/custom-iframe.spec.ts rename to system-tests/src/tests/course-material/blocks/custom-iframe.spec.ts index d58f4a72ed98..cbb8aa1b9867 100644 --- a/system-tests/src/tests/course-material/custom-iframe.spec.ts +++ b/system-tests/src/tests/course-material/blocks/custom-iframe.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/latex.spec.ts b/system-tests/src/tests/course-material/blocks/latex.spec.ts similarity index 95% rename from system-tests/src/tests/latex.spec.ts rename to system-tests/src/tests/course-material/blocks/latex.spec.ts index e4c7c8b1e4b1..7d569946fb61 100644 --- a/system-tests/src/tests/latex.spec.ts +++ b/system-tests/src/tests/course-material/blocks/latex.spec.ts @@ -1,9 +1,9 @@ /* eslint-disable playwright/no-wait-for-timeout */ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectUrlPathWithRandomUuid from "../utils/expect" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectUrlPathWithRandomUuid from "@/utils/expect" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/partners-block.spec.ts b/system-tests/src/tests/course-material/blocks/partners.spec.ts similarity index 100% rename from system-tests/src/tests/partners-block.spec.ts rename to system-tests/src/tests/course-material/blocks/partners.spec.ts diff --git a/system-tests/src/tests/course-material/find-hidden-page.spec.ts b/system-tests/src/tests/course-material/navigation/find-hidden-page.spec.ts similarity index 91% rename from system-tests/src/tests/course-material/find-hidden-page.spec.ts rename to system-tests/src/tests/course-material/navigation/find-hidden-page.spec.ts index cd075ca18c6f..620d576526db 100644 --- a/system-tests/src/tests/course-material/find-hidden-page.spec.ts +++ b/system-tests/src/tests/course-material/navigation/find-hidden-page.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/headings-navigation.spec.ts b/system-tests/src/tests/course-material/navigation/headings.spec.ts similarity index 90% rename from system-tests/src/tests/headings-navigation.spec.ts rename to system-tests/src/tests/course-material/navigation/headings.spec.ts index 509d5f32159f..b221c33e92ac 100644 --- a/system-tests/src/tests/headings-navigation.spec.ts +++ b/system-tests/src/tests/course-material/navigation/headings.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/redirections.spec.ts b/system-tests/src/tests/course-material/navigation/redirections.spec.ts similarity index 100% rename from system-tests/src/tests/redirections.spec.ts rename to system-tests/src/tests/course-material/navigation/redirections.spec.ts diff --git a/system-tests/src/tests/course-material/content-components-render.spec.ts b/system-tests/src/tests/course-material/rendering/content-components.spec.ts similarity index 88% rename from system-tests/src/tests/course-material/content-components-render.spec.ts rename to system-tests/src/tests/course-material/rendering/content-components.spec.ts index b3c60d180e17..2600ec106d6b 100644 --- a/system-tests/src/tests/course-material/content-components-render.spec.ts +++ b/system-tests/src/tests/course-material/rendering/content-components.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", }) diff --git a/system-tests/src/tests/previewing-not-open-chapters.spec.ts b/system-tests/src/tests/course-material/visibility/preview-unopened.spec.ts similarity index 97% rename from system-tests/src/tests/previewing-not-open-chapters.spec.ts rename to system-tests/src/tests/course-material/visibility/preview-unopened.spec.ts index c54658bf6afe..f26890f3f99a 100644 --- a/system-tests/src/tests/previewing-not-open-chapters.spec.ts +++ b/system-tests/src/tests/course-material/visibility/preview-unopened.spec.ts @@ -1,6 +1,6 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/exams/exam-instructions.spec.ts b/system-tests/src/tests/exams/exam-instructions.spec.ts index 3a31c50fda1b..dbb6db322943 100644 --- a/system-tests/src/tests/exams/exam-instructions.spec.ts +++ b/system-tests/src/tests/exams/exam-instructions.spec.ts @@ -1,6 +1,6 @@ import { test } from "@playwright/test" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", }) diff --git a/system-tests/src/tests/exams/exam-list.spec.ts b/system-tests/src/tests/exams/exam-list.spec.ts index adcdd118db15..4a3c58d0eaa2 100644 --- a/system-tests/src/tests/exams/exam-list.spec.ts +++ b/system-tests/src/tests/exams/exam-list.spec.ts @@ -1,6 +1,6 @@ import { test } from "@playwright/test" -import expectUrlPathWithRandomUuid from "../../utils/expect" +import expectUrlPathWithRandomUuid from "@/utils/expect" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/exams/exam-with-automatic-eligibility.spec.ts b/system-tests/src/tests/exams/exam-with-automatic-eligibility.spec.ts index 3ec21aa94b4e..dbb87e3cf7e6 100644 --- a/system-tests/src/tests/exams/exam-with-automatic-eligibility.spec.ts +++ b/system-tests/src/tests/exams/exam-with-automatic-eligibility.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/exams/taking-exam.spec.ts b/system-tests/src/tests/exams/taking-exam.spec.ts index 71cc56c7a021..b321f4cca4e1 100644 --- a/system-tests/src/tests/exams/taking-exam.spec.ts +++ b/system-tests/src/tests/exams/taking-exam.spec.ts @@ -1,6 +1,6 @@ import { test } from "@playwright/test" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", }) diff --git a/system-tests/src/tests/add-manual-completions.spec.ts b/system-tests/src/tests/exercises/completions/add-manual.spec.ts similarity index 100% rename from system-tests/src/tests/add-manual-completions.spec.ts rename to system-tests/src/tests/exercises/completions/add-manual.spec.ts diff --git a/system-tests/src/tests/automatic-completion.spec.ts b/system-tests/src/tests/exercises/completions/automatic.spec.ts similarity index 96% rename from system-tests/src/tests/automatic-completion.spec.ts rename to system-tests/src/tests/exercises/completions/automatic.spec.ts index 07445fe778ee..609580cf065e 100644 --- a/system-tests/src/tests/automatic-completion.spec.ts +++ b/system-tests/src/tests/exercises/completions/automatic.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/point-view/point-view.spec.ts b/system-tests/src/tests/exercises/grading/point-view.spec.ts similarity index 89% rename from system-tests/src/tests/point-view/point-view.spec.ts rename to system-tests/src/tests/exercises/grading/point-view.spec.ts index cb2d6033b7d6..8f6edb69c8d8 100644 --- a/system-tests/src/tests/point-view/point-view.spec.ts +++ b/system-tests/src/tests/exercises/grading/point-view.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" -import { getLocatorForNthExerciseServiceIframe } from "../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/teacher-changing-grade.spec.ts b/system-tests/src/tests/exercises/grading/teacher-override.spec.ts similarity index 100% rename from system-tests/src/tests/teacher-changing-grade.spec.ts rename to system-tests/src/tests/exercises/grading/teacher-override.spec.ts diff --git a/system-tests/src/tests/exercise-list.spec.ts b/system-tests/src/tests/exercises/management/list.spec.ts similarity index 92% rename from system-tests/src/tests/exercise-list.spec.ts rename to system-tests/src/tests/exercises/management/list.spec.ts index ceb94e76b000..6af920430b4b 100644 --- a/system-tests/src/tests/exercise-list.spec.ts +++ b/system-tests/src/tests/exercises/management/list.spec.ts @@ -1,6 +1,6 @@ import { test } from "@playwright/test" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/multiple-tasks-exercise-tests/enable-resubmitting.spec.ts b/system-tests/src/tests/exercises/multiple-tasks/enable-resubmitting.spec.ts similarity index 95% rename from system-tests/src/tests/multiple-tasks-exercise-tests/enable-resubmitting.spec.ts rename to system-tests/src/tests/exercises/multiple-tasks/enable-resubmitting.spec.ts index cf6fa8293fbb..6b5f6b159e78 100644 --- a/system-tests/src/tests/multiple-tasks-exercise-tests/enable-resubmitting.spec.ts +++ b/system-tests/src/tests/exercises/multiple-tasks/enable-resubmitting.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" -import { scrollLocatorsParentIframeToViewIfNeeded } from "../../utils/iframeLocators" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import { scrollLocatorsParentIframeToViewIfNeeded } from "@/utils/iframeLocators" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/multiple-tasks-exercise-tests/multiple-task-exercise.spec.ts b/system-tests/src/tests/exercises/multiple-tasks/multiple-task-exercise.spec.ts similarity index 97% rename from system-tests/src/tests/multiple-tasks-exercise-tests/multiple-task-exercise.spec.ts rename to system-tests/src/tests/exercises/multiple-tasks/multiple-task-exercise.spec.ts index 27d01838b34e..fe2591d2a461 100644 --- a/system-tests/src/tests/multiple-tasks-exercise-tests/multiple-task-exercise.spec.ts +++ b/system-tests/src/tests/exercises/multiple-tasks/multiple-task-exercise.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/peer-reviews/automatically-grade-by-average.spec.ts b/system-tests/src/tests/exercises/peer-reviews/automatically-grade-by-average.spec.ts similarity index 98% rename from system-tests/src/tests/peer-reviews/automatically-grade-by-average.spec.ts rename to system-tests/src/tests/exercises/peer-reviews/automatically-grade-by-average.spec.ts index 2b007dc6a7da..464182705555 100644 --- a/system-tests/src/tests/peer-reviews/automatically-grade-by-average.spec.ts +++ b/system-tests/src/tests/exercises/peer-reviews/automatically-grade-by-average.spec.ts @@ -1,6 +1,6 @@ import { BrowserContext, expect, test } from "@playwright/test" -import { answerExercise, fillPeerReview } from "./peer_review_utils" +import { answerExercise, fillPeerReview } from "./peer-review-utils" const TEST_PAGE = "http://project-331.local/org/uh-cs/courses/peer-review-course/chapter-1/page-3" diff --git a/system-tests/src/tests/peer-reviews/automatically-grade-or-manual-review-by-average.spec.ts b/system-tests/src/tests/exercises/peer-reviews/automatically-grade-or-manual-review-by-average.spec.ts similarity index 97% rename from system-tests/src/tests/peer-reviews/automatically-grade-or-manual-review-by-average.spec.ts rename to system-tests/src/tests/exercises/peer-reviews/automatically-grade-or-manual-review-by-average.spec.ts index 76df62506b13..fc3b1adf0085 100644 --- a/system-tests/src/tests/peer-reviews/automatically-grade-or-manual-review-by-average.spec.ts +++ b/system-tests/src/tests/exercises/peer-reviews/automatically-grade-or-manual-review-by-average.spec.ts @@ -1,8 +1,8 @@ import { BrowserContext, expect, test } from "@playwright/test" -import { getLocatorForNthExerciseServiceIframe } from "../../utils/iframeLocators" +import { answerExercise, fillPeerReview } from "./peer-review-utils" -import { answerExercise, fillPeerReview } from "./peer_review_utils" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" const TEST_PAGE = "http://project-331.local/org/uh-cs/courses/peer-review-course/chapter-1/page-2" diff --git a/system-tests/src/tests/peer-reviews/giving-extra-reviews.spec.ts b/system-tests/src/tests/exercises/peer-reviews/giving-extra-reviews.spec.ts similarity index 98% rename from system-tests/src/tests/peer-reviews/giving-extra-reviews.spec.ts rename to system-tests/src/tests/exercises/peer-reviews/giving-extra-reviews.spec.ts index 0a30b2658743..453ee426145a 100644 --- a/system-tests/src/tests/peer-reviews/giving-extra-reviews.spec.ts +++ b/system-tests/src/tests/exercises/peer-reviews/giving-extra-reviews.spec.ts @@ -1,6 +1,6 @@ import { BrowserContext, expect, test } from "@playwright/test" -import { answerExercise, fillPeerReview } from "./peer_review_utils" +import { answerExercise, fillPeerReview } from "./peer-review-utils" const TEST_PAGE = "http://project-331.local/org/uh-cs/courses/peer-review-course/chapter-1/can-give-extra-reviews" diff --git a/system-tests/src/tests/peer-reviews/manual-review-everything.spec.ts b/system-tests/src/tests/exercises/peer-reviews/manual-review-everything.spec.ts similarity index 97% rename from system-tests/src/tests/peer-reviews/manual-review-everything.spec.ts rename to system-tests/src/tests/exercises/peer-reviews/manual-review-everything.spec.ts index 1c9c72f5274d..65d4e17388ee 100644 --- a/system-tests/src/tests/peer-reviews/manual-review-everything.spec.ts +++ b/system-tests/src/tests/exercises/peer-reviews/manual-review-everything.spec.ts @@ -1,8 +1,8 @@ import { BrowserContext, expect, test } from "@playwright/test" -import { getLocatorForNthExerciseServiceIframe } from "../../utils/iframeLocators" +import { answerExercise, fillPeerReview } from "./peer-review-utils" -import { answerExercise, fillPeerReview } from "./peer_review_utils" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" const TEST_PAGE = "http://project-331.local/org/uh-cs/courses/peer-review-course/chapter-1/page-1" diff --git a/system-tests/src/tests/peer-reviews/peer-review-editor.spec.ts b/system-tests/src/tests/exercises/peer-reviews/peer-review-editor.spec.ts similarity index 94% rename from system-tests/src/tests/peer-reviews/peer-review-editor.spec.ts rename to system-tests/src/tests/exercises/peer-reviews/peer-review-editor.spec.ts index f5cadc941e07..e98d1011eef5 100644 --- a/system-tests/src/tests/peer-reviews/peer-review-editor.spec.ts +++ b/system-tests/src/tests/exercises/peer-reviews/peer-review-editor.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { showNextToastsInfinitely, showToastsNormally } from "../../utils/notificationUtils" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import { showNextToastsInfinitely, showToastsNormally } from "@/utils/notificationUtils" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", }) diff --git a/system-tests/src/tests/peer-reviews/peer_review_utils.ts b/system-tests/src/tests/exercises/peer-reviews/peer-review-utils.ts similarity index 96% rename from system-tests/src/tests/peer-reviews/peer_review_utils.ts rename to system-tests/src/tests/exercises/peer-reviews/peer-review-utils.ts index a29573fa5854..f6ba4d2a9f68 100644 --- a/system-tests/src/tests/peer-reviews/peer_review_utils.ts +++ b/system-tests/src/tests/exercises/peer-reviews/peer-review-utils.ts @@ -1,9 +1,8 @@ import { Page } from "playwright" import { expect, test } from "playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" - import { EXERCISE_SERVICE_CONTENT_ID } from "@/shared-module/common/utils/constants" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" /** * diff --git a/system-tests/src/tests/quizzes/create-and-save-quizzes.spec.ts b/system-tests/src/tests/exercises/quizzes/create-and-save-quizzes.spec.ts similarity index 99% rename from system-tests/src/tests/quizzes/create-and-save-quizzes.spec.ts rename to system-tests/src/tests/exercises/quizzes/create-and-save-quizzes.spec.ts index 59f96d40b3d8..ca6026077c88 100644 --- a/system-tests/src/tests/quizzes/create-and-save-quizzes.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/create-and-save-quizzes.spec.ts @@ -1,10 +1,10 @@ import { Locator, Page, test } from "@playwright/test" -import expectUrlPathWithRandomUuid from "../../utils/expect" +import expectUrlPathWithRandomUuid from "@/utils/expect" import { getLocatorForNthExerciseServiceIframe, scrollElementInsideIframeToView, -} from "../../utils/iframeLocators" +} from "@/utils/iframeLocators" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/quizzes/feedback/clickable-multiple-choice.spec.ts b/system-tests/src/tests/exercises/quizzes/feedback/clickable-multiple-choice.spec.ts similarity index 93% rename from system-tests/src/tests/quizzes/feedback/clickable-multiple-choice.spec.ts rename to system-tests/src/tests/exercises/quizzes/feedback/clickable-multiple-choice.spec.ts index 3547e4220cfe..490677bc12e0 100644 --- a/system-tests/src/tests/quizzes/feedback/clickable-multiple-choice.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/feedback/clickable-multiple-choice.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../../utils/courseMaterialActions" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/quizzes/feedback/essay.spec.ts b/system-tests/src/tests/exercises/quizzes/feedback/essay.spec.ts similarity index 93% rename from system-tests/src/tests/quizzes/feedback/essay.spec.ts rename to system-tests/src/tests/exercises/quizzes/feedback/essay.spec.ts index 32d68033e244..de76ba855e2b 100644 --- a/system-tests/src/tests/quizzes/feedback/essay.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/feedback/essay.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../../utils/courseMaterialActions" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/quizzes/feedback/multiple-choice-dropdown.spec.ts b/system-tests/src/tests/exercises/quizzes/feedback/multiple-choice-dropdown.spec.ts similarity index 92% rename from system-tests/src/tests/quizzes/feedback/multiple-choice-dropdown.spec.ts rename to system-tests/src/tests/exercises/quizzes/feedback/multiple-choice-dropdown.spec.ts index 995e8531f0a3..dbf0ac6d37fd 100644 --- a/system-tests/src/tests/quizzes/feedback/multiple-choice-dropdown.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/feedback/multiple-choice-dropdown.spec.ts @@ -1,8 +1,8 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../../utils/courseMaterialActions" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/quizzes/feedback/multiple-choice.spec.ts b/system-tests/src/tests/exercises/quizzes/feedback/multiple-choice.spec.ts similarity index 93% rename from system-tests/src/tests/quizzes/feedback/multiple-choice.spec.ts rename to system-tests/src/tests/exercises/quizzes/feedback/multiple-choice.spec.ts index 0f1d5141ae16..c0544bc8932a 100644 --- a/system-tests/src/tests/quizzes/feedback/multiple-choice.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/feedback/multiple-choice.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../../utils/courseMaterialActions" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/quizzes/feedback/open.spec.ts b/system-tests/src/tests/exercises/quizzes/feedback/open.spec.ts similarity index 92% rename from system-tests/src/tests/quizzes/feedback/open.spec.ts rename to system-tests/src/tests/exercises/quizzes/feedback/open.spec.ts index df78db4ed93b..7cf2204cc5d4 100644 --- a/system-tests/src/tests/quizzes/feedback/open.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/feedback/open.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../../utils/courseMaterialActions" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/quizzes/feedback/scale.spec.ts b/system-tests/src/tests/exercises/quizzes/feedback/scale.spec.ts similarity index 94% rename from system-tests/src/tests/quizzes/feedback/scale.spec.ts rename to system-tests/src/tests/exercises/quizzes/feedback/scale.spec.ts index 3bbfb20e80ac..757e6776ceb5 100644 --- a/system-tests/src/tests/quizzes/feedback/scale.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/feedback/scale.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/quizzes/feedback/timeline.spec.ts b/system-tests/src/tests/exercises/quizzes/feedback/timeline.spec.ts similarity index 97% rename from system-tests/src/tests/quizzes/feedback/timeline.spec.ts rename to system-tests/src/tests/exercises/quizzes/feedback/timeline.spec.ts index b62b64499be5..a770320794ea 100644 --- a/system-tests/src/tests/quizzes/feedback/timeline.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/feedback/timeline.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/quizzes/feedback/vector.spec.ts b/system-tests/src/tests/exercises/quizzes/feedback/vector.spec.ts similarity index 95% rename from system-tests/src/tests/quizzes/feedback/vector.spec.ts rename to system-tests/src/tests/exercises/quizzes/feedback/vector.spec.ts index 0741133741d5..5bdf86bf3036 100644 --- a/system-tests/src/tests/quizzes/feedback/vector.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/feedback/vector.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../../utils/courseMaterialActions" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/checkbox-widget.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/checkbox-widget.spec.ts similarity index 90% rename from system-tests/src/tests/quizzes/widget/checkbox-widget.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/checkbox-widget.spec.ts index 0df51f192561..b8d05b3ce267 100644 --- a/system-tests/src/tests/quizzes/widget/checkbox-widget.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/checkbox-widget.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/essay-widget.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/essay-widget.spec.ts similarity index 94% rename from system-tests/src/tests/quizzes/widget/essay-widget.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/essay-widget.spec.ts index 38dd58cda745..d78e0ba73349 100644 --- a/system-tests/src/tests/quizzes/widget/essay-widget.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/essay-widget.spec.ts @@ -3,8 +3,8 @@ import { test } from "@playwright/test" import { getLocatorForNthExerciseServiceIframe, scrollLocatorsParentIframeToViewIfNeeded, -} from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +} from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/feedback.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/feedback.spec.ts similarity index 100% rename from system-tests/src/tests/quizzes/widget/feedback.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/feedback.spec.ts diff --git a/system-tests/src/tests/quizzes/widget/matrix-widget.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/matrix-widget.spec.ts similarity index 94% rename from system-tests/src/tests/quizzes/widget/matrix-widget.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/matrix-widget.spec.ts index 682d5c83f84c..61f66724a789 100644 --- a/system-tests/src/tests/quizzes/widget/matrix-widget.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/matrix-widget.spec.ts @@ -3,8 +3,8 @@ import { test } from "@playwright/test" import { getLocatorForNthExerciseServiceIframe, scrollLocatorsParentIframeToViewIfNeeded, -} from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +} from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/multiple-choice-clickable.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-clickable.spec.ts similarity index 89% rename from system-tests/src/tests/quizzes/widget/multiple-choice-clickable.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/multiple-choice-clickable.spec.ts index 380aea3d9581..b845623a4be3 100644 --- a/system-tests/src/tests/quizzes/widget/multiple-choice-clickable.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-clickable.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/multiple-choice-column-long-text.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-column-long-text.spec.ts similarity index 89% rename from system-tests/src/tests/quizzes/widget/multiple-choice-column-long-text.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/multiple-choice-column-long-text.spec.ts index 3e9fa8c8f598..f4dbb435ec41 100644 --- a/system-tests/src/tests/quizzes/widget/multiple-choice-column-long-text.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-column-long-text.spec.ts @@ -3,8 +3,8 @@ import { test } from "@playwright/test" import { getLocatorForNthExerciseServiceIframe, scrollLocatorsParentIframeToViewIfNeeded, -} from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +} from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/multiple-choice-column-widget.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-column-widget.spec.ts similarity index 89% rename from system-tests/src/tests/quizzes/widget/multiple-choice-column-widget.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/multiple-choice-column-widget.spec.ts index 009af543b041..636c122b46c6 100644 --- a/system-tests/src/tests/quizzes/widget/multiple-choice-column-widget.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-column-widget.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/multiple-choice-course-material-widget-column.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-course-material-widget-column.spec.ts similarity index 95% rename from system-tests/src/tests/quizzes/widget/multiple-choice-course-material-widget-column.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/multiple-choice-course-material-widget-column.spec.ts index 2cb4613084a7..6365727bc742 100644 --- a/system-tests/src/tests/quizzes/widget/multiple-choice-course-material-widget-column.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-course-material-widget-column.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../../utils/courseMaterialActions" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/multiple-choice-course-material-widget-row.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-course-material-widget-row.spec.ts similarity index 94% rename from system-tests/src/tests/quizzes/widget/multiple-choice-course-material-widget-row.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/multiple-choice-course-material-widget-row.spec.ts index 49258b22145e..6c2025ce903f 100644 --- a/system-tests/src/tests/quizzes/widget/multiple-choice-course-material-widget-row.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-course-material-widget-row.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../../utils/courseMaterialActions" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/user@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/multiple-choice-dropdown.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-dropdown.spec.ts similarity index 90% rename from system-tests/src/tests/quizzes/widget/multiple-choice-dropdown.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/multiple-choice-dropdown.spec.ts index af2792df8dc3..565264b83f7f 100644 --- a/system-tests/src/tests/quizzes/widget/multiple-choice-dropdown.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-dropdown.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/multiple-choice-multi-widget.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-multi-widget.spec.ts similarity index 89% rename from system-tests/src/tests/quizzes/widget/multiple-choice-multi-widget.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/multiple-choice-multi-widget.spec.ts index d527b4d5eb4a..4246153333b6 100644 --- a/system-tests/src/tests/quizzes/widget/multiple-choice-multi-widget.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-multi-widget.spec.ts @@ -3,8 +3,8 @@ import { test } from "@playwright/test" import { getLocatorForNthExerciseServiceIframe, scrollLocatorsParentIframeToViewIfNeeded, -} from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +} from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/multiple-choice-row-widget.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-row-widget.spec.ts similarity index 89% rename from system-tests/src/tests/quizzes/widget/multiple-choice-row-widget.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/multiple-choice-row-widget.spec.ts index 8eef9104997f..ae4f827643c9 100644 --- a/system-tests/src/tests/quizzes/widget/multiple-choice-row-widget.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/multiple-choice-row-widget.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/open-widget.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/open-widget.spec.ts similarity index 92% rename from system-tests/src/tests/quizzes/widget/open-widget.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/open-widget.spec.ts index 1593e98ecdbd..8cc70333345f 100644 --- a/system-tests/src/tests/quizzes/widget/open-widget.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/open-widget.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/quizzes/widget/scale-widget.spec.ts b/system-tests/src/tests/exercises/quizzes/widget/scale-widget.spec.ts similarity index 92% rename from system-tests/src/tests/quizzes/widget/scale-widget.spec.ts rename to system-tests/src/tests/exercises/quizzes/widget/scale-widget.spec.ts index 7f213e1d95bb..bba74b9d87d4 100644 --- a/system-tests/src/tests/quizzes/widget/scale-widget.spec.ts +++ b/system-tests/src/tests/exercises/quizzes/widget/scale-widget.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { getLocatorForNthExerciseServiceIframe } from "../../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../../utils/screenshot" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/self-review/only-self-review.spec.ts b/system-tests/src/tests/exercises/self-reviews/only-self-review.spec.ts similarity index 98% rename from system-tests/src/tests/self-review/only-self-review.spec.ts rename to system-tests/src/tests/exercises/self-reviews/only-self-review.spec.ts index ca5afaab420f..fad2df160fb0 100644 --- a/system-tests/src/tests/self-review/only-self-review.spec.ts +++ b/system-tests/src/tests/exercises/self-reviews/only-self-review.spec.ts @@ -1,6 +1,6 @@ import { BrowserContext, expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" test.describe("An exercise that has self review but no peer review works", () => { let context1: BrowserContext diff --git a/system-tests/src/tests/self-review/peer-and-self-review.spec.ts b/system-tests/src/tests/exercises/self-reviews/peer-and-self-review.spec.ts similarity index 99% rename from system-tests/src/tests/self-review/peer-and-self-review.spec.ts rename to system-tests/src/tests/exercises/self-reviews/peer-and-self-review.spec.ts index 80d4874e3400..b396a554419d 100644 --- a/system-tests/src/tests/self-review/peer-and-self-review.spec.ts +++ b/system-tests/src/tests/exercises/self-reviews/peer-and-self-review.spec.ts @@ -1,6 +1,6 @@ import { BrowserContext, expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" test.describe("Peer review followed by self review works", () => { let context1: BrowserContext diff --git a/system-tests/src/tests/limited-tries.spec.ts b/system-tests/src/tests/exercises/settings/limited-tries.spec.ts similarity index 97% rename from system-tests/src/tests/limited-tries.spec.ts rename to system-tests/src/tests/exercises/settings/limited-tries.spec.ts index 5446a94f6a99..26d6b710bf0c 100644 --- a/system-tests/src/tests/limited-tries.spec.ts +++ b/system-tests/src/tests/exercises/settings/limited-tries.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/model-solution.spec.ts b/system-tests/src/tests/exercises/submissions/model-solution.spec.ts similarity index 91% rename from system-tests/src/tests/model-solution.spec.ts rename to system-tests/src/tests/exercises/submissions/model-solution.spec.ts index bac2642c9c07..2d164a0005b4 100644 --- a/system-tests/src/tests/model-solution.spec.ts +++ b/system-tests/src/tests/exercises/submissions/model-solution.spec.ts @@ -1,9 +1,9 @@ import { test } from "@playwright/test" -import { selectCourseInstanceIfPrompted } from "../utils/courseMaterialActions" -import expectUrlPathWithRandomUuid from "../utils/expect" -import { getLocatorForNthExerciseServiceIframe } from "../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectUrlPathWithRandomUuid from "@/utils/expect" +import { getLocatorForNthExerciseServiceIframe } from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/cms/converting-blocks.spec.ts b/system-tests/src/tests/pages/blocks/converting.spec.ts similarity index 100% rename from system-tests/src/tests/cms/converting-blocks.spec.ts rename to system-tests/src/tests/pages/blocks/converting.spec.ts diff --git a/system-tests/src/tests/sidebar-toggle.spec.ts b/system-tests/src/tests/pages/editor/sidebar-toggle.spec.ts similarity index 97% rename from system-tests/src/tests/sidebar-toggle.spec.ts rename to system-tests/src/tests/pages/editor/sidebar-toggle.spec.ts index dd7fc15b7fb2..ffda0752b7e1 100644 --- a/system-tests/src/tests/sidebar-toggle.spec.ts +++ b/system-tests/src/tests/pages/editor/sidebar-toggle.spec.ts @@ -1,6 +1,6 @@ import { expect, test } from "@playwright/test" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/gutenberg/spacer-not-breaking-editing.spec.ts b/system-tests/src/tests/pages/editor/spacer-editing.spec.ts similarity index 94% rename from system-tests/src/tests/gutenberg/spacer-not-breaking-editing.spec.ts rename to system-tests/src/tests/pages/editor/spacer-editing.spec.ts index 73bdca0e0941..30eaeeda1b0e 100644 --- a/system-tests/src/tests/gutenberg/spacer-not-breaking-editing.spec.ts +++ b/system-tests/src/tests/pages/editor/spacer-editing.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" -import { waitForFooterTranslationsToLoad } from "../../utils/waitingUtils" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" +import { waitForFooterTranslationsToLoad } from "@/utils/waitingUtils" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/cms/mediaUpload.spec.ts b/system-tests/src/tests/pages/media/upload.spec.ts similarity index 96% rename from system-tests/src/tests/cms/mediaUpload.spec.ts rename to system-tests/src/tests/pages/media/upload.spec.ts index 3dff94312fb6..c32926b35da7 100644 --- a/system-tests/src/tests/cms/mediaUpload.spec.ts +++ b/system-tests/src/tests/pages/media/upload.spec.ts @@ -6,7 +6,7 @@ import { test, } from "@playwright/test" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.describe("Uploading media as admin", () => { // As Admin diff --git a/system-tests/src/tests/changing-page-path.spec.ts b/system-tests/src/tests/pages/pages/change-path.spec.ts similarity index 100% rename from system-tests/src/tests/changing-page-path.spec.ts rename to system-tests/src/tests/pages/pages/change-path.spec.ts diff --git a/system-tests/src/tests/history/history.spec.ts b/system-tests/src/tests/pages/pages/history.spec.ts similarity index 96% rename from system-tests/src/tests/history/history.spec.ts rename to system-tests/src/tests/pages/pages/history.spec.ts index ccac923316d0..5b7fa8758145 100644 --- a/system-tests/src/tests/history/history.spec.ts +++ b/system-tests/src/tests/pages/pages/history.spec.ts @@ -1,14 +1,14 @@ /* eslint-disable playwright/no-wait-for-timeout */ import { expect, test } from "@playwright/test" -import { saveCMSPage } from "../../utils/cmsUtils" -import { selectCourseInstanceIfPrompted } from "../../utils/courseMaterialActions" -import expectUrlPathWithRandomUuid from "../../utils/expect" +import { saveCMSPage } from "@/utils/cmsUtils" +import { selectCourseInstanceIfPrompted } from "@/utils/courseMaterialActions" +import expectUrlPathWithRandomUuid from "@/utils/expect" import { getLocatorForNthExerciseServiceIframe, scrollLocatorsParentIframeToViewIfNeeded, -} from "../../utils/iframeLocators" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +} from "@/utils/iframeLocators" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teacher@example.com.json", diff --git a/system-tests/src/tests/manage-course-structure.spec.ts b/system-tests/src/tests/pages/structure/manage.spec.ts similarity index 99% rename from system-tests/src/tests/manage-course-structure.spec.ts rename to system-tests/src/tests/pages/structure/manage.spec.ts index 439b0049b732..8795db2a570a 100644 --- a/system-tests/src/tests/manage-course-structure.spec.ts +++ b/system-tests/src/tests/pages/structure/manage.spec.ts @@ -1,8 +1,7 @@ import { expect, Page, test } from "@playwright/test" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" - import { hideToasts } from "@/utils/notificationUtils" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/course-list.spec.ts b/system-tests/src/tests/ui/listings/course-list.spec.ts similarity index 85% rename from system-tests/src/tests/course-list.spec.ts rename to system-tests/src/tests/ui/listings/course-list.spec.ts index 86442b6a6c0c..4aec6c525b87 100644 --- a/system-tests/src/tests/course-list.spec.ts +++ b/system-tests/src/tests/ui/listings/course-list.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import expectUrlPathWithRandomUuid from "../utils/expect" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import expectUrlPathWithRandomUuid from "@/utils/expect" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/organization-list.spec.ts b/system-tests/src/tests/ui/listings/organization-list.spec.ts similarity index 89% rename from system-tests/src/tests/organization-list.spec.ts rename to system-tests/src/tests/ui/listings/organization-list.spec.ts index 6b97b42572ca..5b5dee76bcf7 100644 --- a/system-tests/src/tests/organization-list.spec.ts +++ b/system-tests/src/tests/ui/listings/organization-list.spec.ts @@ -1,6 +1,6 @@ import { test } from "@playwright/test" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", diff --git a/system-tests/src/tests/query-mutation-notifications/error-notification.spec.ts b/system-tests/src/tests/ui/notifications/error-notification.spec.ts similarity index 84% rename from system-tests/src/tests/query-mutation-notifications/error-notification.spec.ts rename to system-tests/src/tests/ui/notifications/error-notification.spec.ts index 9e9a78f0a70e..f236ae02a506 100644 --- a/system-tests/src/tests/query-mutation-notifications/error-notification.spec.ts +++ b/system-tests/src/tests/ui/notifications/error-notification.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { showNextToastsInfinitely, showToastsNormally } from "../../utils/notificationUtils" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import { showNextToastsInfinitely, showToastsNormally } from "@/utils/notificationUtils" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", }) diff --git a/system-tests/src/tests/query-mutation-notifications/success-notification.spec.ts b/system-tests/src/tests/ui/notifications/success-notification.spec.ts similarity index 83% rename from system-tests/src/tests/query-mutation-notifications/success-notification.spec.ts rename to system-tests/src/tests/ui/notifications/success-notification.spec.ts index 84f9472bcda3..415b69d35d19 100644 --- a/system-tests/src/tests/query-mutation-notifications/success-notification.spec.ts +++ b/system-tests/src/tests/ui/notifications/success-notification.spec.ts @@ -1,7 +1,7 @@ import { test } from "@playwright/test" -import { showNextToastsInfinitely, showToastsNormally } from "../../utils/notificationUtils" -import expectScreenshotsToMatchSnapshots from "../../utils/screenshot" +import { showNextToastsInfinitely, showToastsNormally } from "@/utils/notificationUtils" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/admin@example.com.json", }) diff --git a/system-tests/src/tests/search-users.spec.ts b/system-tests/src/tests/user-management/search.spec.ts similarity index 95% rename from system-tests/src/tests/search-users.spec.ts rename to system-tests/src/tests/user-management/search.spec.ts index 17918feb4d99..487903884457 100644 --- a/system-tests/src/tests/search-users.spec.ts +++ b/system-tests/src/tests/user-management/search.spec.ts @@ -1,6 +1,6 @@ import { test } from "@playwright/test" -import expectScreenshotsToMatchSnapshots from "../utils/screenshot" +import expectScreenshotsToMatchSnapshots from "@/utils/screenshot" test.use({ storageState: "src/states/teaching-and-learning-services@example.com.json",