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/settings_panels_spec.js')
-rw-r--r--spec/frontend/settings_panels_spec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/frontend/settings_panels_spec.js b/spec/frontend/settings_panels_spec.js
index 6b739617b97..3a62cd703ab 100644
--- a/spec/frontend/settings_panels_spec.js
+++ b/spec/frontend/settings_panels_spec.js
@@ -24,6 +24,20 @@ describe('Settings Panels', () => {
expect(isExpanded(panel)).toBe(true);
});
+
+ it('should expand panel containing linked hash', () => {
+ window.location.hash = '#group_description';
+
+ const panel = document.querySelector('#js-general-settings');
+ // Our test environment automatically expands everything so we need to clear that out first
+ panel.classList.remove('expanded');
+
+ expect(isExpanded(panel)).toBe(false);
+
+ initSettingsPanels();
+
+ expect(isExpanded(panel)).toBe(true);
+ });
});
it('does not change the text content of triggers', () => {