refactor: improve test isolation for Axios API logic (#13125)

* wip: commit progress on code split-up

* wip: commit more progress

* wip: finish initial version of class implementation

* chore: update all import paths to go through client instance

* fix: remove temp comments

* refactor: smoooooooosh the API

* refactor: update import setup for tests
This commit is contained in:
Michael Smith
2024-05-12 15:05:22 -04:00
committed by GitHub
parent 5ddbeddf85
commit f13b1c9af6
95 changed files with 1964 additions and 1896 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import { expect, test } from "@playwright/test";
import { hasFirstUser } from "api/api";
import { API } from "api/api";
import { Language } from "pages/CreateUserPage/CreateUserForm";
import { setupApiCalls } from "./api";
import * as constants from "./constants";
@@ -9,7 +9,7 @@ import { storageState } from "./playwright.config";
test("setup deployment", async ({ page }) => {
await page.goto("/", { waitUntil: "domcontentloaded" });
await setupApiCalls(page);
const exists = await hasFirstUser();
const exists = await API.hasFirstUser();
// First user already exists, abort early. All tests execute this as a dependency,
// if you run multiple tests in the UI, this will fail unless we check this.
if (exists) {