Skip to content

Commit 5d3775e

Browse files
Sergiu-Bgrgur
authored andcommitted
Implemented new tests. Updated existing tests. (#143)
1 parent 02597e9 commit 5d3775e

File tree

11 files changed

+216
-72
lines changed

11 files changed

+216
-72
lines changed

tests_root/wdio/configs/wdio.conf.js

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ exports.config = {
1515
'./features/**/*.feature'
1616
],
1717
// Patterns to exclude.
18-
exclude: [
19-
'./features/check_account.feature',
20-
'./features/test.feature'
21-
],
18+
exclude: [],
2219
//
2320
// ============
2421
// Capabilities
@@ -123,18 +120,19 @@ exports.config = {
123120
// If you are using Cucumber you need to specify the location of your step definitions.
124121
cucumberOpts: {
125122
require: ['./step-definitions/*.js'], // <string[]> (file/dir) require files before executing features
126-
backtrace: false, // <boolean> show full backtrace for errors
127-
compiler: [], // <string[]> ("extension:module") require files with the given EXTENSION after requiring MODULE (repeatable)
128-
dryRun: false, // <boolean> invoke formatters without executing steps
129-
failFast: false, // <boolean> abort the run on first failure
130-
format: ['pretty'], // <string[]> (type[:path]) specify the output format, optionally supply PATH to redirect formatter output (repeatable)
131-
colors: true, // <boolean> disable colors in formatter output
132-
snippets: true, // <boolean> hide step definition snippets for pending steps
133-
source: true, // <boolean> hide source uris
134-
profile: [], // <string[]> (name) specify the profile to use
135-
strict: false, // <boolean> fail if there are any undefined or pending steps
136-
tags: [], // <string[]> (expression) only execute the features or scenarios with tags matching the expression
137-
timeout: 20000, // <number> timeout for step definitions
123+
backtrace: false, // <boolean> show full backtrace for errors
124+
compiler: [], // <string[]> ("extension:module") require files with the given EXTENSION after requiring MODULE (repeatable)
125+
dryRun: false, // <boolean> invoke formatters without executing steps
126+
failFast: false, // <boolean> abort the run on first failure
127+
format: ['pretty'], // <string[]> (type[:path]) specify the output format, optionally supply PATH to redirect formatter output (repeatable)
128+
colors: true, // <boolean> disable colors in formatter output
129+
snippets: true, // <boolean> hide step definition snippets for pending steps
130+
source: true, // <boolean> hide source uris
131+
profile: [], // <string[]> (name) specify the profile to use
132+
strict: false, // <boolean> fail if there are any undefined or pending steps
133+
tags: [], // <string[]> (expression) only execute the features or scenarios with tags matching the expression
134+
tagExpression: '@automated', // <string> Only execute the features or scenarios with tags matching the expression.
135+
timeout: 20000, // <number> timeout for step definitions
138136
ignoreUndefinedDefinitions: false, // <boolean> Enable this config to treat undefined definitions as warnings.
139137
},
140138

tests_root/wdio/features/check_account.feature

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,55 @@
1-
@Home_Screen
2-
Feature: Home Screen of Beep Web App
3-
As a User
4-
I want to be taken through appropriate screen
5-
so that I can Test Account and Password
6-
7-
@S1 @manual
8-
Scenario: Verification of fields on screen
9-
Given User is on Web App Home screen
10-
When User opens https://beep.modus.app/#/
11-
Then User should see "Account field"
12-
Then User should see "Password field"
13-
Then User should see "How does it work"
1+
@Account_Screen
2+
Feature: Account screen of Beep web app
3+
As a user of Beep web app
4+
I want to be able to provide my username on the Account page
5+
So that I know if my account data has been compromised
6+
7+
@S1 @automated
8+
Scenario: The user can navigate to the Account page
9+
Given The user loads the Beep web app homepage
10+
When The user selects the Account button
11+
Then The user should be on the Account page
12+
Then The user should see the Your username or email text field
13+
Then The user should see the Check button
1414

1515
@S2 @manual
16-
Scenario: Verification of Validations on "Account field"
17-
Given User is on Home screen of Web App
18-
When User clicks on "Account field"
19-
Then User should be on https://beep.modus.app/#/acc Page
20-
Then User should see "Your username or email" text box
21-
Then User should see "Check" option
22-
23-
@S3 @manual
2416
Scenario: Functionality of "Your username or email" text box
2517
Given User is on https://beep.modus.app/#/acc Page
2618
When User taps inside "Your username or email" text box
2719
Then User should see a cursor
2820
Then User should be able to type
2921

30-
@S4 @manual
22+
@S3 @manual
3123
Scenario: Acceptance of data by"Your username or email" text box
3224
Given User is on https://beep.modus.app/acc Page
3325
When User taps inside "Your username or email" text box
3426
Then User should be able to add User name
3527
Then User should be able to add Email ID
3628

37-
@S5.1 @manual
29+
@S4.1 @manual
3830
Scenario: Activation of "Check" option
3931
Given User is on "https://beep.modus.app"
4032
Given User clicks on "Account field"
4133
When User should see "check" option
4234
Then User should be on https://beep.modus.app/acc Page
4335
Then User should see deactivated "Check" option
4436

45-
@S5.2 @Manual
37+
@S4.2 @Manual
4638
Scenario: Activation of "Check" option
4739
Given User is on https://beep.modus.app/#/acc Page
4840
When User taps inside "Your username or email" text box
4941
When User doesn't type anything in "Your username or email" text box
5042
Then User should see deactivated "Check" option
5143

52-
@S5.3 @Manual
44+
@S4.3 @Manual
5345
Scenario: Activation of "Check" option
5446
Given User is on https://beep.modus.app/#/acc Page
5547
When User taps inside "Your username or email" text box
5648
When User adds spaces in "Your username or email" text box
5749
Then User should see deactivated "Check" option
5850

5951

60-
@S5.4 @Manual
52+
@S4.4 @Manual
6153
Scenario: Action when click on deactivated "Check" option
6254
Given User is on https://beep.modus.app/#/acc Page
6355
When User taps inside "Your username or email" text box
@@ -67,7 +59,7 @@ Feature: Home Screen of Beep Web App
6759
Then User should "Check" option deactivated only
6860
Then User should see no validation and change for "Your username or email" text box
6961

70-
@S5.5 @Manual
62+
@S4.5 @Manual
7163
Scenario: Action when click on deactivated "Check" option
7264
Given User is on https://beep.modus.app/#/acc Page
7365
When User taps inside "Your username or email" text box
@@ -76,7 +68,7 @@ Feature: Home Screen of Beep Web App
7668
Then User should "Check" option deactivated only
7769
Then User should see no validation and change for "Your username or email" text box
7870

79-
@S6.1 @manual
71+
@S5.1 @manual
8072
Scenario: Verification of a non hacked Email ID
8173
Given User is on https://beep.modus.app/#/acc Page
8274
When User taps inside "Your username or email" text box
@@ -85,7 +77,7 @@ Feature: Home Screen of Beep Web App
8577
Then User should redirects to "https://beep.modus.app/#/safe" Page
8678
Then User should see "Congratulations! Your account has not been compromised" message
8779

88-
@S6.2 @manual
80+
@S5.2 @manual
8981
Scenario: Verification of a non hacked Username
9082
Given User is on https://beep.modus.app/#/acc Page
9183
When User taps inside "Your username or email" text box
@@ -94,7 +86,7 @@ Feature: Home Screen of Beep Web App
9486
Then User should redirects to "https://beep.modus.app/#/safe" Page
9587
Then User should see "Congratulations! Your account has not been compromised" message
9688

97-
@S6.3 @manual
89+
@S5.3 @manual
9890
Scenario: Verification of a hacked Email ID
9991
Given User is on https://beep.modus.app/#/acc Page
10092
When User taps inside "Your username or email" text box
@@ -103,7 +95,7 @@ Feature: Home Screen of Beep Web App
10395
Then User should redirects to "https://beep.modus.app/#/breaches" Page
10496
Then User should display of websites from where it had been hacked
10597

106-
@S6.4 @manual
98+
@S5.4 @manual
10799
Scenario: Verification of a hacked Username
108100
Given User is on https://beep.modus.app/#/acc Page
109101
When User taps inside "Your username or email" text box
@@ -112,14 +104,14 @@ Feature: Home Screen of Beep Web App
112104
Then User should redirects to "https://beep.modus.app/#/breaches" Page
113105
Then User should display of websites from where it had been hacked
114106

115-
@S6.5 @manual
107+
@S5.5 @manual
116108
Scenario: Verification of a invalid Email ID or Username
117109
Given User is on https://beep.modus.app/#/acc Page
118110
When User taps inside "Your username or email" text box
119111
When User enters a invalid Username or Email ID
120112
Then User should see a validation message
121113

122-
@S7 @manual
114+
@S6 @manual
123115
Scenario: Verification on "back" button from Acc. Page
124116
Given User is on "https://beep.modus.app" Page
125117
When User click on left back button
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@Password_Screen
2+
Feature: Password screen of Beep web app
3+
As a user of Beep web app
4+
I want to be able to provide my password on the Password page
5+
So that I know if my account data has been compromised
6+
7+
@S1 @automated
8+
Scenario: The user can navigate to the Password page
9+
Given The user loads the Beep web app homepage
10+
When The user selects the Password button
11+
Then The user should be on the Password page
12+
Then The user should see the Your password text field
13+
Then The user should see the Check button

tests_root/wdio/features/home.feature

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ Feature: Home Screen of Beep Web App
55
So that I can check if my account name or password have been compromised
66

77
@S1 @automated
8-
Scenario: Verification on fields on screen
8+
Scenario: The user can load the Beep homepage
99
Given The user loads the Beep web app homepage
1010
Then The user should see the Account button
1111
Then The user should see the Password button
1212
Then The user should see the How does it work link
13+
Then The user should see the App Store link
14+
Then The user should see the Google Play link

tests_root/wdio/features/test.feature

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*global browser*/
2+
const locators = {
3+
path: '/acc',
4+
5+
usernameTextField: "//input[contains(@placeholder,'Username')]"
6+
};
7+
8+
function getPath() {
9+
return locators.path;
10+
}
11+
12+
function usernameTextField() {
13+
return browser.element(locators.usernameTextField);
14+
}
15+
16+
export { getPath, usernameTextField }
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*global browser*/
2+
const locators = {
3+
checkButton: "//ion-button[span[text()='Check']]"
4+
};
5+
6+
function checkButton() {
7+
return browser.element(locators.checkButton);
8+
}
9+
10+
export default checkButton;

tests_root/wdio/page-objects/home.page.js

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*global browser*/
22
const locators = {
33
accountButton: "//div[text()='Account']",
4+
appStoreLink: "//a[contains(@href,'/beepios')]",
5+
googlePlayLink: "//a[contains(@href,'/beepandroid')]",
46
howDoesItWorkLink: "//span[text()='How does it work?']",
57
logo: "//img[contains(@src,'Beep-Logo')]",
68
path: '/',
@@ -15,6 +17,14 @@ function accountButton() {
1517
return browser.element(locators.accountButton)
1618
}
1719

20+
function appStoreLink() {
21+
return browser.element(locators.appStoreLink);
22+
}
23+
24+
function googlePlayLink() {
25+
return browser.element(locators.googlePlayLink);
26+
}
27+
1828
function howDoesItWorkLink() {
1929
return browser.element(locators.howDoesItWorkLink)
2030
}
@@ -27,13 +37,22 @@ function passwordButton() {
2737
return browser.element(locators.passwordButton)
2838
}
2939

30-
// These will be needed for the future tests.
31-
// function clickAccountButton() {
32-
// accountButton().click()
33-
// }
40+
function clickAccountButton() {
41+
accountButton().click()
42+
}
3443

35-
// function clickPasswordButton() {
36-
// passwordButton().click()
37-
// }
44+
function clickPasswordButton() {
45+
passwordButton().click()
46+
}
3847

39-
export { accountButton, getPath, howDoesItWorkLink, logo, passwordButton }
48+
export {
49+
accountButton,
50+
appStoreLink,
51+
clickAccountButton,
52+
clickPasswordButton,
53+
getPath,
54+
googlePlayLink,
55+
howDoesItWorkLink,
56+
logo,
57+
passwordButton
58+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*global browser*/
2+
const locators = {
3+
path: '/pwd',
4+
5+
passwordTextField: "//input[@type='password']"
6+
};
7+
8+
function getPath() {
9+
return locators.path;
10+
}
11+
12+
function passwordTextField() {
13+
return browser.element(locators.passwordTextField);
14+
}
15+
16+
export { getPath, passwordTextField }

0 commit comments

Comments
 (0)