Skip to content

Commit 5711577

Browse files
committed
Review comments fix:1
1 parent be98353 commit 5711577

5 files changed

Lines changed: 56 additions & 4 deletions

File tree

tez-ui/README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,39 @@ You will need the following things properly installed on your computer.
7777

7878
### Running Tests
7979

80-
* `yarn test`
80+
Tests run in **headless Chrome**
81+
Google Chrome must be installed on your machine.
82+
83+
**Step 1: Set `CHROME_BIN` to your Chrome binary**
84+
85+
On Linux:
86+
```bash
87+
export CHROME_BIN=google-chrome-stable
88+
```
89+
On macOS:
90+
```bash
91+
export CHROME_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
92+
```
93+
94+
**Step 2: Run the tests**
95+
96+
Via Maven (from the `tez-ui` directory):
97+
```bash
98+
mvn clean install
99+
```
100+
If `CHROME_BIN` is not set in your environment, you can also pass the Chrome path
101+
directly as a Maven property:
102+
```bash
103+
mvn clean install -Dchrome.bin="/path/to/Google Chrome"
104+
```
105+
Via Yarn (from inside `src/main/webapp`):
106+
```bash
107+
yarn test
108+
```
109+
To skip tests:
110+
```bash
111+
mvn clean package -DskipTests
112+
```
81113

82114
### Building
83115

tez-ui/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@
3939
<allow-root-build>--allow-root=false</allow-root-build>
4040

4141
<skipTests>false</skipTests>
42+
43+
<!--
44+
Chrome binary used by testem for headless UI tests.
45+
Override on the command line: -Dchrome.bin="/path/to/chrome"
46+
Falls back to google-chrome-stable when not overridden.
47+
-->
48+
<chrome.bin>google-chrome-stable</chrome.bin>
4249
</properties>
4350

4451
<profiles>
@@ -91,6 +98,9 @@
9198
<argument>run</argument>
9299
<argument>test:mvn</argument>
93100
</arguments>
101+
<environmentVariables>
102+
<CHROME_BIN>${chrome.bin}</CHROME_BIN>
103+
</environmentVariables>
94104
</configuration>
95105
</execution>
96106
</executions>
@@ -149,6 +159,9 @@
149159
<argument>run</argument>
150160
<argument>test:mvn</argument>
151161
</arguments>
162+
<environmentVariables>
163+
<CHROME_BIN>${chrome.bin}</CHROME_BIN>
164+
</environmentVariables>
152165
</configuration>
153166
</execution>
154167
</executions>

tez-ui/src/main/webapp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"em-tgraph": "0.0.14"
6464
},
6565
"resolutions": {
66+
"moment": "2.30.1",
6667
"**/form-data/async": "2.6.4",
6768
"**/mkdirp/minimist": "1.2.6",
6869
"**/optimist/minimist": "1.2.6",

tez-ui/src/main/webapp/testem.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
"disable_watching": true,
55
"browser_start_timeout": 120,
66
"timeout": 300,
7+
"launchers": {
8+
"Chrome": {
9+
"command": "\"${CHROME_BIN:-google-chrome-stable}\" --headless --disable-gpu --no-sandbox --disable-dev-shm-usage --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type <url>",
10+
"protocol": "browser"
11+
}
12+
},
713
"launch_in_ci": [
814
"Chrome"
915
],

tez-ui/src/main/webapp/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3478,9 +3478,9 @@ moment-timezone@^0.3.0:
34783478
dependencies:
34793479
moment ">= 2.6.0"
34803480

3481-
"moment@>= 2.29.4":
3482-
version "2.29.4"
3483-
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
3481+
moment@2.30.1, "moment@>= 2.6.0":
3482+
version "2.30.1"
3483+
resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"
34843484

34853485
morgan@^1.5.2:
34863486
version "1.8.1"

0 commit comments

Comments
 (0)