Skip to content

Commit

Permalink
fix(test): quit Selenium session after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cwillisf committed Jul 1, 2021
1 parent 2fca737 commit 3c295ff
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions tests/jsunit/test_runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,27 @@ var testHtml = function (htmlString) {
var path = process.cwd();

var runTests = async function () {
var element, text;
try {
var element, text;

await browser.get("file://" + path + "/tests/jsunit/vertical_tests.html");
await browser.sleep(5000);
element = await browser.findElement({id: "closureTestRunnerLog"});
text = await element.getText();
testHtml(text);
await browser.get("file://" + path + "/tests/jsunit/vertical_tests.html");
await browser.sleep(5000);
element = await browser.findElement({id: "closureTestRunnerLog"});
text = await element.getText();
testHtml(text);

await browser.get("file://" + path + "/tests/jsunit/horizontal_tests.html");
await browser.sleep(5000);
element = await browser.findElement({id: "closureTestRunnerLog"});
text = await element.getText();
testHtml(text);
await browser.get("file://" + path + "/tests/jsunit/horizontal_tests.html");
await browser.sleep(5000);
element = await browser.findElement({id: "closureTestRunnerLog"});
text = await element.getText();
testHtml(text);
}
finally {
await browser.quit();
}
};

runTests().catch(e => {
console.error(e);
process.exit(1);
console.error(e);
process.exit(1);
});

0 comments on commit 3c295ff

Please # to comment.