forked from DevExpress/testcafe
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed cursor moving out from iframe in move automation (closes DevExp…
- Loading branch information
1 parent
8e7c3ba
commit 8dcd98a
Showing
5 changed files
with
68 additions
and
1 deletion.
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
23 changes: 23 additions & 0 deletions
23
test/functional/fixtures/regression/gh-1140/pages/iframe.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,23 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>GH-1140 iframe</title> | ||
<style> | ||
#target { | ||
width:200px; | ||
height:200px; | ||
background: grey; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
document | ||
.querySelector('#target') | ||
.addEventListener('click', function () { | ||
window.location.reload(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
24 changes: 24 additions & 0 deletions
24
test/functional/fixtures/regression/gh-1140/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,24 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>GH-1140 index</title> | ||
<style> | ||
#iframe { | ||
position:absolute; | ||
top:1200px; | ||
width:250px; | ||
height:250px; | ||
} | ||
|
||
#target { | ||
width:50px; | ||
height:50px; | ||
background: grey; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<iframe id="iframe" src="iframe.html"></iframe> | ||
</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,7 @@ | ||
describe('[Regression](GH-1140)', function () { | ||
it('Test should not hang while iframe is reloaded and it is not under cursor', function () { | ||
// NOTE: we set selectorTimeout to a large value to wait for an iframe to load | ||
// on the farm (it is fast locally but can take some time on the farm) | ||
return runTests('testcafe-fixtures/index.test.js', 'Perform an action after iframe reloaded', { selectorTimeout: 10000 }); | ||
}); | ||
}); |
10 changes: 10 additions & 0 deletions
10
test/functional/fixtures/regression/gh-1140/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 @@ | ||
fixture `gh-1140` | ||
.page('http://localhost:3000/fixtures/regression/gh-1140/pages/index.html'); | ||
|
||
test('Perform an action after iframe reloaded', async t => { | ||
await t | ||
.switchToIframe('#iframe') | ||
.click('#target') | ||
.switchToMainWindow() | ||
.click('#target'); | ||
}); |