forked from DevExpress/testcafe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix filtering by index (closes DevExpress#1240)
- Loading branch information
1 parent
687dc18
commit 76b3b7e
Showing
4 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
test/functional/fixtures/regression/gh-1240/pages/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>GH-1240</title> | ||
</head> | ||
<body> | ||
<div id="div"> | ||
<span>Span</span> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe('[Regression](GH-1240)', function () { | ||
it('Test should not raise an error when try to get a non-existent child', function () { | ||
return runTests('testcafe-fixtures/index-test.js', 'Check a non-existent child', { only: ['chrome'] }); | ||
}); | ||
}); |
10 changes: 10 additions & 0 deletions
10
test/functional/fixtures/regression/gh-1240/testcafe-fixtures/index-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Selector } from 'testcafe'; | ||
|
||
fixture `gh-1240` | ||
.page `file://d:/git/testcafe/test/functional/fixtures/regression/gh-1240/pages/index.html`; | ||
|
||
test('Check a non-existent child', async t => { | ||
const span = Selector('#div').child(2); | ||
|
||
await t.expect(span.exists).notOk(); | ||
}); |