Skip to content

Commit

Permalink
fix: update backend urls in test fixtures #60
Browse files Browse the repository at this point in the history
  • Loading branch information
ctot-nondef committed Jul 19, 2024
1 parent 84032f6 commit c883a3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions e2e/fixtures/corpsum.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const login = base.extend<NonNullable<unknown>, { account: Account }>({
await page.getByLabel("Username").fill(username);
await page.getByLabel("Password").fill(password);
const loginPromise = page.waitForResponse(
"https://noskecrystal5corpsum.acdh-dev.oeaw.ac.at/run.cgi/corpora",
"https://noskecrystal5corpsum.acdh-dev.oeaw.ac.at/ca/api/corpora",
);
await page.locator("#main-content").getByRole("button", { name: "Login" }).click();
await loginPromise;
Expand All @@ -33,13 +33,13 @@ export const search = login.extend<NonNullable<unknown>, { search: Search }>({
const { term, corpus } = search;
await page.getByRole("combobox").first().click();
const corpusPromise = page.waitForResponse(
`https://noskecrystal5corpsum.acdh-dev.oeaw.ac.at/run.cgi/corp_info?corpname=${corpus}&subcorpora=1&format=json`,
`https://noskecrystal5corpsum.acdh-dev.oeaw.ac.at/search/corp_info?corpname=${corpus}&subcorpora=1`,
);
await page.getByRole("option", { name: corpus }).click();
await corpusPromise;
await page.getByPlaceholder("Your search term").fill(term);
const wordformFreqsPromise = page.waitForResponse(
`https://noskecrystal5corpsum.acdh-dev.oeaw.ac.at/run.cgi/freqml?usecorp=${corpus}&corpname=${corpus}&default_attr=lemma&attrs=word&refs==doc.id&attr_allpos=all&viewmode=kwic&cup_hl=q&structs=s,+g&fromp=1&pagesize=20&kwicleftctx=100%23&kwicrightctx=100%23&json=%7B%22concordance_query%22:%7B%22iquery%22:%22${term}%22,%22queryselector%22:%22iqueryrow%22%7D%7D`,
`https://noskecrystal5corpsum.acdh-dev.oeaw.ac.at/search/freqml?corpname=${corpus}&usesubcorp=&group=0&showpoc=1&showreltt=1&showrel=1&freqlevel=1&ml1attr=doc.year&ml1ctx=0~0%20%3E%200&json=%7B%22concordance_query%22%3A%7B%22iquery%22%3A%22haus%22%2C%22queryselector%22%3A%22iqueryrow%22%7D%7D`,
);
await page.getByPlaceholder("Your search term").press("Enter");
await wordformFreqsPromise;
Expand Down
4 changes: 2 additions & 2 deletions e2e/pages/query.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test.describe("Query Interface", () => {
test("should be able to display information on multiple queries", async ({ page }) => {
await page.getByRole("combobox").first().click();
const corpusPromise = page.waitForResponse(
"https://noskecrystal5corpsum.acdh-dev.oeaw.ac.at/run.cgi/corp_info?corpname=amc_4.2&subcorpora=1&format=json",
"https://noskecrystal5corpsum.acdh-dev.oeaw.ac.at/search/corp_info?corpname=amc_4.2&subcorpora=1",
);
await page.getByRole("option", { name: "amc_4.2" }).click();
await corpusPromise;
Expand Down Expand Up @@ -52,7 +52,7 @@ test.describe("Query Interface", () => {
test("should be able select a corpus and select the available subcorpora", async ({ page }) => {
await page.getByRole("combobox").first().click();
const corpusPromise = page.waitForResponse(
"https://noskecrystal5corpsum.acdh-dev.oeaw.ac.at/run.cgi/corp_info?corpname=amc_4.2&subcorpora=1&format=json",
"https://noskecrystal5corpsum.acdh-dev.oeaw.ac.at/search/corp_info?corpname=amc_4.2&subcorpora=1",
);
await page.getByRole("option", { name: "amc_4.2" }).click();
await corpusPromise;
Expand Down

0 comments on commit c883a3a

Please sign in to comment.