diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-03 21:11:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-03 21:11:17 +0300 |
commit | 44434461b3c58336624125b5ab002e7200e4a208 (patch) | |
tree | cef2ea602e94abd9c1ef6ee77b6988c4c85475b7 /spec/frontend/flash_spec.js | |
parent | e6fa9529b4922a4c552e8908a2929ff995e8b53d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/flash_spec.js')
-rw-r--r-- | spec/frontend/flash_spec.js | 14 |
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'); |