From 7522904e47a8fc94581d1f871284dd8df8a01f61 Mon Sep 17 00:00:00 2001 From: SpacelessTime <73561672+SpacelessTime@users.noreply.github.com> Date: Thu, 18 Feb 2021 15:46:00 -0500 Subject: [PATCH 1/2] mvp this file is also in the user onboarding project --- form_test.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 form_test.js diff --git a/form_test.js b/form_test.js new file mode 100644 index 000000000..50d8ec81d --- /dev/null +++ b/form_test.js @@ -0,0 +1,27 @@ +describe('NewForm', () => { + beforeEach(() => cy.visit('baseUrl":"http://localhost:8080/')) + describe('filling and submitting', () => { + it('can type and see the correct name', () => { + cy.get('input[name=name]') + .type('Ken Kaneki') + .should('have.value', 'Ken Kaneki') + + cy.get('input[name=email]').type('KennyCoffee@Anteiku.com') + + cy.get('input[name=password]').type('password').click() + cy.get('input:invalid').should('have.length', 6) + cy.get('#password').then(($input) => { + expect($input[0].validationMessage).to.eq('this field is required')}) + cy.get('[type=terms]').check() + + cy.get('button').submit().click() + +}) + describe('Filling inputs and cancelling', () => { + + it('submit button disabled', () => { + + cy.get('button').submit().should('be.disabled')}) + }) +}) +}) \ No newline at end of file From 1521b4636a71400728bc7588c1eb251a294ea624 Mon Sep 17 00:00:00 2001 From: SpacelessTime <73561672+SpacelessTime@users.noreply.github.com> Date: Thu, 15 Apr 2021 02:42:46 -0400 Subject: [PATCH 2/2] mvp --- form_test.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/form_test.js b/form_test.js index 50d8ec81d..d5c64e792 100644 --- a/form_test.js +++ b/form_test.js @@ -1,7 +1,8 @@ describe('NewForm', () => { - beforeEach(() => cy.visit('baseUrl":"http://localhost:8080/')) - describe('filling and submitting', () => { +beforeEach(() => cy.visit('baseUrl":"http://localhost:8080/')) +describe('filling and submitting', () => { it('can type and see the correct name', () => { + cy.get('input[name=name]') .type('Ken Kaneki') .should('have.value', 'Ken Kaneki') @@ -17,11 +18,9 @@ describe('NewForm', () => { cy.get('button').submit().click() }) - describe('Filling inputs and cancelling', () => { - - it('submit button disabled', () => { - +describe('Filling inputs and cancelling', () => { + it('submit button disabled', () => { cy.get('button').submit().should('be.disabled')}) - }) +}) }) }) \ No newline at end of file