Skip to content

Commit

Permalink
Fix acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann authored and pascalwengerter committed Mar 22, 2022
1 parent 960c3b1 commit f61af48
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ Feature: Create public link shares
And the user browses to the shared-via-link page using the webUI
Then file with path "lorem.txt" should be listed on the webUI
And file with path "simple-folder/lorem.txt" should be listed on the webUI
When the user browses to the shared-with-others page using the webUI
Then file with path "lorem.txt" should be listed on the webUI
And file with path "simple-folder/lorem.txt" should be listed on the webUI





Scenario: user creates a multiple public link of a file and delete the first link
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@mailhog @public_link_share-feature-required
Feature: Public link share management
As a user
I want to check different opitions available in public shares
I want to check different options available in public shares
So that I can manage and organize the shares

Background:
Expand All @@ -12,8 +12,8 @@ Feature: Public link share management
Scenario: public link share shows up on shared-with-others page
Given user "Alice" has logged in using the webUI
And user "Alice" has shared folder "simple-folder" with link with "read" permissions in the server
When the user browses to the shared-with-others page using the webUI
Then the resource "simple-folder" should have the token of last link in the people column on the webUI
When the user browses to the shared-via-link page using the webUI
Then folder with path "lorem.txt" should be listed on the webUI


Scenario: opening public-link page of the files-drop link protected with password should redirect to files-drop page
Expand Down Expand Up @@ -46,7 +46,7 @@ Feature: Public link share management
And as "Brian" the content of "simple-folder/lorem.txt" in the server should be the same as the content of local file "lorem.txt"

@issue-ocis-1328
Scenario: user shares a file through public link and then it appears in a shared-with-others page
Scenario: user shares a file through public link and then it appears in a shared-via-link page
Given the setting "shareapi_allow_public_notification" of app "core" has been set to "yes" in the server
And user "Alice" has created a public link with following settings in the server
| path | simple-folder |
Expand All @@ -57,7 +57,7 @@ Feature: Public link share management
| name | link-viewer |
| permissions | read |
And user "Alice" has logged in using the webUI
When the user browses to the shared-with-others page
When the user browses to the shared-via-link page using the webUI
Then folder "simple-folder" should be listed on the webUI
And the following resources should have the following collaborators
| fileName | expectedCollaborators |
Expand Down Expand Up @@ -140,13 +140,13 @@ Feature: Public link share management
| name | Public Link Sub |
And user "Alice" has favorited element "simple-folder/simple-empty-folder" in the server
And user "Alice" has logged in using the webUI
When the user browses to the shared-with-others page
And the user opens the share dialog for folder "simple-folder/simple-empty-folder" using the webUI
When the user browses to the shared-via-link page using the webUI
Then a link named "Public Link" should be listed with role "Viewer" in the public link list of resource "simple-empty-folder" via "simple-folder" on the webUI
And a link named "Public Link Sub" should be listed with role "Viewer" in the public link list of resource "simple-empty-folder" on the webUI
When the user browses to the favorites page using the webUI
Then a link named "Public Link" should be listed with role "Viewer" in the public link list of resource "simple-folder/simple-empty-folder" via "simple-folder" on the webUI


@issue-ocis-reva-243
Scenario: token is shown for links without a name
When user "Alice" has created a public link with following settings in the server
Expand Down
3 changes: 1 addition & 2 deletions tests/acceptance/pageObjects/sharedWithOthersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ module.exports = {
},
elements: {
collaboratorsInFileRow: {
selector:
'//span[contains(@class, "resource-table-people")]/span[contains(@class, "oc-avatars")]/span[contains(@class, "oc-avatar")]',
selector: '//*[contains(@class, "oc-avatars")]/span[contains(@class, "oc-avatar")]',
locateStrategy: 'xpath'
}
}
Expand Down
12 changes: 0 additions & 12 deletions tests/acceptance/stepDefinitions/filesContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -1385,18 +1385,6 @@ Then(
}
)

Then(
'the resource {string} should have the token of last link in the people column on the webUI',
async (resource) => {
const lastLink = await sharingHelper.fetchLastPublicLinkShare(client.globals.currentUser)
const collaboratorsArray = await client.page
.sharedWithOthersPage()
.getCollaboratorsForResource(resource)

assert.ok(collaboratorsArray.indexOf(lastLink.token) > -1)
}
)

When('the user closes rename dialog', function () {
return client.page.FilesPageElement.filesList().closeRenameDialog()
})
Expand Down

0 comments on commit f61af48

Please sign in to comment.