@rvoh/psychic-spec-helpers 0.3.1-fgbeta-4 → 0.3.1-fgbeta-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ export default async function toClick(page, expectedText) {
6
6
  return await evaluateWithRetryAndTimeout(page, async () => {
7
7
  requirePuppeteerPage(page);
8
8
  try {
9
- const el = await page.locator(`::-p-text(${expectedText})`).setTimeout(5000).wait();
9
+ const el = await page.locator(`*::-p-text(${expectedText})`).setTimeout(5000).wait();
10
10
  await el.click();
11
11
  }
12
12
  catch (err) {
@@ -32,7 +32,7 @@ interface PuppeteerAssertions {
32
32
  toCheck(expected: any): Promise<CustomMatcherResult>;
33
33
  toClick(expected: any): Promise<CustomMatcherResult>;
34
34
  toClickLink(expected: any): Promise<CustomMatcherResult>;
35
- toClickLink(expected: any): Promise<CustomMatcherResult>;
35
+ toClickButton(expected: any): Promise<CustomMatcherResult>;
36
36
  toClickSelector(expected: any): Promise<CustomMatcherResult>;
37
37
  toHavePath(expected: any): Promise<CustomMatcherResult>;
38
38
  toHaveUrl(expected: any): Promise<CustomMatcherResult>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@rvoh/psychic-spec-helpers",
4
- "version": "0.3.1-fgbeta-4",
4
+ "version": "0.3.1-fgbeta-5",
5
5
  "description": "psychic framework spec helpers",
6
6
  "main": "./dist/cjs/src/index.js",
7
7
  "module": "./dist/esm/src/index.js",
@@ -10,7 +10,7 @@ export default async function toClick(page: Page, expectedText: string) {
10
10
  requirePuppeteerPage(page)
11
11
 
12
12
  try {
13
- const el = await page.locator(`::-p-text(${expectedText})`).setTimeout(5000).wait()
13
+ const el = await page.locator(`*::-p-text(${expectedText})`).setTimeout(5000).wait()
14
14
  await el.click()
15
15
  } catch (err) {
16
16
  if (err instanceof TimeoutError) return evaluationFailure(expectedText)
package/src/index.ts CHANGED
@@ -40,7 +40,7 @@ interface PuppeteerAssertions {
40
40
  toCheck(expected: any): Promise<CustomMatcherResult>
41
41
  toClick(expected: any): Promise<CustomMatcherResult>
42
42
  toClickLink(expected: any): Promise<CustomMatcherResult>
43
- toClickLink(expected: any): Promise<CustomMatcherResult>
43
+ toClickButton(expected: any): Promise<CustomMatcherResult>
44
44
  toClickSelector(expected: any): Promise<CustomMatcherResult>
45
45
  toHavePath(expected: any): Promise<CustomMatcherResult>
46
46
  toHaveUrl(expected: any): Promise<CustomMatcherResult>