-
Notifications
You must be signed in to change notification settings - Fork 55
feat(screener): add screener tests with steps #797
Conversation
ad4abb8
to
8abcb12
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.
As we already have glob
in dependencies I have a proposal to place steps files near with examples, i.e:
DropdownExampleSingleSelection.shorthand.tsx
DropdownExampleSingleSelection.steps.js
Then resolve these files via glob
and use them, this will also allow to simplify structure of file:
module.exports = (Steps) => ([
{
name: 'Shows List',
steps: new Steps()
.click(selector('CLASSNAME'))
.snapshot('Snapshot')
.end(),
},
])
docs/src/examples/components/Dropdown/Types/DropdownExampleSingleSelection.shorthand.tsx
Outdated
Show resolved
Hide resolved
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.
LGTM except two comments, fix them please before merge 🐱
Also it will be nice to hear feedback from @kuzhelov before merge
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, one small comment
docs/src/examples/components/Dropdown/Types/DropdownExampleSingleSelection.shorthand.steps.js
Show resolved
Hide resolved
90272c9
to
c841e8c
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.
🥇 Let's just create issue for the problems with using JS files here, as we are aware at this moment that we have problems when we want to import something from TS files.
c9acebb
to
5214092
Compare
Edited
screener.config.js
to check for test files that have tests with steps. Also edited thestates
property gets created.Added shorthand for
triggerButton
inDropdown
so I can add a test id attribute to it, for better and safer selection in screener (and future e2e) tests. Edit: if we decide to use className, will leave the shorthand for now, it is still useful.