summaryrefslogtreecommitdiff
path: root/spec/frontend/vue_shared/components/settings
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/vue_shared/components/settings')
-rw-r--r--spec/frontend/vue_shared/components/settings/__snapshots__/settings_block_spec.js.snap2
-rw-r--r--spec/frontend/vue_shared/components/settings/settings_block_spec.js21
2 files changed, 22 insertions, 1 deletions
diff --git a/spec/frontend/vue_shared/components/settings/__snapshots__/settings_block_spec.js.snap b/spec/frontend/vue_shared/components/settings/__snapshots__/settings_block_spec.js.snap
index 51b8aa162bc..ed085fb66dc 100644
--- a/spec/frontend/vue_shared/components/settings/__snapshots__/settings_block_spec.js.snap
+++ b/spec/frontend/vue_shared/components/settings/__snapshots__/settings_block_spec.js.snap
@@ -2,7 +2,7 @@
exports[`Settings Block renders the correct markup 1`] = `
<section
- class="settings no-animate"
+ class="settings"
>
<div
class="settings-header"
diff --git a/spec/frontend/vue_shared/components/settings/settings_block_spec.js b/spec/frontend/vue_shared/components/settings/settings_block_spec.js
index 2db0b001b5b..be5a15631eb 100644
--- a/spec/frontend/vue_shared/components/settings/settings_block_spec.js
+++ b/spec/frontend/vue_shared/components/settings/settings_block_spec.js
@@ -50,6 +50,27 @@ describe('Settings Block', () => {
expect(findDescriptionSlot().exists()).toBe(true);
});
+ describe('slide animation behaviour', () => {
+ it('is animated by default', () => {
+ mountComponent();
+
+ expect(wrapper.classes('no-animate')).toBe(false);
+ });
+
+ it.each`
+ slideAnimated | noAnimatedClass
+ ${true} | ${false}
+ ${false} | ${true}
+ `(
+ 'sets the correct state when slideAnimated is $slideAnimated',
+ ({ slideAnimated, noAnimatedClass }) => {
+ mountComponent({ slideAnimated });
+
+ expect(wrapper.classes('no-animate')).toBe(noAnimatedClass);
+ },
+ );
+ });
+
describe('expanded behaviour', () => {
it('is collapsed by default', () => {
mountComponent();