-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
72 changed files
with
274 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
import type { FrameLocator as PlaywrightFrameLocator } from "@playwright/test"; | ||
import type { FrameLocator as FrameLocatorClass } from "./frame"; | ||
import type { first } from "./commands/first"; | ||
import type { frameLocator } from "./commands/frame-locator"; | ||
import type { getByAltText } from "./commands/get-by-alt-text"; | ||
import type { getByLabel } from "./commands/get-by-label"; | ||
import type { getByRole } from "./commands/get-by-role"; | ||
import type { getByTestId } from "./commands/get-by-test-id"; | ||
import type { getByText } from "./commands/get-by-text"; | ||
import type { getByTitle } from "./commands/get-by-title"; | ||
import type { last } from "./commands/last"; | ||
import type { locator } from "./commands/locator"; | ||
import type { nth } from "./commands/nth"; | ||
import type { FirstCommand } from "./commands/first"; | ||
import type { FrameLocatorCommand } from "./commands/frame-locator"; | ||
import type { GetByAltTextCommand } from "./commands/get-by-alt-text"; | ||
import type { GetByLabelCommand } from "./commands/get-by-label"; | ||
import type { GetByRoleCommand } from "./commands/get-by-role"; | ||
import type { GetByTestIdCommand } from "./commands/get-by-test-id"; | ||
import type { GetByTextCommand } from "./commands/get-by-text"; | ||
import type { GetByTitleCommand } from "./commands/get-by-title"; | ||
import type { LastCommand } from "./commands/last"; | ||
import type { LocatorCommand } from "./commands/locator"; | ||
import type { NthCommand } from "./commands/nth"; | ||
|
||
export interface FrameLocator extends PlaywrightFrameLocator, FrameLocatorClass { | ||
first(...args: Parameters<typeof first>): ReturnType<typeof first>; | ||
frameLocator(...args: Parameters<typeof frameLocator>): ReturnType<typeof frameLocator>; | ||
frameLocator(...args: Parameters<typeof frameLocator>): ReturnType<typeof frameLocator>; | ||
getByAltText(...args: Parameters<typeof getByAltText>): ReturnType<typeof getByAltText>; | ||
getByLabel(...args: Parameters<typeof getByLabel>): ReturnType<typeof getByLabel>; | ||
getByRole(...args: Parameters<typeof getByRole>): ReturnType<typeof getByRole>; | ||
getByTestId(...args: Parameters<typeof getByTestId>): ReturnType<typeof getByTestId>; | ||
getByText(...args: Parameters<typeof getByText>): ReturnType<typeof getByText>; | ||
getByTitle(...args: Parameters<typeof getByTitle>): ReturnType<typeof getByTitle>; | ||
last(...args: Parameters<typeof last>): ReturnType<typeof last>; | ||
locator(...args: Parameters<typeof locator>): ReturnType<typeof locator>; | ||
nth(...args: Parameters<typeof nth>): ReturnType<typeof nth>; | ||
first(...args: Parameters<FirstCommand>): ReturnType<FirstCommand>; | ||
frameLocator(...args: Parameters<FrameLocatorCommand>): ReturnType<FrameLocatorCommand>; | ||
getByAltText(...args: Parameters<GetByAltTextCommand>): ReturnType<GetByAltTextCommand>; | ||
getByLabel(...args: Parameters<GetByLabelCommand>): ReturnType<GetByLabelCommand>; | ||
getByRole(...args: Parameters<GetByRoleCommand>): ReturnType<GetByRoleCommand>; | ||
getByTestId(...args: Parameters<GetByTestIdCommand>): ReturnType<GetByTestIdCommand>; | ||
getByText(...args: Parameters<GetByTextCommand>): ReturnType<GetByTextCommand>; | ||
getByTitle(...args: Parameters<GetByTitleCommand>): ReturnType<GetByTitleCommand>; | ||
last(...args: Parameters<LastCommand>): ReturnType<LastCommand>; | ||
locator(...args: Parameters<LocatorCommand>): ReturnType<LocatorCommand>; | ||
nth(...args: Parameters<NthCommand>): ReturnType<NthCommand>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import type { Component } from "@fixtures/component/component"; | ||
import type { Locator } from "@fixtures/locator/types"; | ||
|
||
export async function centerPoint(this: Locator) { | ||
export async function centerPoint(this: Locator | Component) { | ||
const box = await this.boundingBox(); | ||
const x = Math.round((box.x + (box.width / 2)) * 100) / 100; | ||
const y = Math.round((box.y + (box.height / 2)) * 100) / 100; | ||
return { x, y }; | ||
} | ||
|
||
export type CenterPointCommand = typeof centerPoint; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import type { Component } from "@fixtures/component/component"; | ||
import type { Locator } from "@fixtures/locator/types"; | ||
|
||
export async function scrollIntoView(this: Locator) { | ||
export async function scrollIntoView(this: Locator | Component) { | ||
await this.evaluate((node: HTMLElement) => node.scrollIntoView({ behavior: "auto", block: "center", inline: "center" })); | ||
} | ||
|
||
export type ScrollIntoViewCommand = typeof scrollIntoView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.