summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/app-files.feature
blob: 37e01bcada2ef54101633fe11da47293f2525479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Feature: app-files

  Scenario: viewing a favorite file in its folder closes the details view
    Given I am logged in
    And I mark "welcome.txt" as favorite
    And I see that "welcome.txt" is marked as favorite
    And I open the "Favorites" section
    And I open the details view for "welcome.txt"
    And I see that the details view for "Favorites" section is open
    When I view "welcome.txt" in folder
    Then I see that the current section is "All files"
    And I see that the details view is closed

  Scenario: viewing a favorite file in its folder does not prevent opening the details view in "All files" section
    Given I am logged in
    And I mark "welcome.txt" as favorite
    And I see that "welcome.txt" is marked as favorite
    And I open the "Favorites" section
    And I open the details view for "welcome.txt"
    And I see that the details view for "Favorites" section is open
    And I view "welcome.txt" in folder
    And I see that the current section is "All files"
    When I open the details view for "welcome.txt"
    Then I see that the details view for "All files" section is open

  Scenario: set a password to a shared link
    Given I am logged in
    And I share the link for "welcome.txt"
    When I protect the shared link with the password "abcdef"
    Then I see that the working icon for password protect is shown
    And I see that the working icon for password protect is eventually not shown

  Scenario: access a shared link protected by password with a valid password
    Given I act as John
    And I am logged in
    And I share the link for "welcome.txt" protected by the password "abcdef"
    And I write down the shared link
    When I act as Jane
    And I visit the shared link I wrote down
    And I see that the current page is the Authenticate page for the shared link I wrote down
    And I authenticate with password "abcdef"
    Then I see that the current page is the shared link I wrote down
    And I see that the shared file preview shows the text "Welcome to your Nextcloud account!"

  Scenario: access a shared link protected by password with an invalid password
    Given I act as John
    And I am logged in
    And I share the link for "welcome.txt" protected by the password "abcdef"
    And I write down the shared link
    When I act as Jane
    And I visit the shared link I wrote down
    And I authenticate with password "fedcba"
    Then I see that the current page is the Authenticate page for the shared link I wrote down
    And I see that a wrong password for the shared file message is shown

  Scenario: show the input field for tags in the details view
    Given I am logged in
    And I open the details view for "welcome.txt"
    And I see that the details view for "All files" section is open
    When I open the input field for tags in the details view
    Then I see that the input field for tags in the details view is shown

  Scenario: show the input field for tags in the details view after the sharing tab has loaded
    Given I am logged in
    And I open the details view for "welcome.txt"
    And I see that the details view for "All files" section is open
    And I open the "Sharing" tab in the details view
    And I see that the "Sharing" tab in the details view is eventually loaded
    When I open the input field for tags in the details view
    Then I see that the input field for tags in the details view is shown

  Scenario: create tags using the Administration settings
    Given I am logged in as the admin
    And I visit the settings page
    And I open the "Workflow" section
    # The "create" button does nothing before JavaScript was initialized, and
    # the only way to detect that is waiting for the button to select tags to be
    # shown.
    And I see that the button to select tags is shown
    When I create the tag "tag1" in the settings
    Then I see that the dropdown for tags in the settings eventually contains the tag "tag1"

  Scenario: add tags using the dropdown in the details view
    Given I am logged in as the admin
    And I visit the settings page
    And I open the "Workflow" section
    # The "create" button does nothing before JavaScript was initialized, and
    # the only way to detect that is waiting for the button to select tags to be
    # shown.
    And I see that the button to select tags is shown
    And I create the tag "tag1" in the settings
    And I create the tag "tag2" in the settings
    And I create the tag "tag3" in the settings
    And I create the tag "tag4" in the settings
    And I see that the dropdown for tags in the settings eventually contains the tag "tag1"
    And I see that the dropdown for tags in the settings eventually contains the tag "tag2"
    And I see that the dropdown for tags in the settings eventually contains the tag "tag3"
    And I see that the dropdown for tags in the settings eventually contains the tag "tag4"
    And I log out
    And I am logged in
    And I open the details view for "welcome.txt"
    And I open the input field for tags in the details view
    # When the input field is opened the dropdown is also opened automatically.
    When I check the tag "tag2" in the dropdown for tags in the details view
    And I check the tag "tag4" in the dropdown for tags in the details view
    Then I see that the tag "tag2" in the dropdown for tags in the details view is checked
    And I see that the tag "tag4" in the dropdown for tags in the details view is checked
    And I see that the input field for tags in the details view contains the tag "tag2"
    And I see that the input field for tags in the details view contains the tag "tag4"

  Scenario: remove tags using the dropdown in the details view
    Given I am logged in as the admin
    And I visit the settings page
    And I open the "Workflow" section
    # The "create" button does nothing before JavaScript was initialized, and
    # the only way to detect that is waiting for the button to select tags to be
    # shown.
    And I see that the button to select tags is shown
    And I create the tag "tag1" in the settings
    And I create the tag "tag2" in the settings
    And I create the tag "tag3" in the settings
    And I create the tag "tag4" in the settings
    And I see that the dropdown for tags in the settings eventually contains the tag "tag1"
    And I see that the dropdown for tags in the settings eventually contains the tag "tag2"
    And I see that the dropdown for tags in the settings eventually contains the tag "tag3"
    And I see that the dropdown for tags in the settings eventually contains the tag "tag4"
    And I log out
    And I am logged in
    And I open the details view for "welcome.txt"
    And I open the input field for tags in the details view
    # When the input field is opened the dropdown is also opened automatically.
    And I check the tag "tag2" in the dropdown for tags in the details view
    And I check the tag "tag4" in the dropdown for tags in the details view
    And I check the tag "tag3" in the dropdown for tags in the details view
    When I uncheck the tag "tag2" in the dropdown for tags in the details view
    And I uncheck the tag "tag4" in the dropdown for tags in the details view
    Then I see that the tag "tag2" in the dropdown for tags in the details view is not checked
    And I see that the tag "tag4" in the dropdown for tags in the details view is not checked
    And I see that the tag "tag3" in the dropdown for tags in the details view is checked
    And I see that the input field for tags in the details view does not contain the tag "tag2"
    And I see that the input field for tags in the details view does not contain the tag "tag4"
    And I see that the input field for tags in the details view contains the tag "tag3"

  Scenario: marking a file as favorite causes the file list to be sorted again
    Given I am logged in
    And I create a new folder named "A name alphabetically lower than welcome.txt"
    And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list
    When I mark "welcome.txt" as favorite
    Then I see that "welcome.txt" is marked as favorite
    And I see that "welcome.txt" precedes "A name alphabetically lower than welcome.txt" in the file list

  Scenario: unmarking a file as favorite causes the file list to be sorted again
    Given I am logged in
    And I create a new folder named "A name alphabetically lower than welcome.txt"
    And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list
    And I mark "welcome.txt" as favorite
    And I see that "welcome.txt" is marked as favorite
    And I see that "welcome.txt" precedes "A name alphabetically lower than welcome.txt" in the file list
    When I unmark "welcome.txt" as favorite
    Then I see that "welcome.txt" is not marked as favorite
    And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list