From 12559969645f0c71d230d74dfe34718335dd1d38 Mon Sep 17 00:00:00 2001 From: Dmitry Kruchinin <33020454+dvkruchinin@users.noreply.github.com> Date: Mon, 27 Jul 2020 22:45:00 +0300 Subject: [PATCH] Add a cypress test. (#1936) * Add a cypress test. * Rename the file of test. Change location of the file. Co-authored-by: Dmitry Kruchinin --- tests/cypress/integration/auth_page.js | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/cypress/integration/auth_page.js diff --git a/tests/cypress/integration/auth_page.js b/tests/cypress/integration/auth_page.js new file mode 100644 index 00000000..28e55304 --- /dev/null +++ b/tests/cypress/integration/auth_page.js @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2020 Intel Corporation + * + * SPDX-License-Identifier: MIT + */ + +/// + +describe('Check server availability', () => { + it('Server web interface is available', () => { + cy.visit('http://localhost:8080') + }) + + it('"/auth/login" contains in the URL', () => { + cy.url().should('include', '/auth/login') + }) + + it('"Sign in" buttun is exists', () => { + cy.get('[type="submit"]') + }) + + it('Check plaseholder "Username"', () => { + cy.get('input').invoke('attr', 'placeholder').should('contain', 'Username') + }) + + it('Check plaseholder "Password"', () => { + cy.get('[type="password"]') + }) + + it('Click to "Sign in" buttun', () => { + cy.get('[type="submit"]').click() + }) +})