Skip to content

Commit cda9c8f

Browse files
committedDec 18, 2017
Module 5 tasks
1 parent 32c79de commit cda9c8f

File tree

8 files changed

+50
-2
lines changed

8 files changed

+50
-2
lines changed
 

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ To solve the tasks of each module first you should read carefully both the docum
4848
The implementation of the suites and cases is not the main task in this module, but it can be done.
4949
1. In this module the task is to create Element, Elements, Layout and HomePage classes according to what is written in the presentation.
5050
1. In this module the task is to create the functions based on the documentation comments.
51-
1. _TBD_
51+
1. In this module the task it to create a feature file, based on the test cases from [TEST-CASES.md](/module-5/TEST-CASES.md), and to create the pending step definitions.

‎array.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const myArray = [];
2+
3+
myArray[0] = 1;
4+
myArray[1] = "Bunny";
5+
myArray[2] = "EPAM";
6+
7+
console.log(myArray);
8+
console.log(myArray.join('#'));
9+
10+
let multiLineString = '';
11+
12+
multiLineString += 'Something\n';
13+
multiLineString += 'Other\n';
14+
15+
const lines = [];
16+
17+
lines.push('Something');
18+
lines.push('Other');
19+
20+
lines.join('\n');
21+
22+
const numbers = [1, 2, 11, 4, 13];
23+
numbers.sort((a, b) => a - b);
24+
console.log(numbers);
25+
26+
const summary = numbers.reduce((sum, n) => sum + n, 0);
27+
console.log(summary);

‎module-5/.gitkeep

Whitespace-only changes.

‎module-5/TEST-CASES.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Test cases
2+
3+
## Search for a job
4+
5+
| # | Action | Expected |
6+
|--:|:-------|:---------|
7+
| 1 | Open EPAM career page | <ol><li>The page is opened</li><li>The search form is visible</li></ol> |
8+
| 2 | <ol><li>Click on Location filter box</li><li>Select `Country` / `City`</li></ol> | The location filter box should contain `City` |
9+
| 3 | <ol><li>Click on Department filter box</li><li>Select `Department`</li></ol> | The department filter box should contain `Department` tile |
10+
| 4 | Search button is clicked | <ol><li>The `PositionName` position should be visible</li><li>The department of the position should be `Department`</li><li>The location of the position should be `City`, `Country`</li><li>There should be an Apply button for the position</li></ol> |
11+
| 5 | Click on Apply button of the position | <ol><li>The job description should contain `City`</li><li>The job description should contain `PositionName`</li></ol> |
12+
13+
### Test data
14+
15+
| # | Country | City | Department | PositionName |
16+
|--:|:--------|:-----|:------------|:-------------|
17+
| 1 | Hungary | Debrecen | Software Test Engineering | Test Automation Engineer |
18+
| 2 | Belarus | Minsk | Software Architecture | Test Automation Architect |

‎module-5/features/EPAM.feature

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Feature: EPAM site

‎module-5/step_definitions/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
'use strict';

‎module-5/test/.gitkeep

Whitespace-only changes.

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"test:module-2": "mocha module-2/test/*.spec.js",
99
"test:module-3": "mocha module-3/test/*.spec.js",
1010
"test:module-4": "mocha module-4/test/*.spec.js",
11-
"test:module-5": "mocha module-5/test/*.spec.js"
11+
"test:module-5": "cucumberjs module-5/features --require module-5/step_definitions --format pretty --tags ~@wip"
1212
},
1313
"repository": {
1414
"type": "git",
@@ -22,6 +22,7 @@
2222
"homepage": "https://github.com/szikszail/js-webinar#readme",
2323
"dependencies": {
2424
"chai": "^4.1.2",
25+
"cucumber": "^1.3.3",
2526
"jasmine": "^2.8.0",
2627
"mocha": "^4.0.1"
2728
}

0 commit comments

Comments
 (0)
Please sign in to comment.