Skip to content

Commit

Permalink
Accept all methods from playwright (#36)
Browse files Browse the repository at this point in the history
* Accept all methods from playwright

* Bump version
  • Loading branch information
abdala authored Dec 3, 2024
1 parent 8f527e6 commit 118c391
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion assert/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/assert",
"version": "0.10.6",
"version": "0.10.7",
"description": "Extra assert library",
"type": "module",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion dtc-aws-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/dtc-aws-plugin",
"version": "0.10.6",
"version": "0.10.7",
"description": "AWS plugin for Declarative TestCases",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion dtc-graphql-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/dtc-graphql-plugin",
"version": "0.10.6",
"version": "0.10.7",
"description": "GraphQl plugin for Declarative TestCases",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion dtc-mysql-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/dtc-mysql-plugin",
"version": "0.10.6",
"version": "0.10.7",
"description": "MySQL plugin for Declarative TestCases",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion dtc-playwright-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/dtc-playwright-plugin",
"version": "0.10.6",
"version": "0.10.7",
"description": "Playwright plugin for Declarative TestCases",
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions dtc-playwright-plugin/src/playwright-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Page, expect, Locator} from '@playwright/test'
import {is, unknown, record, union, optional, TypeFromSchema} from '@cgauge/type-guard'

const PlaywrightActionTarget = {
name: union('getByTestId', 'getByPlaceholder', 'getByText', 'getByTitle', 'getByLabel'),
name: String,
args: [unknown],
}

Expand Down Expand Up @@ -46,8 +46,8 @@ const executeActions = async (actions: PlaywrightAction[], page: Page) => {
element = page.getByTestId(act.target)
}
} else {
if (typeof page[act.target.name] === 'function') {
element = page[act.target.name].apply(page, act.target.args as [string])
if (typeof (page as any)[act.target.name] === 'function') {
element = (page as any)[act.target.name].apply(page, act.target.args as [string])
}
}

Expand Down
2 changes: 1 addition & 1 deletion dtc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/dtc",
"version": "0.10.6",
"version": "0.10.7",
"description": "Declarative TestCases",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion nock-aws/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/nock-aws",
"version": "0.10.6",
"version": "0.10.7",
"description": "AWS Request mocker based on Nock",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion type-guard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/type-guard",
"version": "0.10.6",
"version": "0.10.7",
"description": "Typescript type guards",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion yaml/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/yaml",
"version": "0.10.6",
"version": "0.10.7",
"description": "YAML parser with extra tags",
"repository": {
"type": "git",
Expand Down

0 comments on commit 118c391

Please sign in to comment.