Skip to content

Commit a143063

Browse files
committed
[grid] Refining the UI configuration to allow sub paths work properly.
Fixes #11647
1 parent 770acab commit a143063

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

java/test/org/openqa/selenium/grid/gridui/OverallGridTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void tearDown() {
8181

8282
@Test
8383
void shouldReportConcurrencyZeroPercentWhenGridIsStartedWithoutLoad() {
84-
driver.get(whereIs(server, "/ui/index.html#/sessions"));
84+
driver.get(whereIs(server, "/ui#/sessions"));
8585

8686
WebElement concurrency = wait
8787
.until(visibilityOfElementLocated(By.cssSelector("div[data-testid='concurrency-usage']")));
@@ -91,7 +91,7 @@ void shouldReportConcurrencyZeroPercentWhenGridIsStartedWithoutLoad() {
9191

9292
@Test
9393
void shouldShowOneNodeRegistered() {
94-
driver.get(whereIs(server, "/ui/index.html#"));
94+
driver.get(whereIs(server, "/ui"));
9595

9696
List<WebElement> nodeInfoIcons = wait
9797
.until(visibilityOfAllElementsLocatedBy(By.cssSelector("button[data-testid*='node-info-']")));
@@ -102,7 +102,7 @@ void shouldShowOneNodeRegistered() {
102102
@Test
103103
void shouldIncrementSessionCountWhenSessionStarts() {
104104
remoteWebDriver = new RemoteWebDriver(server.getUrl(), Browser.detect().getCapabilities());
105-
driver.get(whereIs(server, "/ui/index.html#/sessions"));
105+
driver.get(whereIs(server, "/ui#/sessions"));
106106

107107
wait.until(textToBe(By.cssSelector("div[data-testid='session-count']"), "1"));
108108
}

javascript/grid-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"lint": "ts-standard && eslint --ext '.js,.ts,.tsx' src",
3636
"lint-fix": "ts-standard --fix && eslint --ext '.js,.ts,.tsx' src"
3737
},
38-
"homepage": "/ui",
38+
"homepage": "./ui",
3939
"browserslist": {
4040
"production": [
4141
">0.2%",

javascript/grid-ui/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ export const GridConfig = {
99
serverUri:
1010
process.env.NODE_ENV === 'development'
1111
? 'http://localhost:4444/graphql'
12-
: document.location.protocol + '//' + document.location.host + '/graphql'
12+
: document.location.protocol + '//' + document.location.host + document.location.pathname.replace("/ui", "") + '/graphql'
1313
}

0 commit comments

Comments
 (0)