ca-jobapply-frontend
v4.0.0
Published
SEEK Job Apply Frontend
Downloads
2
Readme
Job Apply Frontend
Installation
$ git clone [email protected]:SEEK-Jobs/ca-jobapply-frontend.git
$ cd ca-jobapply-frontend
$ npm install
You'll also need to ensure you have dev and stub subdomains setup in your /etc/hosts
127.0.0.1 dev.seek.com.au
127.0.0.1 stub.seek.com.au
Update the GraphQL schema
npm run update-schema
Getting Started
# Run the project locally.
$ npm start
Once the dev-server is running, you can view the project in your browser by
visiting http://dev.seek.com.au:5012/job/1/apply
Data Toggles for API Mocks
Using the dev server, you can toggle whether or not API mocks return certain data.
For example, once you've run npm start
and the browser has opened, add ?resumesEnabled
on to the end of the local Job Apply URL.
This will return profile resumes for prefill.
Current Data Toggles
Unauthenticated: ?unauthenticated
Resumes: ?resumesEnabled
No most recent role: ?noRole
No privacy level set: ?noPrivacyLevel
Role requirements: http://dev.seek.com.au:5012/job/4/apply
Staged Apply: http://dev.seek.com.au:5012/job/4/apply?resumesEnabled&features=stagedApply
Logging in locally
- Username:
[email protected]
- Password:
password
Registering locally
- Username:
[email protected]
Building
# Build the application ready for deployment, with output going to ./dist
$ yarn run build
Normally the build step happens on Teamcity, and you will rarely need to run the command shown above. It is handy to do this from time to time, and to familiarise yourself with the layout of the built application, as it can help prevent nasty bugs resulting from incorrect paths and so forth.
Running Cypress tests
# First build the app, the below command will ensure the same data is used during run on the pipeline
$ yarn test:build
# Then run the tests
yarn test:cypress
Running tests
# Run the unit tests
$ yarn run test:unit
# Run the single chrome tests
$ yarn run test:testcafe
Running in docker
Buildkite agent (CI) runs everything in docker.
To run locally using the docker image, use the ./docker-run.sh
script
./docker-run.sh yarn run lint
This uses
- AWS account: CandyConnect-Prod
- Docker image: 564637108174.dkr.ecr.ap-southeast-2.amazonaws.com/ca-jobapply-frontend:latest
To pass environment variables to docker, use a .env
file. Use template .env.local
.
Contribution Guidelines
Please ensure your code pass the repository Guidelines before sending a pull request, other wise your pull request will fail the testing and will not be merged.
- Your code must pass all linting rules.
- Your code must pass all existing unit tests.
- Your code must pass coverage test.
- Your code must pass format/prettier.
Monitoring
Datadog: https://app.datadoghq.com/dashboard/559-92v-hgd/connect-job-apply-frontend-ui