Skip to content

Pet project with creation of auto-tests on Cypress framework

Notifications You must be signed in to change notification settings

chickenzombie/cypressTestsApp

Repository files navigation

Автоматизация формы входа с помощью Cypress

Это тестовое приложение с формой логина, автоматизированное с помощью Cypress.

Технологии

  • Cypress
  • HTML
  • JavaScript

Установка

Чтобы установить проект, выполните следующие команды в терминале:

git clone https://github.com/chickenzombie/cypressTestsApp.git
cd cypressTestsApp
npm install

Запуск тестов

Чтобы запустить тесты, выполните следующую команду:

npx cypress open

Пример теста

Вот пример теста, который проверяет, что форма логина работает корректно:

describe('Login Form', () => {
  it('should fill the login form and submit', () => {
    cy.visit('http://localhost:8080'); // Запуск локального сервера

    // Заполнение полей формы
    cy.get('input[name="username"]').type('testuser');
    cy.get('input[name="password"]').type('password123');

    // Отправка формы
    cy.get('button[type="submit"]').click();

    // Проверка успешной отправки
    cy.contains('Welcome, testuser!');
  });
});

About

Pet project with creation of auto-tests on Cypress framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published