Skip to content

Commit 05eec2a

Browse files
committed
commit
0 parents commit 05eec2a

31 files changed

+60358
-0
lines changed

slideshow/.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
junit.xml
9+
10+
# production
11+
/build
12+
13+
# distribution
14+
/dist
15+
16+
# misc
17+
.DS_Store
18+
.env.local
19+
.env.development.local
20+
.env.test.local
21+
.env.production.local
22+
/assets
23+
*.swo
24+
*.swp
25+
.watchman*
26+
27+
npm-debug.log*
28+
yarn-debug.log*
29+
yarn-error.log*
30+
31+
.idea
32+
.env

slideshow/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# React: Slideshow App
2+
3+
## Environment
4+
5+
- React Version: 16.13.1
6+
- Default Port: 8000
7+
8+
## Project Specifications
9+
10+
Create a basic slideshow application, as shown below. Application requirements are given below, and the finished application must pass all of the unit tests.
11+
12+
![Gif](https://hrcdn.net/s3_pub/istreet-assets/j3Q6jXZ3DOOPRlCs9hFcnQ/slideshow.gif)
13+
14+
Your task is to complete the implementation of `src/components/Slides.js` according to the following requirements:
15+
16+
- The Slides component takes an array of slides as a prop. Each element of this array denotes a single slide and is an object with 2 properties: string title and string text.
17+
- On application launch, the first slide must be rendered.
18+
- Clicking on the "Next" button shows the next slide. This button is disabled when the current slide is the last one.
19+
- Clicking on the "Prev" button shows the previous slide. This button is disabled when the current slide is the first one.
20+
- Clicking on the "Restart" button returns to the first slide. This button is disabled when the current slide is the first one.
21+
- You can assume that the passed slides array contains at least one slide.
22+
23+
24+
Initially, the file is filled with boilerplate code. Note the following:
25+
26+
- The "Restart" button must have `data-testid="button-restart"`.
27+
- The "Prev" button must have `data-testid="button-prev"`.
28+
- The "Next" button must have `data-testid="button-next"`.
29+
- Each slide's title must be rendered as an `<h1>` element with `data-testid="title"`.
30+
- Each slide's text must be rendered as a `<p>` element with `data-testid="text"`.
31+
32+
Please note that the component has the above data-testid attributes for test cases and certain classes and ids for rendering purposes. It is advised not to change them.
33+
34+
**Read-Only Files**
35+
- `src/App.test.js`
36+
37+
**Commands**
38+
- run:
39+
```bash
40+
npm start
41+
```
42+
- install:
43+
```bash
44+
npm install
45+
```
46+
- test:
47+
```bash
48+
npm test
49+
```

0 commit comments

Comments
 (0)