-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge staging into Production (#563)
* Create data products view * Guard against missing filter options * Remove instruments limit from table * Fix products initial sort order * Add vertical measurement region filter * Format products table * Add products internal links * Add measurement style filter * Decouple text input field * Update glossary.json Term definitions have been edited to match definitions approved in the ESCO report. * Update glossary.js Added sentence including URL for ADMG CASEI Inventory Terms Definitions * Add dropdown by text input * Use combobox for filter * Add product map * Update gcmd keywords filter * Fix linting issues * Update gcmd keyword source * Cleanup extra comments * Fix measurment type filter * Add related parents filter * Fix missing props validation * Add missing location prop * Fix conditional filter * Fix missing props validation * Removed header text check on after explore page navigation. We already check that the URL is correct and don't also need to validate the content of the page. * Update tests for tabs number * apply linting and fix up test results * update feedback form with correct link * remove kruft of old feedback form, add API docs and FEEDBACK form to constants util * respond to and apply linting * remove linting callout * update snapshots * resolving a build error * test resolution of issue 505, check description for details * remove fluff, guard for no bounds in spatial deployment * update tests, apply linting * remove onload handler * Add video retaining config * Replace ssr location with prop * Remove commented out lines * Add testing instruction in README * apply linting, respond to comment * apply linting, fix prop validation * Enhancement/data products (#532) * Remove queries for campaign bounds * Update to Link component * Update variables dropdown logic * Fix layoutwidth prop type * Add lower casing to gcmd options * Add json doi parsing comment * Replace campaign bounds * Replace products table link * Fix broken explore map inputs * Update/data products view (#551) * Guard against failing keyword parse * Add product table tooltip * Add link out to gcmd * Feature/in review page closes #507 (#547) * Create initial upcoming page * map upcoming sections * Add link to coming soon * Update unpublished drafts fetching * Include new env var in workflows * Update csp plugin * Adjust filters and layout closes #548 (#552) * Adjust filters and layout * Add campaing aliases * Add aliases props * Replace collection periods with platforms closes #546 (#550) * Replace collection periods with platforms * Update test to reflect new campaign page * Undelete websites props * Update platforms expectation * Update contact page content closes #545 (#554) * Update contact page content * Update contact page test * Update footer content closes #541 (#555) * Update footer content * Update footer snapshot * Update site definition * Add filters to instruments page (#556) * Reduce glossary page padding closes #543 (#557) * Reduce gloassary page padding * Update top margins for section headers * Add glossary data-cy prop * Feature/data formats closes #410 (#558) * Reduce gloassary page padding * Update top margins for section headers * Add glossary data-cy prop * Add initial formats query * Add data format filter * Add data formats to instruments and platforms * Update test and snapshot * Guards against missing doi formats * Update glossary map image (#559) * Replace collection periods (#564) * Replace collection periods * Update platform tests --------- Co-authored-by: Rachel Wyatt <114182970+rwyatt19@users.noreply.github.com> Co-authored-by: Edward Keeble <edward@developmentseed.org> Co-authored-by: Edward Keeble <edkeeble@users.noreply.github.com> Co-authored-by: Matt Robinson <pacificrobinson@gmail.com>
- Loading branch information
1 parent
049b201
commit e1f7181
Showing
44 changed files
with
13,048 additions
and
12,918 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,63 @@ | ||
const { test, expect } = require('@playwright/test'); | ||
const { test, expect } = require("@playwright/test") | ||
import config from "../playwright.config" | ||
const baseUrl = config.use?.baseURL | ||
|
||
test.describe('Campaign', () => { | ||
let page; | ||
|
||
test.beforeAll(async ({ browser }) => { | ||
page = await browser.newPage(); | ||
await page.goto(baseUrl + '/campaign/OLYMPEX'); | ||
}); | ||
|
||
test('provides information on the campaign', async () => { | ||
|
||
await expect(page.locator('[data-cy=campaign-hero] h1')).toBeVisible(); | ||
await expect(page.locator('[data-cy=campaign-hero-header]')).toHaveCount(1); | ||
|
||
const statsItems = await page.locator('[data-cy=campaign-hero] [data-cy=stats] dd'); | ||
await expect(statsItems).toHaveCount(3); | ||
await expect(statsItems.nth(0)).toContainText('Deployment'); | ||
await expect(statsItems.nth(1)).toContainText('Collection Periods'); | ||
await expect(statsItems.nth(2)).toContainText('Data Products'); | ||
|
||
const statsValues = await page.locator('[data-cy=campaign-hero] [data-cy=stats] dt'); | ||
await expect(statsValues).toHaveCount(3); | ||
await expect(statsValues.nth(0)).toContainText('1'); | ||
await expect(statsValues.nth(1)).toContainText('713'); | ||
await expect(statsValues.nth(2)).toBeVisible(); | ||
|
||
await expect(page.locator('[data-cy=mapboxgl-map]')).toBeVisible(); | ||
|
||
const inpageNavItems = await page.locator('[data-cy=inpage-nav] a'); | ||
await expect(inpageNavItems).toHaveCount(7); | ||
await expect(inpageNavItems.nth(0)).toBeVisible(); | ||
await expect(inpageNavItems.nth(1)).toContainText('Overview'); | ||
await expect(inpageNavItems.nth(2)).toContainText('Focus'); | ||
await expect(inpageNavItems.nth(3)).toContainText('Platforms & Instruments'); | ||
await expect(inpageNavItems.nth(4)).toContainText('Timeline'); | ||
await expect(inpageNavItems.nth(5)).toContainText('Data'); | ||
await expect(inpageNavItems.nth(6)).toContainText('Program Info'); | ||
|
||
const sectionIds = ['program-info', 'platform', 'overview', 'timeline', 'focus']; | ||
|
||
for (const id of sectionIds) { | ||
await page.locator(`[data-cy=${id}-inpage-link]`).click(); | ||
await expect(page.url()).toContain(id); | ||
|
||
// TODO: figure out how to properly test the inpage scroll | ||
await expect(page.locator(`[data-cy=${id}-section] h2`)).toBeVisible(); | ||
} | ||
|
||
|
||
|
||
}); | ||
|
||
// ... additional test may need to be added to cover any changes made to this format page, such as search capability | ||
|
||
}); | ||
test.describe("Campaign", () => { | ||
let page | ||
|
||
test.beforeAll(async ({ browser }) => { | ||
page = await browser.newPage() | ||
await page.goto(baseUrl + "/campaign/OLYMPEX") | ||
}) | ||
|
||
test("provides information on the campaign", async () => { | ||
await expect(page.locator("[data-cy=campaign-hero] h1")).toBeVisible() | ||
await expect(page.locator("[data-cy=campaign-hero-header]")).toHaveCount(1) | ||
|
||
const statsItems = await page.locator( | ||
"[data-cy=campaign-hero] [data-cy=stats] dd" | ||
) | ||
await expect(statsItems).toHaveCount(3) | ||
await expect(statsItems.nth(0)).toContainText("Deployment") | ||
await expect(statsItems.nth(1)).toContainText("Platforms") | ||
await expect(statsItems.nth(2)).toContainText("Data Products") | ||
|
||
const statsValues = await page.locator( | ||
"[data-cy=campaign-hero] [data-cy=stats] dt" | ||
) | ||
await expect(statsValues).toHaveCount(3) | ||
await expect(statsValues.nth(0)).toContainText("1") | ||
await expect(statsValues.nth(1)).toContainText("8") | ||
await expect(statsValues.nth(2)).toBeVisible() | ||
|
||
await expect(page.locator("[data-cy=mapboxgl-map]")).toBeVisible() | ||
|
||
const inpageNavItems = await page.locator("[data-cy=inpage-nav] a") | ||
await expect(inpageNavItems).toHaveCount(7) | ||
await expect(inpageNavItems.nth(0)).toBeVisible() | ||
await expect(inpageNavItems.nth(1)).toContainText("Overview") | ||
await expect(inpageNavItems.nth(2)).toContainText("Focus") | ||
await expect(inpageNavItems.nth(3)).toContainText("Platforms & Instruments") | ||
await expect(inpageNavItems.nth(4)).toContainText("Timeline") | ||
await expect(inpageNavItems.nth(5)).toContainText("Data") | ||
await expect(inpageNavItems.nth(6)).toContainText("Program Info") | ||
|
||
const sectionIds = [ | ||
"program-info", | ||
"platform", | ||
"overview", | ||
"timeline", | ||
"focus", | ||
] | ||
|
||
for (const id of sectionIds) { | ||
await page.locator(`[data-cy=${id}-inpage-link]`).click() | ||
await expect(page.url()).toContain(id) | ||
|
||
// TODO: figure out how to properly test the inpage scroll | ||
await expect(page.locator(`[data-cy=${id}-section] h2`)).toBeVisible() | ||
} | ||
}) | ||
|
||
// ... additional test may need to be added to cover any changes made to this format page, such as search capability | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,33 @@ | ||
const { chromium } = require("@playwright/test"); | ||
const { test, expect } = require('@playwright/test'); | ||
const { chromium } = require("@playwright/test") | ||
const { test, expect } = require("@playwright/test") | ||
import config from "../playwright.config" | ||
const baseUrl = config.use?.baseURL | ||
|
||
test.describe("Contact", () => { | ||
|
||
let browser, page; | ||
|
||
test.beforeAll(async ({ browser }) => { | ||
|
||
page = await browser.newPage(); | ||
await page.goto(baseUrl); | ||
}); | ||
|
||
test.afterAll(async (browser) => { | ||
browser = await chromium.launch(); | ||
await browser.close(); | ||
}); | ||
|
||
test.beforeEach(async (browser) => { | ||
browser = await chromium.launch(); | ||
page = await browser.newPage(); | ||
await page.goto(baseUrl + "/contact"); | ||
}); | ||
|
||
test.afterEach(async () => { | ||
await page.close(); | ||
}); | ||
|
||
test("renders correctly", async () => { | ||
await page.waitForSelector("main h1:text('feedback')"); | ||
await page.waitForSelector("main p:text('NASA inventory')"); | ||
}); | ||
}); | ||
let browser, page | ||
|
||
test.beforeAll(async ({ browser }) => { | ||
page = await browser.newPage() | ||
await page.goto(baseUrl) | ||
}) | ||
|
||
test.afterAll(async browser => { | ||
browser = await chromium.launch() | ||
await browser.close() | ||
}) | ||
|
||
test.beforeEach(async browser => { | ||
browser = await chromium.launch() | ||
page = await browser.newPage() | ||
await page.goto(baseUrl + "/contact") | ||
}) | ||
|
||
test.afterEach(async () => { | ||
await page.close() | ||
}) | ||
|
||
test("renders correctly", async () => { | ||
await page.waitForSelector("main h1:text('feedback')") | ||
await page.waitForSelector("main p:text('NASA CASEI inventory')") | ||
}) | ||
}) |
Oops, something went wrong.