isaacplmann / ngx-cypress-builder

Run e2e tests in the angular cli using cypress
18 stars 8 forks source link

.pipe is not a function #4

Closed mackelito closed 5 years ago

mackelito commented 6 years ago

Just tried this out and get the following error when I run ng e2e

cypress.run(...).pipe is not a function TypeError: cypress.run(...).pipe is not a function

isaacplmann commented 6 years ago

Are you using rxjs 5? .pipe was added in rxjs 6.

mackelito commented 6 years ago

This is from the builder file not the application.. but yes we use rxjs 6.3.2

mackelito commented 6 years ago

Seems as it was bad config in angular.json so now it starts serve and cypress.. but the tests do not run.

Guess that the "run all specs" should be triggered?

gcirone commented 5 years ago

Append to me too, confirmed! Looks like cypress.run return a Promise that are not an observable.

The fix looks easy it will need only to wrap in a from:

https://github.com/isaacplmann/ngx-cypress-builder/blob/c44301ee0b8f21af456c2b2051beddb5280c2446/lib/src/cypress/cypress-builder.ts#L126-L127

const cypress = require("cypress");
const runner =
      options.mode === CypressRunningMode.Console
        ?   from(cypress.run(additionalCypressConfig))
            .pipe(map((result: any) => ({ success: result.totalFailed === 0 })))
        : cypress.open(additionalCypressConfig);

    return from(runner);

👍

isaacplmann commented 5 years ago

Nice. Want to make a PR?

On Thu, Nov 8, 2018, 7:41 PM Gianluca <notifications@github.com wrote:

Append to me too, confirmed! Looks like cypress.run return a Promise that are not and observable.

The fix looks easy it will need only to wrap in a from:

https://github.com/isaacplmann/ngx-cypress-builder/blob/c44301ee0b8f21af456c2b2051beddb5280c2446/lib/src/cypress/cypress-builder.ts#L126-L127

const cypress = require("cypress"); const runner = options.mode === CypressRunningMode.Console ? from(cypress.run(additionalCypressConfig)) .pipe(map((result: any) => ({ success: result.totalFailed === 0 }))) : cypress.open(additionalCypressConfig);

return from(runner);

👍

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/ngx-cypress-builder/issues/4#issuecomment-437208799, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQP2-9LK3OT5cVQrHaHHxdrztJTf-ks5utM88gaJpZM4YF8ym .

gcirone commented 5 years ago

Ok @isaacplmann i'll try to open it during this day 👍

gcirone commented 5 years ago

I presume i don't have the permission to push in the repo, could you give me please?

Thanks G.

Il giorno ven 9 nov 2018 alle ore 02:15 Isaac Mann notifications@github.com ha scritto:

Nice. Want to make a PR?

On Thu, Nov 8, 2018, 7:41 PM Gianluca <notifications@github.com wrote:

Append to me too, confirmed! Looks like cypress.run return a Promise that are not and observable.

The fix looks easy it will need only to wrap in a from:

https://github.com/isaacplmann/ngx-cypress-builder/blob/c44301ee0b8f21af456c2b2051beddb5280c2446/lib/src/cypress/cypress-builder.ts#L126-L127

const cypress = require("cypress"); const runner = options.mode === CypressRunningMode.Console ? from(cypress.run(additionalCypressConfig)) .pipe(map((result: any) => ({ success: result.totalFailed === 0 }))) : cypress.open(additionalCypressConfig);

return from(runner);

👍

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/isaacplmann/ngx-cypress-builder/issues/4#issuecomment-437208799 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AA0lQP2-9LK3OT5cVQrHaHHxdrztJTf-ks5utM88gaJpZM4YF8ym

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/ngx-cypress-builder/issues/4#issuecomment-437215149, or mute the thread https://github.com/notifications/unsubscribe-auth/AB-mQ01TS1FEYhnzkB9rNTEFYcS358Fkks5utNc0gaJpZM4YF8ym .

-- Gianluca Cirone Creative Technologist

mob es: +34 692858613 mob it: +39 3401210062 skype: gianlucakarma

isaacplmann commented 5 years ago

Everyone has permission to make a pull request. You can fork the repo and then commit to your fork, then GitHub will give you a pop up that asks if you want to make a pull request.

I can walk you through it more if you need me to.

On Nov 9, 2018 6:36 AM, "Gianluca" notifications@github.com wrote:

I presume i don't have the permission to push in the repo, could you give me please?

Thanks G.

Il giorno ven 9 nov 2018 alle ore 02:15 Isaac Mann <notifications@github.com

ha scritto:

Nice. Want to make a PR?

On Thu, Nov 8, 2018, 7:41 PM Gianluca <notifications@github.com wrote:

Append to me too, confirmed! Looks like cypress.run return a Promise that are not and observable.

The fix looks easy it will need only to wrap in a from:

https://github.com/isaacplmann/ngx-cypress-builder/blob/c44301ee0b8f21af456c2b2051beddb5280c2446/lib/src/cypress/cypress-builder.ts#L126-L127

const cypress = require("cypress"); const runner = options.mode === CypressRunningMode.Console ? from(cypress.run(additionalCypressConfig)) .pipe(map((result: any) => ({ success: result.totalFailed === 0 }))) : cypress.open(additionalCypressConfig);

return from(runner);

👍

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/isaacplmann/ngx-cypress-builder/issues/4#issuecomment-437208799

, or mute the thread <

https://github.com/notifications/unsubscribe-auth/AA0lQP2-9LK3OT5cVQrHaHHxdrztJTf-ks5utM88gaJpZM4YF8ym

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/isaacplmann/ngx-cypress-builder/issues/4#issuecomment-437215149 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AB-mQ01TS1FEYhnzkB9rNTEFYcS358Fkks5utNc0gaJpZM4YF8ym

.

-- Gianluca Cirone Creative Technologist

mob es: +34 692858613 mob it: +39 3401210062 skype: gianlucakarma

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/ngx-cypress-builder/issues/4#issuecomment-437334416, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQOr1oDCKwwAOVd-XICLjyRvlK2KVks5utWjPgaJpZM4YF8ym .

gcirone commented 5 years ago

Any news about PR @isaacplmann ?

isaacplmann commented 5 years ago

The PR is included in 1.0.1.

gcirone commented 5 years ago

Looks fixed the issue 👍 Thanks