-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3eddd2c
commit 9ad44b8
Showing
3 changed files
with
53 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<html> | ||
<head> | ||
<title>change page</title> | ||
<style type="text/css"> | ||
body { | ||
margin: 0; | ||
background-color: #eee; | ||
} | ||
header { | ||
background-color: #111; | ||
width: 100%; | ||
text-align: center; | ||
font-size: 1.3em; | ||
color: #fff; | ||
} | ||
.content { | ||
text-align: center; | ||
} | ||
.content > a { | ||
padding: 5px; | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
background-color: #fff; | ||
text-decoration: none; | ||
color: #111; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<header>change page</header> | ||
<button id="js-wait-nav" onclick="changePage()">hey</button> | ||
<script> | ||
function changePage() { | ||
setTimeout(() => { | ||
const parts = document.location.pathname.split('/').filter(x => x.length > 0); | ||
parts[parts.length - 1] = 'elements.html'; | ||
document.location.pathname = parts.join('/'); | ||
}, 250); | ||
} | ||
</script> | ||
</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,6 @@ | ||
// This test ensures that the script is working as expecting even through browser navigation and | ||
// page changes. | ||
goto: "file://" + |CURRENT_DIR| + "/" + |DOC_PATH| + "/change-page.html" | ||
assert-document-property: {"title": "change page"} | ||
click: "#js-wait-nav" | ||
wait-for-document-property: {"title": "Other page"} |
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 @@ | ||
=> Starting doc-ui tests... | ||
|
||
page-change-in-wait... ok | ||
|
||
<= doc-ui tests done: 1 succeeded, 0 failed |