Browse Source

test: cypress test correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/653/head
Pranav C 3 years ago
parent
commit
32c885a42b
  1. 4
      cypress/support/commands.js
  2. 4
      cypress/support/page_objects/mainPage.js
  3. 4
      cypress/support/page_objects/navigation.js

4
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()
}

4
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 <http://www.gnu.org/licenses/>.
*
*/
*/

4
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()

Loading…
Cancel
Save