-
Notifications
You must be signed in to change notification settings - Fork 21
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
Refactor Document list test file to new format #3446
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for ons-design-system-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Some minor comments but the THENs have been missed from this file
Co-authored-by: rmccar <[email protected]>
Co-authored-by: rmccar <[email protected]>
Co-authored-by: rmccar <[email protected]>
Co-authored-by: rmccar <[email protected]>
…://github.com/ONSdigital/design-system into enhancement/46/testing-refactor-document-list
const hiddenText = $('.ons-document-list__item-attribute').text().trim(); | ||
expect(hiddenText).toBe('PDF, 499KB, 1 page'); | ||
test('THEN: has file information displayed', () => { | ||
const hiddenText = $('.ons-document-list__item-attribute').text().trim(); |
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.
Should this be called hiddenText? isn't it testing for text that is displayed?
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.
This is testing displayed text not hidden text so should be named as such
Can you just have a double check that all params that can be set have a test that tests their functionality. You can use the _macro-options.md file for a list |
Have gone through the documentation and added few tests. I think all params are being covered now. |
There are still some tests missing, I started going through them and noticed |
Co-authored-by: rmccar <[email protected]>
Co-authored-by: rmccar <[email protected]>
What is the context of this PR?
46
Refactored the document list macro.spec file as per the new format.
How to review this PR
Ask yourself....
run this test command to view the test results:
yarn test --testNamePattern="FOR: Macro: Document list"
Checklist
This needs to be completed by the person raising the PR.