summaryrefslogtreecommitdiff
path: root/spec/frontend/settings_panels_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/settings_panels_spec.js')
-rw-r--r--spec/frontend/settings_panels_spec.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/frontend/settings_panels_spec.js b/spec/frontend/settings_panels_spec.js
index 2c5d91a45bc..8666106d3c6 100644
--- a/spec/frontend/settings_panels_spec.js
+++ b/spec/frontend/settings_panels_spec.js
@@ -1,5 +1,5 @@
import $ from 'jquery';
-import initSettingsPanels from '~/settings_panels';
+import initSettingsPanels, { isExpanded } from '~/settings_panels';
describe('Settings Panels', () => {
preloadFixtures('groups/edit.html');
@@ -20,11 +20,11 @@ describe('Settings Panels', () => {
// Our test environment automatically expands everything so we need to clear that out first
panel.classList.remove('expanded');
- expect(panel.classList.contains('expanded')).toBe(false);
+ expect(isExpanded(panel)).toBe(false);
initSettingsPanels();
- expect(panel.classList.contains('expanded')).toBe(true);
+ expect(isExpanded(panel)).toBe(true);
});
});
@@ -35,11 +35,11 @@ describe('Settings Panels', () => {
initSettingsPanels();
- expect(panel.classList.contains('expanded')).toBe(true);
+ expect(isExpanded(panel)).toBe(true);
$(trigger).click();
- expect(panel.classList.contains('expanded')).toBe(false);
+ expect(isExpanded(panel)).toBe(false);
expect(trigger.textContent).toEqual(originalText);
});
});