Skip to content

marmelab/argos-realworld

Repository files navigation

argos-realworld

This repository stores several versions of the database, API and client of the realworld app, for digital footprint measurements.

Included Versions

We've cloned and tweaked implementations of the realworld frontend and backend apps, so that they can work together and produce the exact same results (and pass the same tests).

You can use either one of the server implementations with either one of the frontend implementation.

Backend

Frontend

Requirements

Node, Docker

Installation

Choose a frontend and a backend, pass them as API_DIR and CLIENT_DIR environment variables, and call make install. For instance:

API_DIR=node-express CLIENT_DIR=react-redux make install

Starting The App

Choose a frontend and a backend, pass them as API_DIR and CLIENT_DIR environment variables, and call make start. For instance:

API_DIR=node-express CLIENT_DIR=react-redux make start

To run e2e tests (with Cypress running on the host machine, and opening a browser)

  • make start
  • make restore
  • make test-open

To run e2e tests (with a dockerized version of Cypress)

Setup dockerized environment

  • make setup-tests
  • make restore

Then run automated tests

  • make run-test

Notes for dev

  • in order to add a new front you should decorate html elements with data-test-id:
    • home-menu
    • new-post-menu
    • signin-menu
    • settings-menu
    • publish-button
    • post-comment-button
    • signin-button
    • logout-button
    • global-feed-link
  • modify code such that API root takes value http://localhost:4000/api when tests are run without Docker or http://api:4000/api when tests are run in Docker
  • front PORT should be 8080