-
Notifications
You must be signed in to change notification settings - Fork 187
Fix Missing Publishing Context HTTP Error #814
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 all commits
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 |
|---|---|---|
|
|
@@ -122,7 +122,11 @@ struct SiteTests { | |
|
|
||
| @Test("Site published with a custom ErrorPage and custom content") | ||
| func publishingWithCustomErrorPageAndContent() async throws { | ||
| let errorPage = TestErrorPage(title: "A different title", description: "A different description") | ||
| let expectedError = PageNotFoundError() | ||
|
|
||
| let errorPage = TestErrorPage(title: "A different title", description: "A different description") { error in | ||
| #expect(error.statusCode == expectedError.statusCode) | ||
|
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. Could we simply check
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. Heya sorry for the delay, life happened. Unless I'm missing something, checking the page's error after calling What I want the test to do is to guarantee that the correct error is present during site publishing. I can only do so by injecting this check when the rendering actually happens.
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. Gotcha—thanks for clarifying! |
||
| } | ||
| let site = TestSiteWithErrorPage(errorPage: errorPage) | ||
| var publisher = TestSitePublisher(site: site) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Can we create a dedicated init that mirrors the other convenience initializers?
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.
Not sure what you mean by this?
EnvironmentValueshas 5 different inits and I only modified the one that required the fix