Added test for RC sends circ bib requests to Vega#722
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
playwright/tests/redirects.spec.ts
Outdated
| maxRedirects: 0, | ||
| }) | ||
|
|
||
| expect(response.status()).toBeGreaterThanOrEqual(300) |
There was a problem hiding this comment.
Should specifically be a 307, so we should test for that
playwright/tests/redirects.spec.ts
Outdated
| await expect(page).toHaveURL(`${BASE_URL}/browse`) | ||
| }) | ||
|
|
||
| test("RC sends circ bib requests to Vega", async ({ request }) => { |
There was a problem hiding this comment.
Can you move this into a separate describe block– the other redirects in this test suite are set in middleware, which is different than this redirect which happens in the bib API route
playwright/tests/redirects.spec.ts
Outdated
|
|
||
| test("RC sends circ bib requests to Vega", async ({ request }) => { | ||
| const response = await request.get(`${BASE_URL}/bib/b17782484`, { | ||
| maxRedirects: 0, |
There was a problem hiding this comment.
what's the intention of this flag?
There was a problem hiding this comment.
it's there so Playwright doesn't follow the redirect, but just verifys the redirect response itself (status and location header)
CHANGELOG
Outdated
|
|
||
| ### Added | ||
|
|
||
| - Added Playwright test for 'RC sends circ bib requests to Vega' [SCC-5292](https://newyorkpubliclibrary.atlassian.net/browse/SCC-5292) |
There was a problem hiding this comment.
total nit but this case doesn't need to be in quotes, should follow pattern of other changelog entries ("Added Playwright test for redirecting circ bib requests to Vega")
7emansell
left a comment
There was a problem hiding this comment.
Looks good just one final nit about how we want to describe these test blocks!
playwright/tests/redirects.spec.ts
Outdated
| await expect(page).toHaveURL(`${BASE_URL}/browse`) | ||
| }) | ||
|
|
||
| test.describe("circ bib redirects", () => { |
There was a problem hiding this comment.
Can you add a describe block around the other tests ("middleware" ?) and rename this one more accurately ("bib request redirects"?)
Ticket:
This PR does the following:
How has this been tested?
Accessibility concerns or updates
Checklist: