-
Notifications
You must be signed in to change notification settings - Fork 0
Added test for RC sends circ bib requests to Vega #722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
297b403
cc59a63
60efbed
2fbe15f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,3 +54,15 @@ test("SHEP link with unknown uuid/path redirects to browse", async ({ | |
| await page.goto(`${BASE_URL}/subject_headings/something-something`) | ||
| await expect(page).toHaveURL(`${BASE_URL}/browse`) | ||
| }) | ||
|
|
||
| test("RC sends circ bib requests to Vega", async ({ request }) => { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you move this into a separate
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| const response = await request.get(`${BASE_URL}/bib/b17782484`, { | ||
| maxRedirects: 0, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the intention of this flag?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's there so Playwright doesn't follow the redirect, but just verifys the redirect response itself (status and location header) |
||
| }) | ||
|
|
||
| expect(response.status()).toBeGreaterThanOrEqual(300) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should specifically be a 307, so we should test for that
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
| expect(response.status()).toBeLessThan(400) | ||
|
|
||
| const location = response.headers()["location"] | ||
| expect(location).toBe("https://borrow.nypl.org/search/card?recordId=17782484") | ||
| }) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed