jscutlery/devkit

cypress-harness-integration tests are broken

willyboy opened this issue · 3 comments

Steps to reproduce

  1. Clone repo
  2. npm i
  3. npx nx e2e cypress-harness-integration

First error

Can't find @cypress/webpack-dev-server package

Second error

After installing @cypress/webpack-dev-server:

(0 , webpack_dev_server_1.startDevServer) is not a function
TypeError: (0 , webpack_dev_server_1.startDevServer) is not a function
    at startAngularDevServer (/devkit/packages/cypress-angular-dev-server/src/lib/start-angular-dev-server.ts:78:24)

More info

We were noticing that our harnesses weren't working with cypress unless we added the following to unwrap the element from the locatorFor code like so: .host().pipe(el => (el as any).element)

So I wanted to see if this ran to see if it was something we were doing or an issue with the lib:

it('should set date using material datepicker harness', () => {
    datepicker.setValue('1/1/2010');
    datepicker.openCalendar();
    /* Can't use `next` because it is already used by cypress. */
    datepicker.getCalendar().invoke('next');
    datepicker.getCalendar().selectCell({ text: '10' });
    datepicker.getValue().should('equal', '2/10/2010');

    calendars.should('be.empty');
  });

any solution for this ?

So sorry for responding so late but could you please try and run yarn install instead of npm?

I am going to close this issue for now.
Please let us know if you still encounter any problems in a new issue.
Thank you!