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

Failed to run tests from Idea #51

Closed PSerediuk closed 3 years ago

PSerediuk commented 3 years ago

I've made npm install and after I tried to run test - it is failed with this exception Failed to run Cypress configuration

com.intellij.execution.ExecutionException: Unable to add a .only keyword to run a single test at me.mbolotov.cypress.run.CypressRunState$JsOnlifier.onlyfiSpec(Unknown Source) at me.mbolotov.cypress.run.CypressRunState.A(Unknown Source) at me.mbolotov.cypress.run.CypressRunState.execute(Unknown Source) at me.mbolotov.cypress.run.CypressRunState.execute(Unknown Source) at com.intellij.execution.runners.DefaultRunProgramRunner$execute$1.invoke(DefaultRunProgramRunner.kt:21) at com.intellij.execution.runners.DefaultRunProgramRunner$execute$1.invoke(DefaultRunProgramRunner.kt:12) at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:170) at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:69) at com.intellij.execution.impl.ExecutionManagerImpl$doStartRunProfile$startRunnable$1.run(ExecutionManagerImpl.kt:231) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218) at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:319) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46) at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

mbolotov commented 3 years ago

Hi @PSerediuk! Please provide the version of plugin do you use. I remember fixing such an issue in a previous version. Please also provide more information how to reproduce the problem. Could you make a screenshot of the code of testcase where you get the exception from?

PSerediuk commented 3 years ago

version 2.2.0. I've noticed it after npm install and run test, so after I've observed that exception. I reinstalled plugin and it didn't fix it. Just fixed after deleting all test configuration in Idea.

describe('Login automation test Suite ', () => {

let test_user;
beforeEach(() => {
    cy.visit('/');
    cy.fixture('test_user').then((profile) =>{
        test_user = profile
        return test_user;
    });

})

it.only(' open login page test', () => {
    //Create LoginPage object
    const loginPage = new LoginPage();

    //Calling login page
    cy.contains(' User Name ');
    cy.contains ('Password');

    loginPage.getUserName().type(test_user.username);
    loginPage.getPassword().type(test_user.password);

})

})

On Tue, Jul 13, 2021 at 3:53 PM Mikhail Bolotov @.***> wrote:

Hi @PSerediuk https://github.com/PSerediuk! Please provide the version of plugin do you use. I remember fixing such an issue in a previous version. Please also provide more information how to reproduce the problem. Could you make a screenshot of the code of testcase where you get the exception from?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mbolotov/intellij-cypress/issues/51#issuecomment-879061025, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUWSPN66HA3FWJMMZWQII2DTXQZLXANCNFSM5AI47FFA .

-- Confidentiality Note:  This e-mail and any attachments are confidential and may be protected by legal privilege. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.

mbolotov commented 3 years ago

Could you reproduce it after you recreated the run configurations? It may be related to possible incompatibility of the old run configurations with the new plugin version.

PSerediuk commented 3 years ago

I deleted all old staff configuration and setup a new one, so now everything is ok

On Tue, 13 Jul 2021, 18:57 Mikhail Bolotov, @.***> wrote:

Could you reproduce it after you recreated the run configurations? It may be related to possible incompatibility of the old run configurations with the new plugin version.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mbolotov/intellij-cypress/issues/51#issuecomment-879207984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUWSPN45NCQXF5VK63QAKR3TXRO5LANCNFSM5AI47FFA .

-- Confidentiality Note:  This e-mail and any attachments are confidential and may be protected by legal privilege. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.

mbolotov commented 3 years ago

so closing this issue as not reproducible anymore