Skip to content
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

[DDW-982] Distinguish unit and e2e test setup #1743

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Changelog

### Chores

- Improved the unit and e2e test setup ([PR 1743](https://github.com/input-output-hk/daedalus/pull/1743))
- Updated to react-polymorph@0.9.0-rc.25 which includes a theme var for checkbox icon color (([PR 1742](https://github.com/input-output-hk/daedalus/pull/1742)))
- Updated `cardano-wallet` to latest master branch revision which includes Jormungandr 0.8.0-rc7 ([PR 1739](https://github.com/input-output-hk/daedalus/pull/1739))
- Updated stake header info component and adds new information with the countdown timer for next epoch ([PR 1729](https://github.com/input-output-hk/daedalus/pull/1729))
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"dev": "IS_WATCH_MODE=true gulp dev",
"dev:itn": "NETWORK=itn_rewards_v1 IS_WATCH_MODE=true gulp dev",
"test": "NODE_ENV=test yarn build && yarn test:unit && yarn test:e2e",
"test:unit": "yarn cucumber --require 'tests/**/unit/*.js' --tags '@unit and not @skip and not @wip'",
"test:unit": "yarn cucumber --require 'tests/**/unit/**/*.js' --tags '@unit and not @skip and not @wip'",
"test:unit:watch": "nodemon --watch source --watch tests --exec \"yarn test:unit --tags '@unit and @watch'\"",
"test:unit:unbound": "yarn cucumber --require 'tests/**/unit/*.js' --tags '@unbound and not @skip and not @wip'",
"test:e2e": "yarn cucumber --require 'tests/**/e2e/*.js' --tags '@e2e and not @skip and not @wip'",
"test:e2e": "yarn cucumber --require 'tests/setup-e2e.js' --require 'tests/**/e2e/**/*.js' --tags '@e2e and not @skip and not @wip'",
"test:e2e:watch": "gulp test:e2e:watch",
"cucumber": "cross-env NODE_ENV=test cucumber-js tests --require 'tests/**/*.js' --require-module @babel/register -f node_modules/cucumber-pretty --format-options '{\"snippetInterface\": \"async-await\"}'",
"cucumber": "cross-env NODE_ENV=test cucumber-js tests --require 'tests/setup-common.js' --require-module @babel/register -f node_modules/cucumber-pretty --format-options '{\"snippetInterface\": \"async-await\"}'",
"test:e2e:watch:once": "KEEP_APP_AFTER_TESTS=true yarn test:e2e --tags '@e2e and @watch'",
"debug": "gulp debug",
"package": "gulp build && cross-env NODE_ENV=production node -r @babel/register -r @babel/polyfill scripts/package.js",
Expand Down
6 changes: 6 additions & 0 deletions tests/setup-common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Before } from 'cucumber';

// Add context object to share data between steps
Before(function() {
this.context = {};
});
5 changes: 0 additions & 5 deletions tests/setup.js → tests/setup-e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ Before({ tags: '@e2e', timeout: DEFAULT_TIMEOUT * 2 }, async function(testCase)
});
});

// adds context object to webdriver
Before(function() {
this.context = {};
});

Before({ tags: '@newsfeed' }, function() {
setNewsFeedIsOpen(this.client, false);
resetTestNews(this.client);
Expand Down