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/sidebar/todo_spec.js')
-rw-r--r--spec/frontend/sidebar/todo_spec.js18
1 files changed, 2 insertions, 16 deletions
diff --git a/spec/frontend/sidebar/todo_spec.js b/spec/frontend/sidebar/todo_spec.js
index f5fc7407289..5f5a5257f41 100644
--- a/spec/frontend/sidebar/todo_spec.js
+++ b/spec/frontend/sidebar/todo_spec.js
@@ -88,27 +88,13 @@ describe('SidebarTodo', () => {
expect(wrapper.emitted().toggleTodo).toBeTruthy();
});
- it('renders component container element', () => {
+ it('renders component container element with proper data attributes', () => {
createComponent({
issuableId: 1,
issuableType: 'epic',
});
- const dataAttributes = {
- issuableId: '1',
- issuableType: 'epic',
- originalTitle: '',
- placement: 'left',
- container: 'body',
- boundary: 'viewport',
- };
-
- expect(wrapper.element.nodeName).toBe('BUTTON');
-
- const elDataAttrs = wrapper.element.dataset;
- Object.keys(elDataAttrs).forEach(attr => {
- expect(elDataAttrs[attr]).toBe(dataAttributes[attr]);
- });
+ expect(wrapper.element).toMatchSnapshot();
});
it('check button label computed property', () => {