Build: #512 failed

Job: Default Job failed

Stages & jobs

  1. Default Stage

  2. QA

Job result summary

Completed
Duration
18 minutes
Agent
yue.openmrs.org
Revision
9081d5d0e1caa1501e82df83a4aa2332f34bfcca 9081d5d0e1caa1501e82df83a4aa2332f34bfcca
Total tests
625
Fixed in
#516 (Code changes detected)

Tests

  • 625 tests in total
  • 1 test failed
  • 1 failure is new
  • 44 seconds taken in total.
New test failures 1
Status Test Duration
Collapse Failed Test suite for ActionButton in BulkConceptsPage component should render with mappings Test suite for ActionButton in BulkConceptsPage component should render with mappings History
< 1 sec
Error: Method “getElement” is meant to be run on 1 node. 0 found instead.
    at ReactWrapper.single (/home/bamboo-agent/bamboo-agent/xml-data/build-dir/OCL-OC-JOB1/node_modules/enzyme/src/ReactWrapper.js:1166:13)
    at ReactWrapper.single [as getElement] (/home/bamboo-agent/bamboo-agent/xml-data/build-dir/OCL-OC-JOB1/node_modules/enzyme/src/ReactWrapper.js:180:17)
    at Object.getElement (/home/bamboo-agent/bamboo-agent/xml-data/build-dir/OCL-OC-JOB1/src/tests/bulkConcepts/components/PreviewCard.test.js:51:33)
    at Object.asyncJestTest (/home/bamboo-agent/bamboo-agent/xml-data/build-dir/OCL-OC-JOB1/node_modules/jest-jasmine2/build/jasmine_async.js:108:37)
    at e (/home/bamboo-agent/bamboo-agent/xml-data/build-dir/OCL-OC-JOB1/node_modules/jest-jasmine2/build/queue_runner.js:56:12)
    at mapper (/home/bamboo-agent/bamboo-agent/xml-data/build-dir/OCL-OC-JOB1/node_modules/jest-jasmine2/build/queue_runner.js:43:19)
    at promise.then (/home/bamboo-agent/bamboo-agent/xml-data/build-dir/OCL-OC-JOB1/node_modules/jest-jasmine2/build/queue_runner.js:87:41)

Error summary

The build generated some errors. See the full build log for more details.


› 1 snapshot written.
PASS src/tests/Dashboard/action/ConceptsActionCreator.test.js
PASS src/tests/Auth/notFound.test.js
  ● Console

    console.warn node_modules/react-dom/cjs/react-dom.development.js:11494
      Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
     
      * Move code with side effects to componentDidMount, and set initial state in the constructor.
      * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
     
      Please update the following components: MemoryRouter, Router
    console.warn node_modules/react-dom/cjs/react-dom.development.js:11494
      Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
     
      * Move data fetching code or side effects to componentDidUpdate.
      * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
      * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
     
      Please update the following components: Router

› 1 snapshot written.
PASS src/tests/Title.test.js
  ● Console

    console.warn node_modules/react-dom/cjs/react-dom.development.js:11494
      Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
     
      * Move code with side effects to componentDidMount, and set initial state in the constructor.
      * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
     
      Please update the following components: SideEffect(NullComponent)

› 2 snapshots written.
PASS src/tests/dictionaryConcepts/components/MapType.test.js
PASS src/tests/App.test.js
  ● Console

    console.warn node_modules/react-dom/cjs/react-dom.development.js:11494
      Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
     
      * Move code with side effects to componentDidMount, and set initial state in the constructor.
      * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
     
      Please update the following components: Authenticate, Route, Router, SideEffect(NullComponent), Switch, _class
    console.warn node_modules/react-dom/cjs/react-dom.development.js:11494
      Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
     
      * Move data fetching code or side effects to componentDidUpdate.
      * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
      * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
     
      Please update the following components: Connect(Authenticate), Connect(Notifications), Connect(withRouter(Login)), Connect(withRouter(Navbar)), Provider, Route, Router, Switch
    console.warn node_modules/react-dom/cjs/react-dom.development.js:11494
      Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
     
      * Move data fetching code or side effects to componentDidUpdate.
      * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
     
      Please update the following components: Connect(Authenticate), Connect(Notifications), Connect(withRouter(Login)), Connect(withRouter(Navbar))


Summary of all failing tests
FAIL src/tests/bulkConcepts/components/PreviewCard.test.js
  ● Test suite for ActionButton in BulkConceptsPage component › should render with mappings

    Method “getElement” is meant to be run on 1 node. 0 found instead.

      49 |     </Router>);
      50 |     expect(wrapper.length).toEqual(1);
    > 51 |     expect(wrapper.find('Cell').getElement(0).props.original).toEqual(newProps.concept.mappings[0]);
         |                                 ^
      52 |   });
      53 |
      54 |   it('should render with mappings containing set members', () => {

      at ReactWrapper.single (node_modules/enzyme/src/ReactWrapper.js:1166:13)
      at ReactWrapper.single [as getElement] (node_modules/enzyme/src/ReactWrapper.js:180:17)
      at Object.getElement (src/tests/bulkConcepts/components/PreviewCard.test.js:51:33)


Snapshot Summary
› 64 snapshots written from 25 test suites.

Test Suites: 1 failed, 72 passed, 73 total
Tests:       1 failed, 641 passed, 642 total
Snapshots:   64 written, 64 total
Time:        121.44s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! openmrs-ocl-client@0.1.0 test:bamboo: `react-scripts test --env=jsdom -u --ci --coverage --testResultsProcessor ./node_modules/jest-junit`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the openmrs-ocl-client@0.1.0 test:bamboo script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/bamboo-agent/.npm/_logs/2019-09-23T10_06_43_219Z-debug.log
+ docker --version
+ docker login -u openmrsci -p ********
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /home/bamboo-agent/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

+ IMAGE=openmrs/ocl-client
+ TAG=latest
+ /usr/bin/docker build --force-rm=true --tag=openmrs/ocl-client:latest .
+ docker push openmrs/ocl-client:latest
+ docker image inspect '--format={{index .RepoDigests 0}}' openmrs/ocl-client:latest