INSERT GRAPHIC HERE (include hyperlink in image)
Subtitle or Short Description Goes Here
| const style = document.createElement('style'); | |
| style.innerHTML = ` | |
| .image-container { | |
| position: relative; | |
| overflow: hidden; | |
| width: auto; | |
| height: auto; | |
| display: inline-block; | |
| } | |
| .image-container:hover .overlay { |
| it('Видим поля формы и они пустые, не видим ошибки', () => { | |
| cy.get('[data-cy=password]').should('have.value', ''); | |
| cy.get('[data-cy=email]').should('have.value', ''); | |
| cy.get('[data-cy="email-error"]').should('not.visible'); | |
| }); | |
| it('Заполняем поле email не валидным значением, кликаем по кнопке войти, видим тект ошибки', () => { | |
| cy.get('[data-cy=email]') | |
| .type(user.invalid_email) | |
| .should('have.value', user.invalid_email); |
| <form data-cy="login" onsubmit="return false;"> | |
| <h3 class="title title--h3">Вход</h3> | |
| <div class="auth_form-email-input-wrapper"> | |
| <div class="input_wrapper input_wrapper--xl input_wrapper--email" data-cy="email-wrapper"> | |
| <input type="email" placeholder="Эл. почта" name="email" class="input_element" data-cy="email" value=""> | |
| <label class="input_label">Эл. почта</label> | |
| <div class="input_error" data-cy="email-error">Поле обязательно для заполнения</div> | |
| </div> |
| describe('Регистрация', () => { | |
| before(() => { | |
| cy.visit('auth/registration'); | |
| cy.url().should('include', 'auth/registration'); | |
| cy.get('[data-cy=registration]').should('exist'); | |
| }); |
| describe('Если не авторизован', () => { | |
| it('Переходим на главную страницу, попадаем на страницу логина', () => { | |
| cy.visit('/'); | |
| cy.url().should('include', 'login'); | |
| cy.get('[data-cy=login]').should('exist'); | |
| }); | |
| }); |
| describe('Authentication User', () => { | |
| before(() => { | |
| cy.clearCookies(); | |
| cy.visit('/', { | |
| onBeforeLoad(window) { | |
| delete window.fetch; | |
| } | |
| }); | |
| const user = require('../fixtures/user.json'); | |
| const usersInfo = require('../fixtures/users/input/users_info.json'); | |
| const errors = require('../fixtures/errors.json'); | |
| describe('Authentication User', () => { | |
| before(() => { | |
| cy.server(); | |
| cy.route({ | |
| method: 'GET', |