-
Notifications
You must be signed in to change notification settings - Fork 334
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
Add tests for character-count script #1055
Conversation
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.
These look great, thanks Alex. There's a few long lines and minor things that I think could possibly be simplified, but I'd be happy to merge this as it stands – let me know if you do want to make any changes.
|
||
// Press 11 characters | ||
await page.focus('.js-character-count') | ||
for (let i = 0; i < 11; i++) { |
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 blocking: would page.keyboard.type('A'.repeat(11))
have the same effect?
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.
Repeat doesn't seem to be working, unfortunately, so I'll have to leave the for.
}) | ||
|
||
describe('Character count', () => { | ||
describe('when JavaScript is unavailable or fails', () => { |
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.
👌 Great to see tests for this.
@36degrees thanks. will update with your suggestions. |
@36degrees updated with suggestions except for |
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.
Thanks @alex-ju and @36degrees
This PR contains a basic set of tests for the character count component that were mistakenly missed from the initial PR by author's fault.
Issue: #1039