Code Monkey home page Code Monkey logo

Comments (7)

sakshi-tawani avatar sakshi-tawani commented on June 25, 2024

Facing same issue

from agent-js-cypress.

zvpanchal avatar zvpanchal commented on June 25, 2024

Hi, when will this issue fix be merged to the master? We are facing the same issue.

from agent-js-cypress.

AmsterGet avatar AmsterGet commented on June 25, 2024

Fixed in 5.0.3.

from agent-js-cypress.

AnkaNik avatar AnkaNik commented on June 25, 2024

I have this issue with cypress 12.17.1

from agent-js-cypress.

AmsterGet avatar AmsterGet commented on June 25, 2024

Hello @AnkaNik !
Which version agent-js-cypress are you using?
Please note we've added the logDebug command instead of overriding default Cypress debug.

from agent-js-cypress.

AnkaNik avatar AnkaNik commented on June 25, 2024

Hello @AnkaNik ! Which version agent-js-cypress are you using? Please note we've added the logDebug command instead of overriding default Cypress debug.

Im not sure that I know how to find it because just start use it after long pause)

I face problem with error :

 CypressError: The following error originated from your test code, not from Cypress.
  > `Cypress.Commands.addQuery()` is used to create new queries, but `findAllByLabelText` is an existing Cypress command or query, or is reserved internally by Cypress.
 If you want to override an existing command or query, use `Cypress.Commands.overrideQuery()` instead.
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
Cypress could not associate this error to any specific test.
We dynamically generated a new test to display this failure
```.

when try to run synpress in my project. 

I've got all configuration setup as it is on tutorials, but when try to run `synpress run --configFile synpress.config.js` cypress loads and failed with error on a first step with initiated command for running metamask setup from synpress. 

My expectation was, that if I put inside support files import of synpress it will run smoothly)) 

here is **cypress/suport.index.js** file: 


_import "./commands.js"_
_import "@synthetixio/synpress/support"_


**cypress/support/commands.js**


_import "@testing-library/cypress/add-commands";_
// here go(es) your custom function(s)
_import "@synthetixio/synpress/support";_


**synpress.config.js** file:
 
_const { defineConfig } = require("cypress");

module.exports = defineConfig({
  userAgent: "synpress",

  retries: {
    runMode: 0,
    openMode: 0,
  },
 
  screenshotsFolder: "screenshots",
  videosFolder: "videos",
  video: true,
  chromeWebSecurity: true,
  viewportWidth: 1466,
  viewportHeight: 1200,

  env: {
    coverage: false,
  },
  
  defaultCommandTimeout: 30000,
  pageLoadTimeout: 30000,
  requestTimeout: 30000,

  component: {
    setupNodeEvents(on, config) {},
    specPattern: "./**/*spec.{.cy.js,jsx,ts,tsx}",
  },

  e2e: {
    setupNodeEvents(on, config) {
      // implement node event listeners here
    },
    supportFile: "cypress/support/index.js",
  },
});_


test file is **cypress/e2e/app/login.cy.js**

describe('Metamask Extension tests', () => {

// Define the test case "connect to DApp with Metamask extension example"
it('connect to DApp with Metamask extension example', () => {
  
  // Add a new network to Metamask using the `cy.addMetamaskNetwork()` command
  cy.addMetamaskNetwork({
    networkName: 'Optimism Goerli',
    rpcUrl: 'https://goerli.optimism.io',
    chainId: '420',
    symbol: 'ETH',
    blockExplorer: 'https://goerli-optimism.etherscan.io/',
    isTestnet: true,
  })
  
  // Visit the root URL of the DApp
  cy.visit('/myURL');
  //wait until it will be loading
  cy.wait(9000);
  cy.get('#accept-all-cookies').click();
  // Click the "Connect" button on the DApp
  cy.get('#heap-connect-wallet').click();
  cy.get('#metamask').click();

Maybe something I miss in configuration that is why it does not recognise correct commands..
Thanks!

from agent-js-cypress.

AmsterGet avatar AmsterGet commented on June 25, 2024

I don't see any usages of our library (agent-js-cypress), so the issue is not related to this repo.

Anyway, looks like you need to check "./commands.js" or "@synthetixio/synpress/support" that you mentioned in cypress/suport.index.js to find the Cypress command collision.

from agent-js-cypress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.