summaryrefslogtreecommitdiffstats
path: root/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumEditForm.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumEditForm.test.js')
-rw-r--r--gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumEditForm.test.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumEditForm.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumEditForm.test.js
index a1aed28..8bc3ed0 100644
--- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumEditForm.test.js
+++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumEditForm.test.js
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2020-2021 Nordix Foundation
+ * Copyright (C) 2020-2022 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -132,4 +132,13 @@ test('Test Generate Description Pressed', () => {
const mock_activate = jest.fn(mod.editContextAlbumForm_generateDescriptionPressed);
mock_activate();
expect(mock_activate).toBeCalled();
-}); \ No newline at end of file
+});
+
+test('Test editContextAlbumForm_cancelPressed', () => {
+ jest.spyOn(apexUtils, 'apexUtils_removeElement').mockReturnValue(null);
+ jest.spyOn(document, 'getElementById').mockReturnValue(null);
+ jest.spyOn(contextAlbumTab_reset, 'contextAlbumTab_reset').mockReturnValue(null);
+ const mock_activate = jest.fn(mod.editContextAlbumForm_cancelPressed);
+ mock_activate();
+ expect(mock_activate).toBeCalled();
+});