Skip to content

Commit

Permalink
chore: upgrade to node 20 lts
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkenos committed Nov 26, 2023
1 parent 53e8aa1 commit 7adab4d
Show file tree
Hide file tree
Showing 9 changed files with 618 additions and 522 deletions.
22 changes: 22 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"scope-enum": [
2,
"always",
[
"",
"build",
"commands",
"common",
"conditions",
"config",
"core",
"deps",
"demo"
]
]
}
}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.17.0
20.10.0
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"request": "launch",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "${env:HOME}/.nvm/versions/node/v18.17.0/bin/npm",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "test:demo"],
"env": {
"HEADLESS": "false",
Expand Down
11 changes: 4 additions & 7 deletions demo/test/fixtures/pages/demo/demo.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,20 @@ export class DemoPage extends PageObject {

hSectionHeader = this.page.locator("//h5");
navBar = this.page.locator("//nav");

private givenNavItem(text: string) {
return this.navBar.locator("//ul/li", { hasText: text });
}
navItem = (text: string) => this.navBar.locator("//ul/li", { hasText: text });

async whenClickNavItem(text: string) {
const locator = this.givenNavItem(text);
const locator = this.navItem(text);
await locator.click();
}

async thenNavItemSelected(text: string, not?: boolean) {
const locator = this.givenNavItem(text);
const locator = this.navItem(text);
await locator.expect().attributeEquals("class", "active", !not).poll();
}

async thenNavItemExists(text: string, not?: boolean) {
const locator = this.givenNavItem(text);
const locator = this.navItem(text);
await locator.expect().exists(!not).poll();
}
}
Loading

0 comments on commit 7adab4d

Please sign in to comment.