-
-
Notifications
You must be signed in to change notification settings - Fork 728
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
Dry-run mode: Using of custom locator with "$" prefix in page object may cause Error: Lexical error on line 1. Unrecognized text #3657
Comments
1st workaround Use another prefix instead of "$", e.g. "#" Course.ts: export = {
schoolCourse: locate("#COURSE").find("a"),
} config: plugins: {
customLocator: {
enabled: true,
prefix: "#",
attribute: "data-testid",
},
}, 2nd workaround Pass Feature('My');
const {I} = inject();
Scenario('test something', ({coursePage}) => {
I.seeElement(coursePage.schoolCourse);
}); In both cases $ npx codeceptjs dry-run
Tests from /home/mirao/tmp:
My -- /home/mirao/tmp/My_test.ts
☐ test something
Total: 1 suites | 1 tests
--- DRY MODE: No tests were executed --- |
This issue is stale because it has been open for 90 days with no activity. |
By default, all plugins are disabled when running dry-run command, https://codecept.io/commands/#dry-run You could try to enable the plugin like this: |
Yes, it works. Tested with CodeceptJS 3.5.3 |
What are you trying to achieve?
dry-run
mode should passWhat do you get instead?
Note that
run
mode works as expected (no lexical error)My_test.ts:
Course.ts:
Details
The text was updated successfully, but these errors were encountered: