Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[full-ci] [tests-only] Fixed failure in lock test #10886

Merged
merged 3 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/e2e/cucumber/features/app-provider/lock.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Feature: lock

# checking that user cannot delete or change share of the locked file
# https://github.com/owncloud/web/issues/10507
And "Alice" should not be able to manage share with user "Brian"
And "Alice" should not be able to manage share for file "test.odt" with user "Brian"

# checking that sharing and creating link of the locked file is possible
And "Alice" creates a public link of following resource using the sidebar panel
Expand All @@ -48,7 +48,7 @@ Feature: lock
When "Brian" closes the file viewer
Then "Alice" should get "file-unlocked" SSE event
And for "Alice" file "test.odt" should not be locked
And "Alice" should be able to manage share with user "Brian"
And "Alice" should be able to manage share for file "test.odt" with user "Brian"

And "Brian" logs out
And "Alice" logs out
5 changes: 4 additions & 1 deletion tests/e2e/cucumber/steps/ui/shares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,12 @@ Then(
)

Then(
/^"([^"]*)" (should|should not) be able to manage share with user "([^"]*)"$/,
/^"([^"]*)" (should|should not) be able to manage share for file "([^"]*)" with user "([^"]*)"$/,
async function (
this: World,
stepUser: any,
actionType: string,
resource: string,
recipient: string
): Promise<void> {
const { page } = this.actorsEnvironment.getActor({ key: stepUser })
Expand All @@ -339,6 +340,8 @@ Then(
this.usersEnvironment.getUser({ key: recipient })
)

await shareObject.openSharingPanel(resource)

if (actionType === 'should') {
await expect(changeRole).not.toBeDisabled()
await expect(changeShare).not.toBeDisabled()
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e/support/objects/app-files/share/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,8 @@ export class Share {
changeShareLocator(recipient: User): Locator {
return po.changeRoleLocator({ page: this.#page, recipient })
}

async openSharingPanel(resource): Promise<void> {
await po.openSharingPanel(this.#page, resource)
}
}