1
+ Feature : PrintScreen
2
+ In order to have a helpful password safe when I have no clipboard
3
+ As a user
4
+ I want to disply passwords from my password safe
5
+
6
+ Scenario : Get the password for "github" (which exists) and print it to the screen
7
+ Given A safe exists with master password "my_master_password" and a key "github" with password "github_password"
8
+ When I run `pws ps github 0` interactively
9
+ And I type "my_master_password"
10
+ Then the output should contain "Master password:"
11
+ And the output should contain "The password for github is:\n github_password"
12
+
13
+
14
+ Scenario : Get the password for "github" (which exists) and print it to the screen for 10 seconds
15
+ Given A safe exists with master password "my_master_password" and a key "github" with password "github_password"
16
+ When I run `pws ps github` interactively
17
+ And I type "my_master_password"
18
+ Then the output should contain "Master password:"
19
+ And the output should contain "The password for github will be displayed for 10 seconds:\n github"
20
+
21
+ Scenario : Get the password for "github" (which exists) and print it to the screen for 1 second
22
+ Given A safe exists with master password "my_master_password" and a key "github" with password "github_password"
23
+ When I run `pws ps github 1` interactively
24
+ And I type "my_master_password"
25
+ Then the output should contain "Master password:"
26
+ And the output should contain "The password for github will be displayed for 1 second:\n github"
27
+
28
+
29
+ Scenario : Get the password for "github" (which exists) and print it to the screen for 5 seconds when PWS_SECONDS is set to 5
30
+ Given A safe exists with master password "my_master_password" and a key "github" with password "github_password"
31
+ When I set env variable "PWS_SECONDS" to "5"
32
+ And I run `pws ps github` interactively
33
+ And I type "my_master_password"
34
+ Then the output should contain "Master password:"
35
+ And the output should contain "The password for github will be displayed for 5 seconds:\n github"
36
+
37
+ Scenario : Try to get the password for "google" (which does not exist)
38
+ Given A safe exists with master password "my_master_password" and a key "github" with password "github_password"
39
+ When I run `pws ps google` interactively
40
+ And I type "my_master_password"
41
+ Then the output should contain "Master password:"
42
+ And the output should contain "No password found for google!"
43
+
44
+ Scenario : Try to get the password for "github" (but the master password is wrong)
45
+ Given A safe exists with master password "my_master_password" and a key "github" with password "github_password"
46
+ When I run `pws ps github` interactively
47
+ And I type "my_master_password_wrong"
48
+ Then the output should contain "Master password:"
49
+ And the output should contain "NO ACCESS"
50
+
51
+ Scenario : Get the password for "gihub" using an abbrev shortcut
52
+ Given A safe exists with master password "my_master_password" and keys
53
+ | github | 123 |
54
+ | google | 345 |
55
+ | gitorious | 678 |
56
+ When I run `pws ps gith 0` interactively
57
+ And I type "my_master_password"
58
+ Then the output should contain "Master password:"
59
+ And the output should contain "The password for github is:\n 123"
60
+
61
+
62
+
0 commit comments