Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: customLocator draws error in dry-mode #3940

Conversation

kobenguyent
Copy link
Collaborator

@kobenguyent kobenguyent commented Oct 20, 2023

Motivation/Description of the PR

Error: Could not include object coursePage from module '/home/mirao/tmp/pages/Course.ts'
Lexical error on line 1. Unrecognized text.
$COURSE
^
Error: Lexical error on line 1. Unrecognized text.
$COURSE
^

After the fix, running dry-run command with -p all or -p customLocator

CodeceptJS v3.5.6 #StandWithUkraine
Using test root "/Users/t/Desktop/CodeceptJS/test/data/sandbox"
Helpers: Playwright
Plugins: customLocator

Custom Locator --
    [1]  Starting recording promises
Warning: Timeout was set to 10000secs.
Global timeout should be specified in seconds.
    Timeouts: 10000
  no error with dry-mode
 › Test Timeout: 10000s
    I see element {xpath: .//*[@data-testid='COURSE']//a}
  ✔ OK in 5ms


  OK  | 1 passed   // 7ms

--- DRY MODE: No tests were executed ---

Type of change

  • 🐛 Bug fix

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@kobenguyent kobenguyent merged commit 18be8a2 into 3.x Oct 21, 2023
9 checks passed
@kobenguyent kobenguyent deleted the 3657-dry-run-mode-using-of-custom-locator-with-$-prefix-in-page-object-may-cause-error-lexical-error-on-line-1-unrecognized-text branch October 21, 2023 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant