Skip to content

Commit 3e8261d

Browse files
committed
[bazel] Fix runfiles loading in JavaScript tests
1 parent 0608c63 commit 3e8261d

File tree

8 files changed

+21784
-1551
lines changed

8 files changed

+21784
-1551
lines changed

MODULE.bazel.lock

Lines changed: 21773 additions & 1540 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

java/test/org/openqa/selenium/build/InProject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static Path findProjectRoot() {
6969
if (!Platform.getCurrent().is(WINDOWS)) {
7070
dir = findRunfilesRoot();
7171
if (dir != null) {
72-
return dir.resolve("selenium").normalize();
72+
return dir.resolve("_main").normalize();
7373
}
7474
}
7575

java/test/org/openqa/selenium/javascript/JavaScriptTestSuite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public Collection<DynamicTest> dynamicTests() throws IOException {
8383
try {
8484
String url = "/" + s;
8585
if (isBazel() && !url.startsWith("/common/generated/")) {
86-
url = "/filez/selenium" + url;
86+
url = "/filez/_main" + url;
8787
}
8888
return new URL(appServer.whereIs(url));
8989
} catch (MalformedURLException e) {

java/test/org/openqa/selenium/javascript/TestFileLocator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private static Path getTestDirectory() {
7272
Path testDir;
7373
if (runfiles != null) {
7474
// Running with bazel.
75-
testDir = runfiles.resolve("selenium").resolve(testDirName);
75+
testDir = runfiles.resolve("_main").resolve(testDirName);
7676
} else {
7777
// Legacy.
7878
testDir = InProject.locate(testDirName);

javascript/atoms/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ browser. You can do this by starting a debug server:
1717
bazel run javascript/atoms:test_debug_server
1818
```
1919

20-
And then navigating to: <http://localhost:2310/filez/selenium/javascript/atoms/>
20+
And then navigating to: <http://localhost:2310/filez/_main/javascript/atoms/>
2121

2222
You'll be able to browse around the filesystem until you find the test
2323
you want to work on.

javascript/atoms/test/test_bootstrap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262
'../../deps.js'
6363
];
6464

65-
if (location.pathname.lastIndexOf('/filez/selenium/javascript/', 0) === 0) {
65+
if (location.pathname.lastIndexOf('/filez/_main/javascript/', 0) === 0) {
6666
directoryPath = '';
6767
files = [
6868
'/filez/com_google_javascript_closure_library/closure/goog/base.js',
69-
'/filez/selenium/javascript/atoms/deps.js',
69+
'/filez/_main/javascript/atoms/deps.js',
7070
];
7171
}
7272

javascript/chrome-driver/test/test_bootstrap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@
6060
'../../deps.js'
6161
];
6262

63-
if (location.pathname.lastIndexOf('/filez/selenium/javascript/', 0) === 0) {
63+
if (location.pathname.lastIndexOf('/filez/_main/javascript/', 0) === 0) {
6464
directoryPath = '';
6565
files = [
6666
'/filez/com_google_javascript_closure_library/closure/goog/base.js',
67-
'/filez/selenium/javascript/chrome-driver/deps.js',
67+
'/filez/_main/javascript/chrome-driver/deps.js',
6868
];
6969
}
7070

javascript/webdriver/test/test_bootstrap.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@
6161
];
6262

6363

64-
if (location.pathname.lastIndexOf('/filez/selenium/javascript/', 0) === 0
64+
if (location.pathname.lastIndexOf('/filez/_main/javascript/', 0) === 0
6565
|| location.pathname.lastIndexOf('/common/generated/javascript/', 0) === 0) {
6666
directoryPath = '';
6767
files = [
6868
'/filez/com_google_javascript_closure_library/closure/goog/base.js',
69-
'/filez/selenium/javascript/atoms/deps.js',
70-
'/filez/selenium/javascript/webdriver/deps.js',
69+
'/filez/_main/javascript/atoms/deps.js',
70+
'/filez/_main/javascript/webdriver/deps.js',
7171
];
7272
}
7373

0 commit comments

Comments
 (0)