Skip to content

Commit 2d6013a

Browse files
committed
✨ App implementation and instructions
1 parent 971eb0e commit 2d6013a

File tree

15 files changed

+298
-259
lines changed

15 files changed

+298
-259
lines changed

README.md

Lines changed: 30 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,49 @@
1-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
1+
# QA Automation Coding Challenge
22

3-
## Available Scripts
3+
Thank you for taking the time to complete this challenge!
44

5-
In the project directory, you can run:
5+
This repo consists of a basic working app for which you are requested to setup a simple testing infrastructure, extract the main user flows, and implement tests.
66

7-
### `yarn start`
7+
Please read below for the context and instructions.
88

9-
Runs the app in the development mode.<br />
10-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
9+
## Requirements
1110

12-
The page will reload if you make edits.<br />
13-
You will also see any lint errors in the console.
11+
### Why
1412

15-
### `yarn test`
13+
Adam runs his own web development school, in which he teaches the fundamentals of the web to his students, over the course of several months.
1614

17-
Launches the test runner in the interactive watch mode.<br />
18-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
15+
Adam wishes to maintain an easy overview of the progress of his students. He wants to be able to quickly get a simple list of repos owned by a given student, and see the most basic details of each repo. He also wants to be able to easily navigate to a specific repo, in case he needs to dive deeper.
1916

20-
### `yarn build`
17+
Adam likes Github, but the UI is not built for a minimalistic, non-paginated overview of repos. For this he decides to build his own simple app, leveraging the Github API. He defines the following specifications:
2118

22-
Builds the app for production to the `build` folder.<br />
23-
It correctly bundles React in production mode and optimizes the build for the best performance.
19+
### Acceptance Criteria
2420

25-
The build is minified and the filenames include the hashes.<br />
26-
Your app is ready to be deployed!
21+
1. The UI consists of a header, a search form and a search result section
22+
2. The header displays the title of the app
23+
3. The search form accepts a text input as a search term. Search is activated by clicking the "Go" button, or by pressing the "Enter" key
24+
4. For each repo found, the search result section displays a row with basic info about that repo: name and description. Clicking on the repo name takes the user to the repo's URL. In case of a missing value, `` is displayed
25+
5. The user sees feedback about the result of the search action. Either a success or error message are shown above the search field at the completion of a search action, for a short amount of time. If the error is due to a user not found on Github, a specific error message is displayed. Otherwise, a generic error message is displayed
2726

28-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
27+
## Here is where you come in...
2928

30-
### `yarn eject`
29+
Adam has finished a first version of the app. It meets the requirements and serves him nicely, but is still very basic.
3130

32-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
31+
He would like to enhance the app over time in iterations, adding more features. To do that well, he decides he needs confidence to continuously enhance the app without breaking it or losing one of the fundamental requirements.
3332

34-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
33+
### Instructions
3534

36-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
35+
Help Adam gain confidence in further development by automatically testing the most critical features of the app, by doing the following:
3736

38-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
37+
1. Fork the repository, setup and run the app (see [setup](./setup.md) file for instructions)
38+
2. Using the product description, acceptance criteria and the app itself, compile a list of several testable user flows, cases or scenarios. This doesn't have to cover every possible real-life case, please focus on what you think is most fundamental
39+
3. Based on your assessment of importance and effort, prioritise this list. Imagine this list would be later converted to tickets to be tackled in the next few work iterations of a product development team. Please explain your reasoning briefly. Add this list and your reasoning to the empty [`testable-flows.md`](./testable-flows.md) file
40+
4. Out of these flows, choose two and implement tests for them
41+
5. Add to this `README.md` file (or in a separate file) instructions on how to run these tests
3942

40-
## Learn More
43+
### Things to note
4144

42-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45+
- Use any testing technology you'd like – Cypress, Selenium or any other you think would work well
46+
- Feel free to modify or add whatever you need including addition of other packages, your own libraries, etc
47+
- Please submit a link to your finished repository when you are ready
4348

44-
To learn React, check out the [React documentation](https://reactjs.org/).
45-
46-
### Code Splitting
47-
48-
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
49-
50-
### Analyzing the Bundle Size
51-
52-
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
53-
54-
### Making a Progressive Web App
55-
56-
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
57-
58-
### Advanced Configuration
59-
60-
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
61-
62-
### Deployment
63-
64-
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
65-
66-
### `yarn build` fails to minify
67-
68-
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
49+
## Good luck and happy coding! :)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "spa-automation",
2+
"name": "qa-automation-coding-challenge",
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {

public/favicon.ico

12 KB
Binary file not shown.

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
work correctly both with client-side routing and a non-root public URL.
2525
Learn how to configure a non-root public URL by running `npm run build`.
2626
-->
27-
<title>React App</title>
27+
<title>Get Github Repos</title>
2828
</head>
2929
<body>
3030
<noscript>You need to enable JavaScript to run this app.</noscript>

public/logo192.png

-5.22 KB
Binary file not shown.

public/logo512.png

-9.44 KB
Binary file not shown.

public/manifest.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
{
2-
"short_name": "React App",
3-
"name": "Create React App Sample",
2+
"short_name": "Get Github Repos",
3+
"name": "Get Repos",
44
"icons": [
55
{
66
"src": "favicon.ico",
77
"sizes": "64x64 32x32 24x24 16x16",
88
"type": "image/x-icon"
9-
},
10-
{
11-
"src": "logo192.png",
12-
"type": "image/png",
13-
"sizes": "192x192"
14-
},
15-
{
16-
"src": "logo512.png",
17-
"type": "image/png",
18-
"sizes": "512x512"
199
}
2010
],
2111
"start_url": ".",

setup.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# App Setup
2+
3+
1. Fork and clone the repository.
4+
2. At the root directory of the repo, install dependencies by running `yarn` (if needed, [install yarn first](https://yarnpkg.com/getting-started))
5+
3. Run the app by running `yarn start`
6+
7+
You can add more scripts (or change existing ones) in the [`package.json`](./package.json) file.

src/App.css

Lines changed: 85 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,103 @@
1-
.App {
2-
text-align: center;
1+
.app {
2+
height: 100%;
3+
padding: 2rem 4rem;
4+
overflow: scroll;
35
}
46

5-
.App-logo {
6-
height: 40vmin;
7-
pointer-events: none;
7+
.app header {
8+
text-align: center;
89
}
910

10-
@media (prefers-reduced-motion: no-preference) {
11-
.App-logo {
12-
animation: App-logo-spin infinite 20s linear;
13-
}
11+
.app main {
12+
display: flex;
13+
flex-flow: column nowrap;
14+
align-items: center;
15+
margin-top: 2rem;
1416
}
1517

16-
.App-header {
17-
background-color: #282c34;
18-
min-height: 100vh;
18+
.field-username {
19+
width: 15rem;
1920
display: flex;
20-
flex-direction: column;
21+
flex-flow: column nowrap;
22+
}
23+
24+
.submit {
25+
width: 15rem;
26+
margin-top: 1rem;
27+
}
28+
29+
.input-area,
30+
.output-area {
31+
font-size: 1.8rem;
32+
line-height: 4rem;
33+
}
34+
35+
.output-area {
36+
width: 100%;
37+
margin-top: 4rem;
38+
flex: 1;
39+
justify-content: center;
2140
align-items: center;
41+
display: flex;
42+
}
43+
44+
.message-area {
45+
display: flex;
46+
flex-flow: column nowrap;
2247
justify-content: center;
23-
font-size: calc(10px + 2vmin);
24-
color: white;
48+
font-size: 1.5rem;
49+
line-height: 3rem;
50+
height: 6rem;
51+
}
52+
53+
.message-failure {
54+
color: red;
55+
}
56+
57+
.message-success {
58+
color: green;
59+
}
60+
61+
.repo-row {
62+
display: flex;
63+
justify-content: center;
64+
}
65+
66+
.repo-row > * {
67+
white-space: nowrap;
68+
overflow: hidden;
69+
text-overflow: ellipsis;
70+
width: 35rem;
71+
margin-left: 10rem;
72+
}
73+
74+
.repo-row > *:first-child {
75+
margin-left: 0;
76+
}
77+
78+
.repo-list-container {
79+
width: 100%;
80+
}
81+
82+
.output-status-text,
83+
.repo-amount {
84+
text-align: center;
2585
}
2686

27-
.App-link {
28-
color: #61dafb;
87+
.circle {
88+
height: 8rem;
89+
width: 8rem;
90+
border-radius: 50%;
91+
border-top: 5px solid rgb(66, 168, 236);
92+
animation: animate 1s linear infinite;
93+
filter: blur(1px);
2994
}
3095

31-
@keyframes App-logo-spin {
32-
from {
96+
@keyframes animate {
97+
0% {
3398
transform: rotate(0deg);
3499
}
35-
to {
100+
100% {
36101
transform: rotate(360deg);
37102
}
38103
}

0 commit comments

Comments
 (0)