Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/flash_spec.js')
-rw-r--r--spec/frontend/flash_spec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/frontend/flash_spec.js b/spec/frontend/flash_spec.js
index a809bf248bf..a105b0b165c 100644
--- a/spec/frontend/flash_spec.js
+++ b/spec/frontend/flash_spec.js
@@ -193,6 +193,20 @@ describe('Flash', () => {
);
});
+ describe('with title', () => {
+ const mockTitle = 'my title';
+
+ it('shows title and message', () => {
+ createAlert({
+ title: mockTitle,
+ message: mockMessage,
+ });
+
+ const text = document.querySelector('.flash-container').textContent.trim();
+ expect(text).toBe(`${mockTitle} ${mockMessage}`);
+ });
+ });
+
describe('with buttons', () => {
const findAlertAction = () => document.querySelector('.flash-container .gl-alert-action');