Skip to content

Commit f9eaeaa

Browse files
committed
updating test website code
1 parent 8aa4393 commit f9eaeaa

File tree

6 files changed

+122
-2
lines changed

6 files changed

+122
-2
lines changed

web/BUILD.bazel

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@aspect_rules_js//js:defs.bzl", "js_library")
2+
13
filegroup(
24
name = "web",
35
srcs = glob([
@@ -9,5 +11,16 @@ filegroup(
911
"//java/test/org/openqa/selenium/environment:__pkg__",
1012
"//javascript/node/selenium-webdriver:__pkg__",
1113
"//py:__pkg__",
14+
"//rb/spec:__subpackages__",
15+
],
16+
)
17+
18+
js_library(
19+
name = "js-lib",
20+
data = [
21+
":web",
22+
],
23+
visibility = [
24+
"//javascript/node/selenium-webdriver:__subpackages__",
1225
],
1326
)

web/fedcm/fedcm.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<script>
33

4-
let configURL = `https://${location.host}/fedcm/fedcm.json`;
4+
let configURL = `http://${location.host}/fedcm/fedcm.json`;
55
let promise = null;
66

77
function triggerFedCm() {

web/fedcm/fedcm.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"accounts_endpoint": "accounts.json",
33
"client_metadata_endpoint": "client_metadata.json",
44
"id_assertion_endpoint": "id_assertion",
5-
"signin_url": "/signin"
5+
"signin_url": "/signin",
6+
"login_url": "/login"
67
}

web/javascriptPage.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ <h1>Type Stuff</h1>
279279
</div>
280280
</div>
281281

282+
<form id="aParentFormId">
283+
<input type="text" name="tagName">
284+
</form>
285+
282286
</body>
283287
</html>
284288

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<html>
2+
<head>
3+
<title>Modern Modal</title>
4+
<style>
5+
/* Modal background */
6+
#modalBackground {
7+
display: none;
8+
position: fixed;
9+
z-index: 1;
10+
left: 0;
11+
top: 0;
12+
width: 100%;
13+
height: 100%;
14+
overflow: auto;
15+
background-color: rgba(0,0,0,0.4);
16+
}
17+
18+
/* Modal content */
19+
#modalContent {
20+
position: absolute;
21+
background-color: #fff;
22+
padding: 20px;
23+
border: 1px solid #888;
24+
width: 250px;
25+
height: 200px;
26+
z-index: 2;
27+
28+
/* Center the modal */
29+
top: 50%;
30+
left: 50%;
31+
transform: translate(-50%, -50%);
32+
}
33+
34+
/* Close button */
35+
.close {
36+
color: #aaa;
37+
float: right;
38+
font-size: 28px;
39+
font-weight: bold;
40+
cursor: pointer;
41+
}
42+
43+
.close:hover,
44+
.close:focus {
45+
color: black;
46+
text-decoration: none;
47+
cursor: pointer;
48+
}
49+
</style>
50+
</head>
51+
52+
<body>
53+
<p>Modal dialog sample</p>
54+
55+
<input id="trigger-modal-btn" type="button" value="trigger modal" onclick="openModal();">
56+
57+
<a id="trigger-modal-link" href="javascript:openModal()">trigger modal</a>
58+
59+
<!-- Modal structure -->
60+
<div id="modalBackground">
61+
<div id="modalContent">
62+
<span id="modal-close" class="close" onclick="closeModal()">&times;</span>
63+
<span id="modal-text">I am a modal</span>
64+
<input type="text" id="modal-input"/>
65+
</div>
66+
</div>
67+
68+
<script>
69+
function openModal() {
70+
// Display the modal and dim the background
71+
document.getElementById('modalBackground').style.display = 'block';
72+
}
73+
74+
function closeModal() {
75+
// Hide the modal and remove the dimming effect
76+
document.getElementById('modalBackground').style.display = 'none';
77+
}
78+
79+
// Optional: Close the modal when clicking outside of it
80+
window.onclick = function(event) {
81+
var modal = document.getElementById('modalBackground');
82+
if (event.target == modal) {
83+
closeModal();
84+
}
85+
}
86+
</script>
87+
</body>
88+
</html>

web/select_space.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4+
<title>Multiple Selection test page</title>
5+
</head>
6+
<body>
7+
<select id="selectWithoutMultiple">
8+
<option value="one">one</option>
9+
<option value="two">&nbsp;&nbsp;two</option>
10+
<option value="three">&nbsp;&nbsp;&nbsp;three</option>
11+
<option value="four">&nbsp;&nbsp;&nbsp;&nbsp;four</option>
12+
<option value="five">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;five</option>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)