From 54f079ef046ee30da1b382b8b4531dbd1b050c80 Mon Sep 17 00:00:00 2001 From: Iryna Turaieva Date: Wed, 9 Oct 2024 21:14:57 +0200 Subject: [PATCH] Add sign-up test --- cypress/e2e/signUp.cy.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/signUp.cy.js b/cypress/e2e/signUp.cy.js index 87cc96d..412de11 100644 --- a/cypress/e2e/signUp.cy.js +++ b/cypress/e2e/signUp.cy.js @@ -1,5 +1,13 @@ +import { generateUser } from '../support/generate'; + describe('Sign Up page', () => { it('should provide an ability to register new account', () => { - + const user = generateUser(); + cy.visit('https://react-redux.realworld.io/#/register?_k=rkc761'); + cy.get('input[placeholder="Username"]').type(user.username); + cy.get('input[placeholder="Email"]').type(user.email); + cy.get('input[placeholder="Password"]').type(user.password); + cy.get('button[type="submit"]').click(); + cy.get('.nav-link').should('contain', user.username); }); });