Skip to content

Commit

Permalink
fix(ci): add missing awaits for driver.quit
Browse files Browse the repository at this point in the history
  • Loading branch information
harsha509 committed Nov 1, 2024
1 parent 1998ee1 commit 42cd60b
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 18 deletions.
19 changes: 11 additions & 8 deletions examples/javascript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"selenium-webdriver": "4.26.0"
},
"devDependencies": {
"mocha": "10.7.3"
"mocha": "10.8.2"
}
}
2 changes: 1 addition & 1 deletion examples/javascript/test/actionsApi/actionsTest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Actions API - Pause and Release All Actions', function() {
driver = await new Builder().forBrowser('chrome').build();
})

after(() => driver.quit())
after(async () => await driver.quit())

it('Pause', async function() {
await driver.get('https://selenium.dev/selenium/web/mouse_interaction.html')
Expand Down
2 changes: 1 addition & 1 deletion examples/javascript/test/actionsApi/keysTest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Keyboard Action - Keys test', function() {
driver = await new Builder().forBrowser('chrome').build();
})

after(() => driver.quit())
after(async () => await driver.quit())

it('KeyDown', async function() {
await driver.get('https://www.selenium.dev/selenium/web/single_text_input.html')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Click and hold', function () {
driver = new Builder().forBrowser('chrome').build();
});

after(() => driver.quit());
after(async () => await driver.quit());

it('Mouse move and mouseDown on an element', async function () {
await driver.get('https://www.selenium.dev/selenium/web/mouse_interaction.html');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Click and release', function () {
driver = new Builder().forBrowser('chrome').build();
});

after(() => driver.quit());
after(async () => await driver.quit());

it('Mouse move and click on an element', async function () {
await driver.get('https://www.selenium.dev/selenium/web/mouse_interaction.html');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Scroll by given amount from element', function() {
driver = await new Builder().forBrowser('chrome').build();
});

after(() => driver.quit());
after(async() => await driver.quit());

it('Scroll to element by 300', async function() {
await driver.manage().window().setRect({ width: 500, height: 400 });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Wheel scroll to element', function() {
driver = await new Builder().forBrowser('chrome').build();
});

after(() => driver.quit());
after(async () => await driver.quit());

it('Scroll to the element', async function() {
// Navigate to the url
Expand Down
2 changes: 1 addition & 1 deletion examples/javascript/test/elements/fileUpload.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('File Upload Test', function() {
.build();
});

after(() => driver.quit());
after(async() => await driver.quit());

it('Should be able to upload a file successfully', async function() {
const image = path.resolve('./test/resources/selenium-snapshot.png')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Virtual authenticator', function() {
driver = await new Builder().forBrowser('chrome').build();
});

after(() => driver.quit());
after(async() => await driver.quit());

function arraysEqual(array1, array2) {
return (array1.length === array2.length &&
Expand Down Expand Up @@ -187,7 +187,7 @@ describe('Virtual authenticator', function() {
0);

await driver.addCredential(nonResidentCredential);
driver.removeAllCredentials();
await driver.removeAllCredentials();

let credentialList = await driver.getCredentials();
assert.equal(0, credentialList.length);
Expand Down

0 comments on commit 42cd60b

Please sign in to comment.