Skip to content

Commit

Permalink
Separated test-utils between frontend and backend
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Jan 15, 2025
1 parent a6f3f24 commit f88b027
Show file tree
Hide file tree
Showing 45 changed files with 47 additions and 672 deletions.
2 changes: 1 addition & 1 deletion __tests__/frontend/basic.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works with basic configuration", async ({ page }) => {
await page.goto("/");
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/configuration.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works with copy configuration", async ({ page }) => {
await page.goto("/");
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/destination-selection-api-error.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("handles raw errors in source folder selection gracefully", async ({
page,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("handles raw errors in source folder selection gracefully", async ({
page,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("handles raw errors in source folder selection gracefully", async ({
page,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("handles raw errors in source folder selection gracefully", async ({
page,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/move-api-error.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works with an API error", async ({ page }) => {
await page.goto("/");
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/move-folders-equal-error.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works with source and destination folders being equal", async ({
page,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/move-invalid-parameter-error.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works with an API error", async ({ page }) => {
await page.goto("/");
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/move-repeat-after-timeout.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works with an unhandled move error", async ({ page }) => {
await page.goto("/");
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/move-unhandled-error.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works with an unhandled move error", async ({ page }) => {
await page.goto("/");
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/move-unknown-error.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works with an unknown move error", async ({ page }) => {
await page.goto("/");
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/navigation.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works with basic configuration", async ({ page }) => {
await page.goto("/");
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/non-empty.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works with non-empty destination folder", async ({ page }) => {
await page.goto("/");
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/source-destination-selection.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works with folder selection", async ({ page }) => {
await page.goto("/");
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/source-selection-api-error.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("handles raw errors in source folder selection gracefully", async ({
page,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("handles invalid parameter errors in source folder selection gracefully", async ({
page,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("handles raw errors in source folder selection gracefully", async ({
page,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/source-selection-unknown-error.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("handles raw errors in source folder selection gracefully", async ({
page,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/frontend/success-with-errors.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from "playwright-test-coverage";

import { setup } from "../test-utils/stub-endpoints";
import { setup } from "./test-utils/stub-endpoints";

test("works and displays moving errors", async ({ page }) => {
await page.goto("/");
Expand Down
File renamed without changes.
25 changes: 0 additions & 25 deletions __tests__/test-utils/DriveBackedValue-stub.ts

This file was deleted.

20 changes: 0 additions & 20 deletions __tests__/test-utils/MoveState-stub.ts

This file was deleted.

104 changes: 0 additions & 104 deletions __tests__/test-utils/SafeDriveService-stub.ts

This file was deleted.

Loading

0 comments on commit f88b027

Please sign in to comment.