[PR #181] [MERGED] Add basic e2e tests #2462

Closed
opened 2026-03-17 00:09:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/181
Author: @yubathom
Created: 10/4/2019
Status: Merged
Merged: 10/6/2019
Merged by: @liyasthomas

Base: masterHead: tests/e2e-setup


📝 Commits (1)

📊 Changes

9 files changed (+1193 additions, -2 deletions)

View changed files

📝 .travis.yml (+10 -0)
cypress.json (+9 -0)
📝 package-lock.json (+1084 -0)
📝 package.json (+8 -2)
tests/e2e/fixtures/catapi.json (+1 -0)
tests/e2e/integration/app.starter.spec.js (+7 -0)
tests/e2e/integration/feature.url-queries.spec.js (+57 -0)
tests/e2e/support/commands.js (+16 -0)
tests/e2e/support/index.js (+1 -0)

📄 Description

Add basic e2e tests with cypress

Related to #65.

preview of npm run dev:e2e

postwoman_basic-e2e

this should be running in ci too - https://travis-ci.org/yubathom/postwoman/builds/593324131
at before_scripts

Screenshot_2019-10-03 Build #138 - yubathom postwoman - Travis CI

wich should give some reports at every pull requests
Screenshot_2019-10-03 Build #138 - yubathom postwoman - Travis CI(1)

New scripts:

  • npm run tests - run tests once in cli mode. Now just these e2e. In future we should run unit tests too.
  • npm run dev:e2e- will start localhos:3000 and run e2e tests within cypress app browser. This is the default mode to tdd.

Notes:

  • I'm not mounting and testing the docker container. Just testing the dev server (run dev) mounted at the travis-ci.
  • Though would be a better approach (running on docker) the dev server is the same enviroment that is deploying the front end. So I think this should be enough right now.
  • Cypress is awesome and we can add fake backend responses to run tests (see tests/e2e/fixtures/ and tests/e2e/support/commands.js). We should create some fixtures of firebase. Something like this.
  • We should write more tests. Any ideas?

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/181 **Author:** [@yubathom](https://github.com/yubathom) **Created:** 10/4/2019 **Status:** ✅ Merged **Merged:** 10/6/2019 **Merged by:** [@liyasthomas](https://github.com/liyasthomas) **Base:** `master` ← **Head:** `tests/e2e-setup` --- ### 📝 Commits (1) - [`ade7733`](https://github.com/hoppscotch/hoppscotch/commit/ade7733d4751402cb46def4b4c3cf293b02706bf) Add e2e tests ### 📊 Changes **9 files changed** (+1193 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `.travis.yml` (+10 -0) ➕ `cypress.json` (+9 -0) 📝 `package-lock.json` (+1084 -0) 📝 `package.json` (+8 -2) ➕ `tests/e2e/fixtures/catapi.json` (+1 -0) ➕ `tests/e2e/integration/app.starter.spec.js` (+7 -0) ➕ `tests/e2e/integration/feature.url-queries.spec.js` (+57 -0) ➕ `tests/e2e/support/commands.js` (+16 -0) ➕ `tests/e2e/support/index.js` (+1 -0) </details> ### 📄 Description ## Add basic e2e tests with cypress Related to #65. preview of `npm run dev:e2e` ![postwoman_basic-e2e](https://user-images.githubusercontent.com/4117768/66173907-f8471880-e628-11e9-8590-4d76060cec30.gif) this should be running in ci too - https://travis-ci.org/yubathom/postwoman/builds/593324131 at `before_scripts` ![Screenshot_2019-10-03 Build #138 - yubathom postwoman - Travis CI](https://user-images.githubusercontent.com/4117768/66174054-c2eefa80-e629-11e9-9128-7cc27cb0b7f5.png) wich should give some reports at every pull requests ![Screenshot_2019-10-03 Build #138 - yubathom postwoman - Travis CI(1)](https://user-images.githubusercontent.com/4117768/66174170-19f4cf80-e62a-11e9-8682-e5d4b187d249.png) ## New scripts: * `npm run tests` - run tests once in cli mode. Now just these e2e. In future we should run unit tests too. * `npm run dev:e2e`- will start localhos:3000 and run e2e tests within cypress app browser. This is the default mode to tdd. ## Notes: - I'm not mounting and testing the docker container. Just testing the dev server (`run dev`) mounted at the travis-ci. - Though would be a better approach (running on docker) the dev server is the same enviroment that is deploying the front end. So I think this should be enough right now. - [Cypress](https://www.cypress.io/) is awesome and we can add fake backend responses to run tests (see `tests/e2e/fixtures/` and `tests/e2e/support/commands.js`). We should create some fixtures of firebase. Something like [this](https://github.com/prescottprue/cypress-firebase). - We should write more tests. Any ideas? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 00:09:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#2462
No description provided.