Skip to content

Commit

Permalink
test: added test [Regression](DevExpressGH-3495) - Visibility check s…
Browse files Browse the repository at this point in the history
…hould incorporate visibility of parent SVG element(s)
  • Loading branch information
Aleksey28 committed Dec 27, 2021
1 parent 9ffea0f commit 01d1f02
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/functional/fixtures/regression/gh-3495/pages/index.html
@@ -0,0 +1,14 @@
<html>
<body>
<div>
<span data-test="checkbox">
<div id="parent" style="display:none">
<svg id="child" fill="grey" stroke="red" viewBox="0 0 300 100">
<circle cx="50" cy="50" r="40"/>
<circle cx="150" cy="50" r="4"/>
</svg>
</div>
</span>
</div>
</body>
</html>
10 changes: 10 additions & 0 deletions test/functional/fixtures/regression/gh-3495/test.js
@@ -0,0 +1,10 @@
describe('[Regression](GH-3495) - Visibility check should incorporate visibility of parent SVG element(s)', function () {
it('Check visibility parent', function () {
return runTests('testcafe-fixtures/index.js', 'Paren shouldn\'t be visible');
});
it('Check visibility child', function () {
return runTests('testcafe-fixtures/index.js', 'Child shouldn\'t be visible');
});
});


@@ -0,0 +1,21 @@
import { Selector } from 'testcafe';

fixture`Fixture`
.page('../pages/index.html');

test('Paren shouldn\'t be visible', async t => {
const svg = Selector('#parent');

await t
.expect(svg.exists).ok()
.debug()
.expect(svg.visible).notOk();
});

test('Child shouldn\'t be visible', async t => {
const svg = Selector('#child');

await t
.expect(svg.exists).ok()
.expect(svg.visible).notOk();
});

0 comments on commit 01d1f02

Please sign in to comment.