diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-10 21:09:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-10 21:09:24 +0000 |
commit | 02c3b2af448be6a5004e8d833cbcbf8e5f185210 (patch) | |
tree | 27359dc5c21a8901c9eb95a0101cb97087b1f4ac /spec/frontend/settings_panels_spec.js | |
parent | 577bb49691b11bc8ebae3a4966153ed39af60d87 (diff) | |
download | gitlab-ce-02c3b2af448be6a5004e8d833cbcbf8e5f185210.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/settings_panels_spec.js')
-rw-r--r-- | spec/frontend/settings_panels_spec.js | 10 |
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); }); }); |