Mattermost-server: Write Cypress test: "MM-T398 Use team invite link to sign up using email and password"

Created on 14 Aug 2020  Â·  6Comments  Â·  Source: mattermost/mattermost-server

This is part of __Cypress Test Automation Hackfest 🚀__. Please read more at https://github.com/mattermost/mattermost-server/issues/15120.

See our end-to-end testing documentation for reference.

MM-T398 Use team invite link to sign up using email and password

Steps

  1. Go to Main Menu ➜ Invite People and click 'Copy Link' next to the Team Invite Link
  2. Copy the link
  3. Log out or open an incognito window
  4. Paste the link in
  5. On the Sign Up page, click "Email and password"
  6. Enter a username and email address that you can access (can use plus sign, such as `[email protected]), and a password
  7. Click "Create Account"
  8. Verify URL on `You are almost done...` screen does not have `undefined` team name
  9. Receive email with link to verify email address, click the link (or open it in incognito window), and enter password

Expected

  • Step 8. Starting in v5.24 URL in address bar does not have an `undefined` team name appended
  • Email verification is successful and account is created.
  • On the login page, email is pre-filled with focus on the password field.
  • Once filled out you are redirected to the login page
  • If the email address and username you use is properly formatted you do not see an error that reads "Enter a valid email or username and/or password, or sign in using another method.

Test Folder: /cypress/integration/onboarding
Test code arrangement:

describe('Onboarding', () => {
    it('MM-T398 Use team invite link to sign up using email and password', () => {
        // code
    });
});

If you're interested, please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

AreE2E Tests Easy Hackfest Help Wanted

All 6 comments

I'd like to do this please!

Sure and thanks @josephk96!

No problem @saturninoabril !
Just a few quick questions -

  1. When I visit the team invite link that I copied from the 'Invite People' modal, I don't see a 'Email and password' option, I am automatically directed to that screen. Are there any authentication plugins that I have to install first? If so, could you please link me to a file that I could use for reference?
  2. For step 8, I am not seeing the 'You are almost done...' screen, after inputting my user details and creating the account, I am automatically redirected to the team page. Am I missing something?

Thanks Saturn!

  1. It's in the case where other authentication options are enabled like with SAML, Gitlab, etc. Since it's being reset and disabled for every Cypress run, it's good to assume that it's redirected to Signup page.
  2. You'll need to update the config to require email verification. {"EmailSettings": {"RequireEmailVerification": true}}

Thanks for the clarification, Saturn, it was very helpful!

Thanks @josephk96! PR merged; closing this now.

Was this page helpful?
0 / 5 - 0 ratings