Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
test:
strategy:
matrix:
version: [ 18, 20, 22, 24 ]
version: [ 20, 22, 24 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
1,915 changes: 1,119 additions & 796 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@
},
"homepage": "https://github.com/qavajs/steps-playwright#readme",
"devDependencies": {
"@cucumber/cucumber": "^12.1.0",
"@cucumber/cucumber": "^12.2.0",
"@qavajs/console-formatter": "^1.0.0",
"@qavajs/core": "^2.5.2",
"@qavajs/core": "^2.6.0",
"@qavajs/html-formatter": "^0.18.1",
"@qavajs/memory": "^1.10.2",
"@qavajs/validation": "^1.2.1",
"@qavajs/validation": "^1.3.0",
"@qavajs/webstorm-adapter": "^8.0.0",
"@types/express": "^5.0.3",
"@types/node": "^24.0.15",
"@types/node": "^24.3.0",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/ui": "^3.2.4",
"electron": "^36.3.2",
"electron": "^38.0.0",
"express": "^5.1.0",
"ts-node": "^10.9.2",
"typescript": "^5.8.3",
"typescript": "^5.9.2",
"vitest": "^3.2.4"
},
"dependencies": {
"@playwright/test": "^1.54.1"
"@playwright/test": "^1.55.0"
}
}
5 changes: 2 additions & 3 deletions src/actions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { When } from '@cucumber/cucumber';
import { type Page, type Dialog, type Locator } from '@playwright/test';
import { type Page, type Locator } from '@playwright/test';
import { parseCoords, parseCoordsAsObject, sleep } from './utils/utils';
import { MemoryValue } from '@qavajs/core';
import { type MemoryValue, When } from '@qavajs/core';

/**
* Opens provided url
Expand Down
3 changes: 1 addition & 2 deletions src/cookies.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { When } from '@cucumber/cucumber';
import {MemoryValue} from "@qavajs/core";
import { type MemoryValue, When } from "@qavajs/core";

/**
* Set cookie
Expand Down
4 changes: 1 addition & 3 deletions src/dialog.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { When, Then } from '@cucumber/cucumber';
import { Dialog } from '@playwright/test';
import type {IQavajsWorld, MemoryValue, Validation} from '@qavajs/core';
import {IQavajsPlaywrightConfig} from "./IQavajsPlaywrightConfig";
import { type MemoryValue, type Validation, When, Then } from '@qavajs/core';

class DialogHolder {
currentDialog!: Promise<Dialog>;
Expand Down
5 changes: 2 additions & 3 deletions src/execute.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { When } from '@cucumber/cucumber';
import {MemoryValue} from "@qavajs/core";
import {Locator} from "@playwright/test";
import { type MemoryValue, When } from '@qavajs/core';
import { Locator } from '@playwright/test';

/**
* Execute client function
Expand Down
2 changes: 1 addition & 1 deletion src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
BeforeStep,
ITestCaseHookParameter,
ITestStepHookParameter
} from '@cucumber/cucumber';
} from '@qavajs/core';
import defaultTimeouts from './defaultTimeouts';
import {
saveScreenshotAfterStep,
Expand Down
3 changes: 1 addition & 2 deletions src/intercept.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { When } from '@cucumber/cucumber';
import { MemoryValue } from '@qavajs/core';
import { type MemoryValue, When } from '@qavajs/core';

/**
* Create interception for url or predicate function
Expand Down
2 changes: 1 addition & 1 deletion src/keyboardActions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { When } from '@cucumber/cucumber';
import { When } from '@qavajs/core';

/**
* Press and hold keyboard key
Expand Down
3 changes: 1 addition & 2 deletions src/localSessionStorage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { When } from '@cucumber/cucumber';
import { MemoryValue } from '@qavajs/core';
import { type MemoryValue, When } from '@qavajs/core';
/**
* Set value of local/session storage
* @param {string} storageKey - local/session storage key to set value
Expand Down
3 changes: 1 addition & 2 deletions src/memory.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { When } from '@cucumber/cucumber';
import { type Locator } from '@playwright/test';
import { type MemoryValue } from '@qavajs/core';
import { type MemoryValue, When } from '@qavajs/core';

/**
* Save text of element to memory
Expand Down
3 changes: 1 addition & 2 deletions src/mock.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { When } from '@cucumber/cucumber';
import { Route } from '@playwright/test';
import {MemoryValue} from "@qavajs/core";
import { type MemoryValue, When } from '@qavajs/core';

/**
* Create simple mock instance
Expand Down
3 changes: 1 addition & 2 deletions src/mouseActions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { When } from '@cucumber/cucumber';
import { parseCoords } from './utils/utils';
import { MemoryValue } from '@qavajs/core';
import { type MemoryValue, When } from '@qavajs/core';

/**
* Press mouse key
Expand Down
2 changes: 1 addition & 1 deletion src/pageObject.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {type Browser, type BrowserContext, type Page, Locator, FrameLocator} from '@playwright/test';
import { type Browser, type BrowserContext, type Page, Locator, FrameLocator } from '@playwright/test';

type SelectorDefinition = string | ((argument: string) => string) | ((argument: any) => any) | null;

Expand Down
3 changes: 1 addition & 2 deletions src/poDefine.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { When } from '@cucumber/cucumber';
import { MemoryValue } from '@qavajs/core';
import { type MemoryValue, When } from '@qavajs/core';
import { locator } from './pageObject';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineParameterType } from '@cucumber/cucumber';
import { defineParameterType } from '@qavajs/core';
import { getConditionWait } from './conditionWait';

function transformString(fn: (value: string) => any) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ScreenshotEvent } from './screenshotEvent';
import { TraceEvent } from './traceEvent';
import { VideoEvent } from './videoEvent';
import { Status, ITestStepHookParameter, ITestCaseHookParameter } from '@cucumber/cucumber';
import { Status, ITestStepHookParameter, ITestCaseHookParameter } from '@qavajs/core';
import { join } from 'node:path';

export function saveScreenshotAfterStep(config: any, step: ITestStepHookParameter): boolean {
Expand Down
3 changes: 1 addition & 2 deletions src/validations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Then } from '@cucumber/cucumber';
import { type Locator } from '@playwright/test';
import { type MemoryValue, type Validation } from '@qavajs/core';
import { type MemoryValue, type Validation, Then } from '@qavajs/core';

/**
* Verify element condition
Expand Down
5 changes: 2 additions & 3 deletions src/waits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {When} from '@cucumber/cucumber';
import {Locator} from "@playwright/test";
import {MemoryValue, Validation} from "@qavajs/core";
import { type Locator } from '@playwright/test';
import { type MemoryValue, type Validation, When } from '@qavajs/core';

/**
* Refresh page unless element matches condition
Expand Down