Skip to content

Commit

Permalink
pin stripes to v2.8.0
Browse files Browse the repository at this point in the history
Given that this will be deployed to an environment with stripes v2.8.0
and that it is based of a release (v2.4) when that was the current
stripes release, we will pin the dev-dep on stripes to v2.8 as well.

The issue here is that subtle differences in the markup of some
components, likely `<MultiColumnList>`, is causing unit test failures
because we have v2.8-era selectors in the tests here in ui-users but NPM
is pulling down a newer version to conduct the tests. At the API level,
`<MCL>` _is still compatible_, but its internal markup, which these
selectors inadvertently rely on, has changed.
  • Loading branch information
zburke committed Sep 24, 2019
1 parent 19f54b8 commit 7a9ff73
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,8 @@
"@bigtest/mocha": "^0.5.2",
"@bigtest/react": "^0.1.2",
"@folio/eslint-config-stripes": "^3.2.1",
"@folio/stripes": "^2.0.0",
"@folio/stripes": "~2.8.0",
"@folio/stripes-cli": "^1.11.0",
"@folio/stripes-core": "^3.0.1",
"babel-eslint": "^9.0.0",
"babel-polyfill": "^6.26.0",
"chai": "^4.2.0",
Expand Down
15 changes: 15 additions & 0 deletions test/bigtest/helpers/turn-off-warnings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const warn = console.warn;
const blacklist = [
/componentWillReceiveProps has been renamed/,
/componentWillUpdate has been renamed/,
/componentWillMount has been renamed/,
];

export default function turnOffWarnings() {
console.warn = function (...args) {
if (blacklist.some(rx => rx.test(args[0]))) {
return;
}
warn.apply(console, args);
};
}
3 changes: 3 additions & 0 deletions test/bigtest/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import 'babel-polyfill';
import turnOffWarnings from './helpers/turn-off-warnings';

turnOffWarnings();

// require all modules ending in "-test" from the current directory and
// all subdirectories
Expand Down

0 comments on commit 7a9ff73

Please sign in to comment.