Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

feat(screener): add screener tests with steps #797

Merged
merged 14 commits into from
Jan 31, 2019

Conversation

silviuaavram
Copy link
Collaborator

@silviuaavram silviuaavram commented Jan 30, 2019

Edited screener.config.js to check for test files that have tests with steps. Also edited the states property gets created.

Added shorthand for triggerButton in Dropdown 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.

Copy link
Member

@layershifter layershifter left a 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(),
  },
])

Copy link
Member

@layershifter layershifter left a 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

Copy link
Collaborator

@bmdalex bmdalex left a 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

Copy link
Contributor

@mnajdova mnajdova left a 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.

screener.config.js Outdated Show resolved Hide resolved
@silviuaavram silviuaavram merged commit 0c6e355 into master Jan 31, 2019
@layershifter layershifter deleted the feat/screener-with-steps branch February 19, 2019 09:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants