lirantal / cypress-social-logins

Cypress authentication flows using social network providers
Apache License 2.0
247 stars 78 forks source link

cy.task('GoogleSocialLogin') is failing #137

Closed mcmclarry closed 1 month ago

mcmclarry commented 1 year ago

Error: image

I am trying to use this cypress-social-logins plugin for automating the webpage being tested, having a Google Sign in option. Here are my files:

cypress/plugins/index.js image

function (from cypress page) that will be called in actual testing (e2e test file) image

I have followed what were written in the read me or guide. Not sure why I am having this error. Would appreciate the help for the possible solution or fix for this issue. Thank you!

I am using latest cypress version (v12.12) Node: v16.14.0 OS: Windows 10

mcmclarry commented 1 year ago

@lirantal Hi, just want to check if you had encountered this issue before? Thanks!

BahaaalHalabi01 commented 8 months ago

@mcmclarry can you please show the cypress.config file ? you should define the task there not in the plugins folder, below is an example of a config file with the google social login

 e2e: {
    supportFile: false,
    baseUrl: 'http://localhost:5173',
    setupNodeEvents(on, config) {
      on('task',{
        GoogleSocialLogin:plugins.GoogleSocialLogin
      })
    },
  },
lirantal commented 1 month ago

Going to close this for being stale but if any issues remain or more context to be shared, please comment and will re-open.