Skip to content
This repository has been archived by the owner on Mar 1, 2020. It is now read-only.
/ frontend-init Public archive

Frontend application used by all personas, which communicates with the backend application.

Notifications You must be signed in to change notification settings

shopozor/frontend-init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shopozor frontend

Build statuses

e2e Build Status Acceptance Build Status Unit Build Status

Docker images

Backend development

As a backend developer, you might need to connect your application to the Shopozor's frontend. The development docker image is produced manually upon every PR merging into the dev branch. You can start the consumer frontend like this:

docker run -p 4000:4000 -it shopozor/frontend:production-dev

Frontend development

As a frontend developer, you might need to connect your application to the Shopozor's backend. You can find the relevant instructions here.

Development setup

VSCode configuration

Make sure you run the script

.vscode/install-extensions.sh

Pre-commit hooks

Pre-commit (and pre-push) hooks are configured with husky (see husky section of package.json). You also need to activate the hooks for the graphql and fixtures submodules. To do that, you run

./scripts/activate-hooks.sh

Gherkin step skeletons

It is pretty handy to get the skeleton code for each step of a feature file. That can be reached with the following command for the LogAUserIn feature

cd cypress/integration/Authentication
npx cucumber-js LogAUserIn.feature

which outputs for example

1) Scenario: Le membre du staff n'est pas encore enregistré # LogAUserIn.feature:13
   ? Etant donné un utilisateur non identifié
       Undefined. Implement with the following snippet:

         Given('un utilisateur non identifié', function () {
           // Write code here that turns the phrase above into concrete actions
           return 'pending';
         });

   ? Lorsqu'un utilisateur s'identifie avec un e-mail et un mot de passe invalides
       Undefined. Implement with the following snippet:

         When('un utilisateur s\'identifie avec un e-mail et un mot de passe invalides', function () {
           // Write code here that turns the phrase above into concrete actions
           return 'pending';
         });

   ? Alors il obtient un message d'erreur stipulant que ses identifiants sont incorrects
       Undefined. Implement with the following snippet:

         Then('il obtient un message d\'erreur stipulant que ses identifiants sont incorrects', function () {
           // Write code here that turns the phrase above into concrete actions
           return 'pending';
         });

Troubleshooting

Upon running the unit tests, you might get an error of the kind (especially on Windows machines):

Cannot find module '[..]/consumer-frontend/node_modules/@quasar/babel-preset-app/node_modules/@babel/runtime/helpers/interopRequireDefault' from 'jest.setup.js'

Following this advice, you can fix it this way:

cd node_modules/@quasar/babel-preset-app && yarn

About

Frontend application used by all personas, which communicates with the backend application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published