Skip to content

Commit

Permalink
test: azul const update #4102
Browse files Browse the repository at this point in the history
  • Loading branch information
MillenniumFalconMechanic committed Jan 31, 2025
1 parent ba388fb commit 8370132
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions e2e/anvil/anvil-dataset.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ import {
} from "../features/common/constants";
import { ROUTE_MANIFEST_DOWNLOAD } from "../../site-config/anvil-cmg/dev/export/constants";
import { ANVIL_CMG_CATEGORY_KEY } from "../../site-config/anvil-cmg/category";
import {
APIEndpoints,
AZUL_PARAM,
} from "@databiosphere/findable-ui/lib/apis/azul/common/entities";

const { describe } = test;

describe.parallel("Dataset", () => {
const API_ENDPOINT_SUMMARY = "summary";

describe("Dataset", () => {
test.beforeEach(async ({ page }) => {
await goToDatasetsList(page);
});
Expand Down Expand Up @@ -81,7 +79,7 @@ describe.parallel("Dataset", () => {
// Wait for the summary request once the export button is clicked.
const [request] = await Promise.all([
page.waitForRequest((request) =>
request.url().includes(APIEndpoints.SUMMARY)
request.url().includes(API_ENDPOINT_SUMMARY)
),
clickLink(page, BUTTON_TEXT_EXPORT),
]);
Expand Down Expand Up @@ -135,7 +133,7 @@ describe.parallel("Dataset", () => {
// Wait for the summary request once the file manifest button is clicked.
const [request] = await Promise.all([
page.waitForRequest((request) =>
request.url().includes(APIEndpoints.SUMMARY)
request.url().includes(API_ENDPOINT_SUMMARY)
),
clickLink(page, BUTTON_TEXT_REQUEST_FILE_MANIFEST),
]);
Expand Down Expand Up @@ -220,7 +218,7 @@ async function goToDataset(page: Page, access: DatasetAccess): Promise<void> {
function verifySummaryRequest(request: Request): void {
// Grab the filters param from the request.
const url = new URL(request.url());
const paramValue = url.searchParams.get(AZUL_PARAM.FILTERS) || "";
const paramValue = url.searchParams.get("filters") || "";

// Validate dataset ID is in the filters query parameter.
expect(paramValue).toContain(ANVIL_CMG_CATEGORY_KEY.DATASET_ID);
Expand Down

0 comments on commit 8370132

Please sign in to comment.