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

Question About additional steps #111

Open
davidkhayutin opened this issue Jan 26, 2022 · 5 comments
Open

Question About additional steps #111

davidkhayutin opened this issue Jan 26, 2022 · 5 comments

Comments

@davidkhayutin
Copy link

davidkhayutin commented Jan 26, 2022

  • Library Version: 1.13.0
  • OS: Mac
  • Node.js Version: 16+

Hello

I have been able to successfully login with google - however on my app - after google login completes - there is an additional step to fill out within my application - and I wondering if something like this will be possible to do

I read the documentation regarding additional steps - but this does not seem to integrate with using the native GoogleSocialLogin or perhaps I am using it wrong

If so could you please supply a working example of how that would look in both the config file but also the test case

@lirantal
Copy link
Owner

You can do the in-app step in your own Cypress test code, that shouldn't be part of this plugin.

@davidkhayutin
Copy link
Author

davidkhayutin commented Jan 27, 2022

I dont think it will work that way given how the app is currently build

currently in my extra steps function I am trying to find an element on screen but I get an error every time

const completeRegistrationFlow = async ({ page, options } = {}) => {
  await page.waitForSelector('#schoolSelection')
}

Screen Shot 2022-01-27 at 11 37 53 AM

being called with

  on('task', {
    customizedLogin: (options) => {
      options.additionalSteps = completeRegistrationFlow
      return CustomizedLogin(options)
    },
  })

@lirantal
Copy link
Owner

That element is part of the login to Google screen or on your own app?

@davidkhayutin
Copy link
Author

davidkhayutin commented Jan 27, 2022

on the app - but its showing up in chromium - after google pop up closes on successful login

@lirantal
Copy link
Owner

The only callbacks that can help you are postLoginSelector to validate the login and postLoginClick. When the login is successful, you should do the rest of the flow of your app in your regular Cypress tests.

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