Skip to content

Commit 1a7223b

Browse files
fix: running tests
1 parent f48a2f2 commit 1a7223b

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
run: npm run test:lint
3232
- name: Run Tests
3333
run: npm run test:messages
34+
- name: Start local server
35+
run: python -m http.server
3436
- name: Run Unit Tests
3537
run: DISPLAY=:99 npm run test:unit
3638
- name: Remove Closure App

tests/jsunit/test_runner.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
var webdriver = require('selenium-webdriver');
22
var chrome = require('selenium-webdriver/chrome');
3-
4-
console.log("process.env.CI")
5-
console.log(process.env.CI)
6-
73
var builder = new webdriver.Builder().forBrowser('chrome');
84

95
if (process.env.CI) {
106
const options = new chrome.Options().headless();
117
if (process.platform === 'linux') {
128
options.addArguments('no-sandbox');
139
}
14-
options.addArguments(
15-
'--allow-file-access-from-files',
16-
'--disable-web-security',
17-
'--user-data-dir=/tmp/chrome-test-profile'
18-
);
19-
console.log(options);
2010
builder.setChromeOptions(options);
2111
}
2212

@@ -46,13 +36,13 @@ var runTests = async function () {
4636
try {
4737
var element, text;
4838

49-
await browser.get("file://" + path + "/tests/jsunit/vertical_tests.html");
39+
await browser.get("http://localhost:8080/tests/jsunit/vertical_tests.html");
5040
await browser.sleep(5000);
5141
element = await browser.findElement({id: "closureTestRunnerLog"});
5242
text = await element.getText();
5343
testHtml(text);
5444

55-
await browser.get("file://" + path + "/tests/jsunit/horizontal_tests.html");
45+
await browser.get("http://localhost:8080/tests/jsunit/horizontal_tests.html");
5646
await browser.sleep(5000);
5747
element = await browser.findElement({id: "closureTestRunnerLog"});
5848
text = await element.getText();

0 commit comments

Comments
 (0)