summaryrefslogtreecommitdiffstats
path: root/ui-react/src/LoopUI.test.js
diff options
context:
space:
mode:
authorxuegao <xg353y@intl.att.com>2020-04-06 13:13:52 +0200
committerxuegao <xg353y@intl.att.com>2020-04-06 13:13:52 +0200
commitcc5fe51690dc1f780c6b7cd1168e59dedc3b245f (patch)
tree7e980becaa09c546bd9119b6cd3248adbf217788 /ui-react/src/LoopUI.test.js
parent9768ccd8a3aed74b01d5646373f64b78880a7058 (diff)
Update suc alert color
Update the back groud color for succesful alert messages. Issue-ID: CLAMP-815 Change-Id: I97a621e31f2eb850eae30da3754afd3cd4ddb34a Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'ui-react/src/LoopUI.test.js')
-rw-r--r--ui-react/src/LoopUI.test.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/ui-react/src/LoopUI.test.js b/ui-react/src/LoopUI.test.js
index d1b76aa9a..6885e7932 100644
--- a/ui-react/src/LoopUI.test.js
+++ b/ui-react/src/LoopUI.test.js
@@ -66,7 +66,8 @@ describe('Verify LoopUI', () => {
const component = shallow(<LoopUI />)
component.setState({
loopName: "testLoopName",
- showAlert: false
+ showSucAlert: false,
+ showFailAlert: false
});
await flushPromises();
expect(component).toMatchSnapshot();
@@ -158,15 +159,22 @@ describe('Verify LoopUI', () => {
test('Test alert methods', () => {
const component = shallow(<LoopUI />)
- expect(component.state('showAlert')).toEqual(false);
+ expect(component.state('showSucAlert')).toEqual(false);
const instance = component.instance();
- instance.showAlert("testAlert");
- expect(component.state('showAlert')).toEqual(true);
+ instance.showSucAlert("testAlert");
+ expect(component.state('showSucAlert')).toEqual(true);
+ expect(component.state('showFailAlert')).toEqual(false);
expect(component.state('showMessage')).toEqual("testAlert");
instance.disableAlert();
- expect(component.state('showAlert')).toEqual(false);
+ expect(component.state('showSucAlert')).toEqual(false);
+ expect(component.state('showFailAlert')).toEqual(false);
+
+ instance.showFailAlert("testAlert2");
+ expect(component.state('showSucAlert')).toEqual(false);
+ expect(component.state('showFailAlert')).toEqual(true);
+ expect(component.state('showMessage')).toEqual("testAlert2");
})
});