This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const registerPageCss = { | |
title: 'h2', | |
registerButton: '.btn-primary', | |
fieldSelector: '.form-group', | |
errorMessage: '.invalid-feedback', | |
usernameField: '[name=username]', | |
firstNameField: '[name=firstName]', | |
lastNameField: '[name=lastName]', | |
passwordField: '[name=password]' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress" /> | |
context('Register tests', () => { | |
beforeEach(() => { | |
cy.visit('/register') | |
}) | |
it('Should register', () => { | |
cy.get('[name=firstName]').type(getRandomString()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 1, | |
"firstName": "Slawomir", | |
"lastName": "Radzyminski", | |
"username": "slawenty", | |
"password": "password" | |
}, | |
{ | |
"id": 2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress" /> | |
context('Home page', () => { | |
beforeEach(() => { | |
cy.setTokenInLocalStorage() | |
cy.visit('/') | |
}) | |
it('Should display at least one user', () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress" /> | |
import { homePageCss } from "../pages/homepage" | |
import { loginPageCss } from "../pages/loginpage" | |
import { registerPageCss } from "../pages/registerpage" | |
context('Login tests', () => { | |
const username = getRandomString() | |
const password = getRandomString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress" /> | |
context('Login tests', () => { | |
beforeEach(() => { | |
cy.visit('/login') | |
}) | |
it('Login page should be displayed', () => { | |
cy.get('h2').contains('Login') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress" /> | |
context('Home page full wypas', () => { | |
const username = getRandomString() | |
const password = getRandomString() | |
const firstName = getRandomString() | |
const lastName = getRandomString() | |
let userId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress" /> | |
context('Home page full wypas', () => { | |
const username = getRandomString() | |
const password = getRandomString() | |
const firstName = getRandomString() | |
const lastName = getRandomString() | |
let userId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress" /> | |
context('Home page full wypas', () => { | |
const username = getRandomString() | |
const password = getRandomString() | |
const firstName = getRandomString() | |
const lastName = getRandomString() | |
let userId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress" /> | |
context('Home page full wypas', () => { | |
const username = getRandomString() | |
const password = getRandomString() | |
const firstName = getRandomString() | |
const lastName = getRandomString() | |
before(() => { |