-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: E2E Testing for Planning Constraints #4063
Conversation
Removed vultr server and associated DNS entries |
@@ -50,6 +50,24 @@ export async function setUpTestContext( | |||
submissionEmail: context.team.settings?.submissionEmail, | |||
}, | |||
}); | |||
const integrations = await $admin.client.request( |
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.
Couldn't find a better way to switch has_planning_data
to true
- I'll probably move the mutation out and add it to the beforeAll
for the geospatial stuff since it's isolated to those tests
.getByRole("button", { name: "Constraints that don't apply" }) | ||
.click(); | ||
|
||
const dontApplyHeadings = await page.getByRole("heading").allTextContents(); |
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.
question: should this rather sit in a unit test?
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.
Good start but some unexpected mocks here for me - please see initial comments!
20a1f19
to
e371275
Compare
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.
Separated this from the geospatialMocks
object as it was quite long and not all of it was super relevant. Felt like the right way to keep things concise
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.
nit: our GIS API which you're mocking here explicitly returns constraints AND metadata in the same response - if you're worried about length I'd much prefer to see the whole planning constraints mock in its' own file rather than split piecemeal like this?
@@ -194,13 +193,6 @@ export async function submitCardDetails(page: Page) { | |||
await page.locator("#confirm").click(); | |||
} | |||
|
|||
export async function answerFindProperty(page: 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.
Moved this to a separate geoSpatialUserActions
doc to fit it better with the other ones
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.
nit: our GIS API which you're mocking here explicitly returns constraints AND metadata in the same response - if you're worried about length I'd much prefer to see the whole planning constraints mock in its' own file rather than split piecemeal like this?
What I want to test
I am not going to check UI elements like colours and accordion functionality, as I think this is what Storybook is better at, I'll focus on functionality.