Skip to content

Commit eaddc0c

Browse files
removed utils (#137)
* removed utils * fixed typings * fixed unit test * updated workflow to run tests on v2
1 parent fda0a68 commit eaddc0c

File tree

7 files changed

+69
-103
lines changed

7 files changed

+69
-103
lines changed

.github/workflows/pull-request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
branches:
66
- main
7+
- v2
8+
- v1
79

810
jobs:
911
test:

src/playwright.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export class Playwright {
9898
/**
9999
* return to default state (1 browser, no contexts)
100100
*/
101-
async teardown({ reuseSession, restartBrowser } = { reuseSession: false, restartBrowser: false }) {
101+
async teardown({ reuseSession, restartBrowser }: { reuseSession?: boolean, restartBrowser?: boolean } = { reuseSession: false, restartBrowser: false }) {
102102
this.setDriver(this.drivers['default']);
103103
if (reuseSession) return;
104104
for (const driverKey in this.drivers) {

test/browserManager.spec.ts

Lines changed: 62 additions & 73 deletions
Large diffs are not rendered by default.

test/poImport.spec.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
import { po, $, $$, Component, Selector, NativeSelector } from '../po'
1+
import { locator } from '../po'
22
import { test, expect } from 'vitest';
33
test.each([
4-
po.init,
5-
po.register,
6-
po.setDriver,
7-
po.getElement,
8-
$,
9-
$$,
10-
Component,
11-
Selector,
12-
NativeSelector
4+
locator,
5+
locator.template,
6+
locator.native
137
])('po function %o', (fn) => {
148
expect(fn).toBeInstanceOf(Function);
159
});

test/utilsImport.spec.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

utils.d.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

utils.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)