-
Notifications
You must be signed in to change notification settings - Fork 16
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
[Storage] Validate errors on create bucket modal test #2224
[Storage] Validate errors on create bucket modal test #2224
Conversation
Your Render PR Server URL is https://chainsafe-components-stage-pr-2224.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-cb82qq5i0e89jkmk7np0. |
Your Render PR Server URL is https://files-ui-stage-pr-2224.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-cb82qrdi0e89jkmk7ntg. |
Your Render PR Server URL is https://storage-ui-stage-pr-2224.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-cb82qsti0e89jkmk7of0. |
bucketsPage.createBucketButton().click() | ||
createBucketModal.body().should("be.visible") | ||
// ensure can't create an empty bucket |
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.
Minor thing but I find that leaving a whitespace before each comment / individual check in the flow of the test helps readability, it's not done here but is elsewhere in the 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.
yep! it helps, done!
bucketsPage.createBucketButton().click() | ||
createBucketModal.body().should("be.visible") | ||
// ensure can't create an empty bucket | ||
createBucketModal.submitButton().click() | ||
createBucketModal.bucketNameInput().should("have.class", "error") |
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.
Interesting, I've never thought about using the class name before like this. I would usually avoid doing that (as I'd be concerned about it being too generic and potentially picking up a false match from elsewhere on the page)...but you've scoped it to within the bucketNameInput element so I guess that's not a valid concern, nice! 🤩
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.
yes! the other way around is checking that the modal is still present and validating the text... but we don't want to add validations that have hardcoded text, so I ended up doing that inside the input, so we shouldn't have any problem. Also, I added a validation when the input is correct that the class 'error' should not be present
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.
👍
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.
Looks good! Thanks for this.
closes #2221