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
Clear validation errors when a resource template is loaded #795
Conversation
// This assertion adds 1 to each it blocks assertion count | ||
await pupExpect(page).toClick('a', { text: 'BIBFRAME Instance' }) | ||
|
||
// Click on one of the property type rows to expand a nested resource |
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.
do we need the rest of this function?
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.
Oh yeah, probably not. That's just how I was manually testing it. Will update.
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.
Done. Good catch.
@@ -27,3 +27,8 @@ export async function fillInRequredFieldsForBibframeInstance() { | |||
await page.waitForSelector('#rbt-menu-item-0') | |||
await page.click('#rbt-menu-item-0') | |||
} | |||
|
|||
export async function incompleteFieldsForBibframeInstance() { | |||
// This assertion adds 1 to each it blocks assertion count |
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.
PR looks fine but I don't understand this comment.
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.
I'm not great and clarifying this, but this is the assertion that means any block "it" block that includes this call needs to check for it's assertions+1.
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.
ah! how about
// this assertion adds 1 to each "it" block's expect.assertion(n) count
Fixes #745
Clears the errors and sets displayValidations to false when a resource template is loaded. Adds unit testing for the values and an integration test for displaying and clearing the validation errors on the page.
Before: After validation errors and clicking on a new template - Validation errors are still displayed.
After: After validation errors and clicking on a new template - Validation errors are cleared.