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/lib/utils/dom_utils_spec.js')
-rw-r--r--spec/frontend/lib/utils/dom_utils_spec.js38
1 files changed, 14 insertions, 24 deletions
diff --git a/spec/frontend/lib/utils/dom_utils_spec.js b/spec/frontend/lib/utils/dom_utils_spec.js
index 88dac449527..b537e6b2bf8 100644
--- a/spec/frontend/lib/utils/dom_utils_spec.js
+++ b/spec/frontend/lib/utils/dom_utils_spec.js
@@ -5,7 +5,6 @@ import {
canScrollDown,
parseBooleanDataAttributes,
isElementVisible,
- isElementHidden,
getParents,
getParentByTagName,
setAttributes,
@@ -181,30 +180,21 @@ describe('DOM Utils', () => {
${1} | ${0} | ${0} | ${true}
${0} | ${1} | ${0} | ${true}
${0} | ${0} | ${1} | ${true}
- `(
- 'isElementVisible and isElementHidden',
- ({ offsetWidth, offsetHeight, clientRectsLength, visible }) => {
- const element = {
- offsetWidth,
- offsetHeight,
- getClientRects: () => new Array(clientRectsLength),
- };
-
- const paramDescription = `offsetWidth=${offsetWidth}, offsetHeight=${offsetHeight}, and getClientRects().length=${clientRectsLength}`;
-
- describe('isElementVisible', () => {
- it(`returns ${visible} when ${paramDescription}`, () => {
- expect(isElementVisible(element)).toBe(visible);
- });
+ `('isElementVisible', ({ offsetWidth, offsetHeight, clientRectsLength, visible }) => {
+ const element = {
+ offsetWidth,
+ offsetHeight,
+ getClientRects: () => new Array(clientRectsLength),
+ };
+
+ const paramDescription = `offsetWidth=${offsetWidth}, offsetHeight=${offsetHeight}, and getClientRects().length=${clientRectsLength}`;
+
+ describe('isElementVisible', () => {
+ it(`returns ${visible} when ${paramDescription}`, () => {
+ expect(isElementVisible(element)).toBe(visible);
});
-
- describe('isElementHidden', () => {
- it(`returns ${!visible} when ${paramDescription}`, () => {
- expect(isElementHidden(element)).toBe(!visible);
- });
- });
- },
- );
+ });
+ });
describe('getParents', () => {
it('gets all parents of an element', () => {