Skip to content

Commit a2d2932

Browse files
committed
Merge branch 'main' of github.com:AutomateThePlanet/BELLATRIX-JavaScript into bdd-logging-update
2 parents 337a5b4 + f1af6a7 commit a2d2932

File tree

4 files changed

+52
-3
lines changed

4 files changed

+52
-3
lines changed

.github/workflows/node.js.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Use Node.js 20.6
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20.6
20+
cache: 'npm'
21+
- run: npm ci
22+
working-directory: example
23+
- run: npm test

.vscode/launch.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Run Tests",
8+
"runtimeExecutable": "npm",
9+
"runtimeArgs": [
10+
"run",
11+
"test"
12+
],
13+
"skipFiles": [
14+
"<node_internals>/**"
15+
],
16+
"cwd": "${workspaceFolder}/example",
17+
"console": "integratedTerminal",
18+
"internalConsoleOptions": "neverOpen"
19+
}
20+
]
21+
}

@bellatrix/web/src/infrastructure/browserautomationtools/playwright/PlaywrightWebElement.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ export class PlaywrightWebElement extends WebElement {
1616

1717
override async click(): Promise<void> {
1818
await this._locator.click({
19-
timeout: 5000, // TODO: Get from config.
19+
timeout: BellatrixSettings.get().webSettings.timeoutSettings.findElementTimeout,
2020
trial: true,
2121
});
2222

2323
try {
24-
await this._locator.click({ timeout: 30, noWaitAfter: true, force: true });
24+
await this._locator.click({ timeout: BellatrixSettings.get().webSettings.timeoutSettings.findElementTimeout, noWaitAfter: true, force: true });
2525
} catch {
2626
// ignore error, workaround for dialog popup
2727
}

@bellatrix/web/src/services/BrowserAutomationToolLaunchService.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ export class BrowserAutomationToolLaunchService {
4646

4747
const channel = webSettings.executionSettings.browser == 'chrome' ? 'chrome' : 'msedge';
4848

49-
browser = await chromium.launch({ headless, channel, args });
49+
browser = await chromium.launch({
50+
headless,
51+
channel,
52+
args,
53+
// executablePath: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe' // uncomment if Chrome is installed in Program Files (for all users)
54+
});
5055

5156
break;
5257
case 'firefox':

0 commit comments

Comments
 (0)