-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
cypress-harness: typing issues with strict mode in Angular #66
Comments
Hi, I cannot reproduce the errors you describe and tests are passing. Could you elaborate more on how you get this? |
System infoAngular CLI: 12.0.5 Steps to reproduceThis is what I'm doing: $ ng new cypress-test --routing=true --style=scss
$ cd cypress-test
$ ng add @angular/material --theme="Indigo/Pink" --typography=false --animations=true
> install 12.0.5 : Yes
$ ng add @cypress/schematic --e2eUpdate=true
> install 1.3.1 : Yes
$ npm install -D @jscutlery/cypress-harness cypress-pipe Then:
IssueWhen opening the project in |
@edbzn, you are right on one point though: |
When running So I guess you should enable strict mode on your side too. |
@edbzn, any chance you could look into this any time soon ? |
Hi @Badisi, I published a fix for this issue, thanks for reporting! |
Hello @edbzn, thanks for the fix ! I can confirm that all the typing issues related to "getHarness" are fixed. However, the one related to "getAllHarnesses" still exists : describe('datepicker', () => {
const calendars = getAllHarnesses(MatCalendarHarness);
it('should set date', () => {
calendars.should('be.empty'); <-- Property 'should' does not exist on type 'Promise<MatCalendarHarness[]>'.
});
}); To fix this : get-all-harnesses.ts#L8 -> replace |
Package: @jscutlery/cypress-harness
Version: 0.3.4
Using the datepicker example now gives the following ts errors:
The first two are due to the fact that some material components methods have optional parameters.
Ex :
getCalendar(filter?: CalendarHarnessFilters): Promise<MatCalendarHarness>;
They can be solved by replacing
(...args: unknown[]) => unknown
with(...args: any[]) => unknown
in internals.ts#L7I have not investigated further for the third one..
The text was updated successfully, but these errors were encountered: