From e8cfd8c788f419721f0a81a7d88dc22953c186cb Mon Sep 17 00:00:00 2001 From: Thomas Hutterer <thutterer@gitlab.com> Date: Mon, 30 Dec 2024 14:31:06 +0100 Subject: [PATCH] Use classes() instead of attributes() for class assertions --- spec/frontend/todos/components/todo_item_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/frontend/todos/components/todo_item_spec.js b/spec/frontend/todos/components/todo_item_spec.js index 0ab2ced53bb5..c4c8797b8a3f 100644 --- a/spec/frontend/todos/components/todo_item_spec.js +++ b/spec/frontend/todos/components/todo_item_spec.js @@ -73,12 +73,12 @@ describe('TodoItem', () => { describe('state based style', () => { it('applies background when todo is done', () => { createComponent({ todo: { state: TODO_STATE_DONE } }); - expect(wrapper.attributes('class')).toContain('gl-bg-subtle'); + expect(wrapper.classes()).toContain('gl-bg-subtle'); }); it('applies no background when todo is pending', () => { createComponent({ todo: { state: TODO_STATE_PENDING } }); - expect(wrapper.attributes('class')).not.toContain('gl-bg-subtle'); + expect(wrapper.classes()).not.toContain('gl-bg-subtle'); }); }); -- GitLab