From f931fb3770999390f1785078c61cee0254aa6fac Mon Sep 17 00:00:00 2001 From: Ruidy Nemausat Date: Tue, 12 May 2020 10:03:34 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20set=20cypress=20up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - define a baseUrl in cypress.json - create a smoke.spec.js to check config. --- README.md | 29 +++++++++++++++++++---------- cypress.json | 4 +++- cypress/integration/smoke.spec.js | 6 ++++++ 3 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 cypress/integration/smoke.spec.js diff --git a/README.md b/README.md index df88d9a..a1f48a8 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,33 @@ Social App for connecting with developers & tech enthusiasts. +## Tests + +### End-to-end + +- [Cypress](https://www.cypress.io) - JavaScript End to End Testing Framework + +Open test runner with: + +```sh +yarn cypress +``` + +and edit your E2E test cases in `cypress/integration/` folder. ## Built With -* [ReactJs](https://reactjs.org/) - A JavaScript library for building user interfaces -* [Redux](https://redux.js.org/) - A predictable statea container for JavaScript apps -* [ROME](https://fiirebase.google.com/) - Firebase helps mobile and web app teams succeed - - +- [ReactJs](https://reactjs.org/) - A JavaScript library for building user interfaces +- [Redux](https://redux.js.org/) - A predictable statea container for JavaScript apps +- [ROME](https://fiirebase.google.com/) - Firebase helps mobile and web app teams succeed ## Versioning -We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags). +We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags). ## Authors -* **Ruidy Nemausat** - *Initial work* - [rjNemo](https://github.com/rjNemo/) - +- **Ruidy Nemausat** - _Initial work_ - [rjNemo](https://github.com/rjNemo/) ## License @@ -26,5 +36,4 @@ This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md ## Acknowledgments -* [Inspiration](https://github.com/bradtraversy/devconnector_2.0) - +- [Inspiration](https://github.com/bradtraversy/devconnector_2.0) diff --git a/cypress.json b/cypress.json index 0967ef4..4bae1f9 100644 --- a/cypress.json +++ b/cypress.json @@ -1 +1,3 @@ -{} +{ + "baseUrl": "http://localhost:3000/" +} \ No newline at end of file diff --git a/cypress/integration/smoke.spec.js b/cypress/integration/smoke.spec.js new file mode 100644 index 0000000..ebf3e7d --- /dev/null +++ b/cypress/integration/smoke.spec.js @@ -0,0 +1,6 @@ +describe('smoke', () => { + it('sees learn', () => { + cy.visit('/'); + cy.get('a').contains('Learn'); + }); +});