diff options
author | Ted Humphrey <Thomas.Humphrey@att.com> | 2020-01-27 18:57:39 -0500 |
---|---|---|
committer | Ted Humphrey <Thomas.Humphrey@att.com> | 2020-02-04 17:31:38 -0500 |
commit | 01e5fde3fa45638f3ad884ca76ad861d8781868a (patch) | |
tree | d7193a0fcdabd169fb78c79c5ad191369f78e748 /ui-react/src/LoopUI.test.js | |
parent | 8d91398da6162c19643f3f7cae83327dd4e81263 (diff) |
Changes for populating ReactJS component library
Modification of Maven pom.xml to segregate creation of component library
away from the basic CLAMP UI. New directory ui-react-lib is introduced
and populated with just a few files to support the library creation.
Introduction of OnapConstants.js provides single focus for defining
constants shared across multiple components, resolving circular
dependency between LoopUI.js and MenuBar.js around defaultLoopName.
Modified LoopSvg.js to import withRoute from react-router-dom instead
of react-router, which was causing problems in usage of completed
component library.
Issue-ID: CLAMP-586
Change-Id: I3054d5388b8aa7417fe7566c34279390d24fb80a
Signed-off-by: Ted Humphrey <Thomas.Humphrey@att.com>
Diffstat (limited to 'ui-react/src/LoopUI.test.js')
-rw-r--r-- | ui-react/src/LoopUI.test.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui-react/src/LoopUI.test.js b/ui-react/src/LoopUI.test.js index e28096bd..d1b76aa9 100644 --- a/ui-react/src/LoopUI.test.js +++ b/ui-react/src/LoopUI.test.js @@ -23,6 +23,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import LoopUI from './LoopUI'; +import OnapConstants from './utils/OnapConstants'; import LoopCache from './api/LoopCache'; import LoopActionService from './api/LoopActionService'; @@ -77,7 +78,7 @@ describe('Verify LoopUI', () => { const instance = component.instance(); instance.closeLoop(); - expect(component.state('loopName')).toEqual("Empty (NO loop loaded yet)"); + expect(component.state('loopName')).toEqual(OnapConstants.defaultLoopName); expect(historyMock.push.mock.calls[0]).toEqual([ '/']); }) |