mbolotov / intellij-cypress

IntelliJ-Cypress plugin: https://plugins.jetbrains.com/plugin/13819-intellij-cypress Pro version: https://plugins.jetbrains.com/plugin/13987-cypress-support-pro
MIT License
35 stars 5 forks source link

Running spec from source left gutter displays "Nothing here" #116

Open bensullivan-ag opened 1 year ago

bensullivan-ag commented 1 year ago

Describe the bug Please see attached screenshot

Versions:

Screenshot 2023-02-28 at 18 01 18
mbolotov commented 1 year ago

are you sure this test is correctly setup for running by the cypress config and other things? are you able to run it from the command line? please provide a sample repo to reproduce the problem if possible

you can also try disabling this setting: image

bensullivan-ag commented 1 year ago

Hi Mikhail

The test runs with the plugin - I just can't do it from the spec file..

The option you have above is disabled.

Thanks

On Tue, 28 Feb 2023 at 18:13, Mikhail Bolotov @.***> wrote:

are you sure this test is correctly setup for running by the cypress config and other things? are you able to run it from the command line? please provide a sample repo to reproduce the problem if possible

you can also try disabling this setting: [image: image] https://user-images.githubusercontent.com/19785715/221792955-4e29163b-abd2-42f2-90b6-3816ffcf94c5.png

— Reply to this email directly, view it on GitHub https://github.com/mbolotov/intellij-cypress/issues/116#issuecomment-1447750083, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYKHEXPQ7HKNOTOGF6I3FQ3WZWXTDANCNFSM6AAAAAAVKMEKRI . You are receiving this because you authored the thread.Message ID: @.***>

-- This email is sent by Auto & General Insurance Company Ltd, Auto & General Services Pty Ltd, Auto & General Holdings Pty Ltd or a related body corporate (Auto & General) and is for the intended addressee. The views expressed in this email and attachments (email) reflect the views of the stated author but may not reflect views of Auto & General. This email is confidential and subject to copyright. It may be privileged. If you are not the intended addressee, confidentiality and privilege have not been waived and any use, interference with, or disclosure of this email is unauthorised. If you are not the intended addressee please immediately notify the sender and then delete the email. Auto & General does not warrant that this email is error or virus free.

mbolotov commented 1 year ago

you can try running the whole spec file to check if everything is working okay: cypress run --spec "cypress/e2e/examples/actions.cy.js" see here for more details: https://docs.cypress.io/guides/guides/command-line#cypress-run-spec-lt-spec-gt

bensullivan-ag commented 1 year ago

Yes the spec runs with your plugin when I setup the run config manually. The problem is I cannot run the test from the left margin of the source file as per the screenshot I provided.

On Tue, 28 Feb 2023 at 18:24, Mikhail Bolotov @.***> wrote:

you can try running the whole spec file to check if all is working okay: cypress run --spec "cypress/e2e/examples/actions.cy.js" see here for more details: https://docs.cypress.io/guides/guides/command-line#cypress-run-spec-lt-spec-gt

— Reply to this email directly, view it on GitHub https://github.com/mbolotov/intellij-cypress/issues/116#issuecomment-1447762498, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYKHEXOBOHV7LTH53WVAKHTWZWY4FANCNFSM6AAAAAAVKMEKRI . You are receiving this because you authored the thread.Message ID: @.***>

-- This email is sent by Auto & General Insurance Company Ltd, Auto & General Services Pty Ltd, Auto & General Holdings Pty Ltd or a related body corporate (Auto & General) and is for the intended addressee. The views expressed in this email and attachments (email) reflect the views of the stated author but may not reflect views of Auto & General. This email is confidential and subject to copyright. It may be privileged. If you are not the intended addressee, confidentiality and privilege have not been waived and any use, interference with, or disclosure of this email is unauthorised. If you are not the intended addressee please immediately notify the sender and then delete the email. Auto & General does not warrant that this email is error or virus free.

mbolotov commented 1 year ago

please provide a sample repo to reproduce the problem

TiziG commented 1 year ago

Having the same issue, but only using the Pro version. In the free version it works as expected.

Cypress Support Pro 3.6.2 WebStorm 2023.1.2 Windows 11

mbolotov commented 1 year ago

Hi @TiziG! Can you provide a sample project to reproduce the problem?

TiziG commented 1 year ago

Sure, here's a basic angular repo with a cypress component test. https://github.com/TiziG/cypress-plugin-run-config-issue

As mentioned, the cypress run config is not available when clicking on the green triangle on the left of the source in Webstorm when using the Pro Plugin.

edit: the cypress test file is located here: src/app/app.component.cy.ts

mbolotov commented 1 year ago

@TiziG I've found two issues with the project you provided:

  1. it uses Cypress version 12. The plugin do not fully supports config file evaluation for cypress version >= 11. Because of that, the "Parse Cypress configuration file and use their settings" must be automatically disabled.
  2. For some reason the above setting is not disabled in your project. So the plugin can't evaluate the config file and therefore can't create a run config via the gutter.

As for the workaround, you can go to the cypress-plugin-run-config-issue/.idea/other.xml file and manually correct it to have the following content:

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="me.mbolotov.cypress.settings.CypressSettings">
    <option name="evalConfig" value="false" />
  </component>
</project>