Skip to content

Commit

Permalink
Merge pull request #1657 from weather-gov/mgwalker/1653-afd-wfo-select
Browse files Browse the repository at this point in the history
Select default WFO correctly, regardless of capitalization of WFO in path
  • Loading branch information
greg-does-weather committed Aug 29, 2024
2 parents 5d7f0fc + 14b4507 commit ba57fd5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/playwright/e2e/afd-page.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ describe("AFD Page Tests", () => {
await page.goto("http://localhost:8080/afd/OKX");
});

describe("WFO selector correctly populates based on path", () => {
test("with uppercase WFO code", async ({ page }) => {
const selected = page.locator("wx-afd-selector #wfo-selector");
await expect(selected).toHaveValue("OKX");
});

test("with lowercase WFO code", async ({ page }) => {
await page.goto("http://localhost:8080/afd/okx");
const selected = page.locator("wx-afd-selector #wfo-selector");
await expect(selected).toHaveValue("OKX");
});
});

test("Selecting third version and clicking button will load that version", async ({page}) => {
const thirdId = OKX_REFERENCES["@graph"][2].id;
const versionSelect = await page.locator('select#version-selector');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% set wfo = wfo | upper %}

<div class="layout-container grid-row height-full flex-column flex-no-wrap">
<header role="banner">
<div class="grid-container">
Expand Down

0 comments on commit ba57fd5

Please sign in to comment.