Skip to content

Commit

Permalink
update readme & add front test
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
lighta971 committed Mar 10, 2021
1 parent d82f7a9 commit a5ca81d
Show file tree
Hide file tree
Showing 6 changed files with 3,863 additions and 1,319 deletions.
35 changes: 35 additions & 0 deletions .babelrc
@@ -0,0 +1,35 @@
{
"env": {
"test": {
"presets": [
["env", {
"targets": {
"node": "current"
}
}]
]
},
"development": {
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": "> 2%",
"uglify": true
}
}]
]
},
"production": {
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": "> 2%",
"uglify": true
}
}]
]
}
}
}
12 changes: 12 additions & 0 deletions jest.config.js
@@ -0,0 +1,12 @@
// jest.config.js
module.exports = {
// testRegex: 'resources/js/tests/.*.spec.js$',
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/resources/js/$1"
},
moduleFileExtensions: ['js', 'json', 'vue'],
transform: {
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
},
}
6 changes: 5 additions & 1 deletion package.json
@@ -1,6 +1,7 @@
{
"private": true,
"scripts": {
"test:unit": "cross-env NODE_ENV=test jest",
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
Expand All @@ -10,13 +11,16 @@
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"@vue/test-utils": "^1.1.3",
"axios": "^0.18.0",
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"jest": "^26.6.3",
"jquery": "^3.2",
"laravel-mix": "^2.0",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"vue": "^2.5.17"
"vue": "^2.5.17",
"vue-jest": "^3.0.7"
}
}
28 changes: 25 additions & 3 deletions readme.md
@@ -1,3 +1,4 @@

<p align="center"><img src="https://www.medoucine.com/images/logos/logo.svg" width="350"></p>

## Fullstack developper test
Expand All @@ -8,7 +9,7 @@ Great that you're interested in this exercise! Thanks a lot for making it. The e

![Image](https://github.com/medoucine/fullstack-recruitment-test/blob/master/result.gif)

What you'll have to do:
### What you'll have to do:
- Allow user to search therapists by city and practice with the form
- Allow user to search therapists by clicking on links
- Cities, practices and search links have to be generated from therapists list (./database/db.json)
Expand All @@ -17,8 +18,30 @@ What you'll have to do:
- Make all user interaction with VueJS (./resource/js/component/MainComponent.vue)
- Make a quick API with Laravel 5.7 (which will serve cities, practices, ..)

#### Technical expectations
**Front- JS**

At least 1 component must be tested, with at least 2 unit tests.

You'll have to explain:
- your decisions regarding HTML/CSS
- your decisions regarding component structure

**Back - PHP**

You'll have to explain:
- your PHP architecture, How did you manage service responsability ?

You'll have to unit test codes responsible for getting the search results, according to specs

**Ops - Bash (Bonus)**

Write a deployment bash script (install, test, build, serve)
It should fail if one or more commands fails.



To complete this test you need to fork this repo. When you're done you can push your changes to your own repo (and let us know where to find it ofcourse).
To complete this test you need to download (NOT fork) this repo. When you're done you can push your changes to your own repo (and let us know where to find it of course).

## Prerequisites
- PHP7.x
Expand All @@ -37,7 +60,6 @@ To complete this test you need to fork this repo. When you're done you can push
- Run a server with `php artisan serve`
- Run auto compilation with `npm run watch` or `npm run watch-poll` (see packages.json for full list of commands)
- Use the json file as database located in `./database/db.json` which represent list of therapists
- tips: you'll have to edit `routes/web.php`, `app/Http/Controller.php` and files located in `resources/`

## Finish

Expand Down
10 changes: 10 additions & 0 deletions resources/js/components/MainComponent.test.js
@@ -0,0 +1,10 @@
import Component from './MainComponent.vue'
import { shallowMount } from '@vue/test-utils'

describe('Component', () => {
it('Dummy', () => {
const wrapper = shallowMount(Component)

expect(wrapper).toBeTruthy()
})
})

0 comments on commit a5ca81d

Please sign in to comment.