From 32c885a42b0f023fcf0017b2671f3f63bdedaf6e Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 12 Oct 2021 16:29:45 +0530 Subject: [PATCH] test: cypress test correction Signed-off-by: Pranav C --- cypress/support/commands.js | 4 ++-- cypress/support/page_objects/mainPage.js | 4 ++-- cypress/support/page_objects/navigation.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 040bd8a99c..c0265ad33a 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -52,13 +52,13 @@ Cypress.Commands.add('signinOrSignup', (_args) => { cy.wait(8000); cy.get('body').trigger('mousemove'); cy.contains('Let\'s Begin').click(); - cy.get('input[type="email"]', { timeout: 12000 }).type(args.username); + cy.get('input[type="text"]', { timeout: 12000 }).type(args.username); cy.get('input[type="password"]').type(args.password); cy.get('button:contains("SIGN UP")').click() // handle signin } else { - cy.get('input[type="email"]', { timeout: 12000 }).type(args.username); + cy.get('input[type="text"]', { timeout: 12000 }).type(args.username); cy.get('input[type="password"]').type(args.password); cy.get('button:contains("SIGN IN")').click() } diff --git a/cypress/support/page_objects/mainPage.js b/cypress/support/page_objects/mainPage.js index 536f54265e..8653aead84 100644 --- a/cypress/support/page_objects/mainPage.js +++ b/cypress/support/page_objects/mainPage.js @@ -71,7 +71,7 @@ export class _mainPage { // Redirected to new URL, feed details // - cy.get('input[type="email"]').type(userCred.username) + cy.get('input[type="text"]').type(userCred.username) cy.get('input[type="password"]').type(userCred.password) cy.get('button:contains("SIGN UP")').click() @@ -175,4 +175,4 @@ export const mainPage = new _mainPage; * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * - */ \ No newline at end of file + */ diff --git a/cypress/support/page_objects/navigation.js b/cypress/support/page_objects/navigation.js index dfd2e6bc41..0bc6ad1dda 100644 --- a/cypress/support/page_objects/navigation.js +++ b/cypress/support/page_objects/navigation.js @@ -26,7 +26,7 @@ export class _loginPage { signIn(userCredentials) { this.go(urlPool.ncUrlSignIn) - cy.get('input[type="email"]', {timeout: 6000}).type(userCredentials.username) + cy.get('input[type="text"]', {timeout: 6000}).type(userCredentials.username) cy.get('input[type="password"]').type(userCredentials.password) cy.get('button:contains("SIGN IN")').click() @@ -38,7 +38,7 @@ export class _loginPage { signUp(userCredentials) { this.go(urlPool.ncUrlSignUp) - cy.get('input[type="email"]', {timeout: 6000}).type(userCredentials.username) + cy.get('input[type="text"]', {timeout: 6000}).type(userCredentials.username) cy.get('input[type="password"]').type(userCredentials.password) cy.get('button:contains("SIGN UP")').click()