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

[feature] start tests by a custom script #25

Open
visitek opened this issue Oct 26, 2020 · 16 comments
Open

[feature] start tests by a custom script #25

visitek opened this issue Oct 26, 2020 · 16 comments

Comments

@visitek
Copy link

visitek commented Oct 26, 2020

I have reporter in cypress HomeDir node_modules.
I have also reporter in project node_modules.

I've tried duplicating node_modules with reporter rependencies also Into almost every folder.

When I've checked source code, it should work definitely, but it doesn't.

I'm not about to subscribe for all in my team, because I was unable to try it.

image

@visitek
Copy link
Author

visitek commented Oct 26, 2020

image

@mbolotov
Copy link
Owner

mbolotov commented Oct 26, 2020

Hi @visitek
Do you have your spec file outside of the Cypress project base directory?

@visitek
Copy link
Author

visitek commented Oct 28, 2020

Sure, it is transpiled by the typescript to dist

@mbolotov
Copy link
Owner

Okay, this is a current limitation of the plugin. It can't handle such a case.
I will look if I can fix this.

@mbolotov mbolotov changed the title Unable to connect cypress-intellij-reporter cypress-intellij-reporter can't be found if the spec is placed outside of cypress project directory Oct 28, 2020
@visitek
Copy link
Author

visitek commented Oct 29, 2020

So my trial is expiring as well and we've not tested because we've got stucked

@mbolotov
Copy link
Owner

Could you configure your project to have the spec inside the base directory?

@visitek
Copy link
Author

visitek commented Oct 29, 2020

So we need to set the tsconfig to push the output into directory where are sources? This does not seem as clean solution at all.

@mbolotov
Copy link
Owner

This is all I can offer you until I fix this issue and release a new version of plugin

@visitek
Copy link
Author

visitek commented Oct 30, 2020

Sure, thank you.. we will try it temporarily like that.

@mbolotov
Copy link
Owner

mbolotov commented Nov 9, 2020

hi @visitek!
Could you check if this issue was fixed in the 1.6.2 version?

@visitek
Copy link
Author

visitek commented Nov 9, 2020

looks fixed. Thank you.
One more thing is not clear to me. How can I set the runner script?
Due to fact the tests are in typescript and we use Angular, the runner should be called with ng e2e.

Currently, we must use a workaround with tsc watch. But the tests do not accept .ts files, only .js files.

Do you have any idea? Maybe I've missed something.

@visitek
Copy link
Author

visitek commented Nov 10, 2020

One more thing we still must fix manually.
Path to the base node_modules does not work for mocha.. we must set the path manually.

fixReporter

@mbolotov
Copy link
Owner

Do you have any idea? Maybe I've missed something.

No, there is currently no way to use a script to run the tests.
How do you call the runner? Could you provide the full command?

@visitek
Copy link
Author

visitek commented Nov 10, 2020

When we use JEST for units, there is a just bin path when we can provide path to node_modules/@angular/cli and this automatically uses ng test. It would expect similar behavior. But this does not matter, it works. Bigger problem is, that it does not support .ts files. The plugin helps, but not as much as it could.

It uses global cypress installed in my home directory into mainFile.
I think that the full configuration would be more clear than the magic, but it works if someone wants. I think that mocha installed globally would work finally.

@mbolotov
Copy link
Owner

I mean how do you start Cypress from the command line, with no help from the plugin. Could you provide the command?

@visitek
Copy link
Author

visitek commented Nov 10, 2020

just ng e2e alternativelly with the cypress parameters ng e2e --watch

@mbolotov mbolotov changed the title cypress-intellij-reporter can't be found if the spec is placed outside of cypress project directory [feature] start tests by a custom script Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants