Skip to content

Commit

Permalink
[test-only] e2e.Delete creating link to space step (#9025)
Browse files Browse the repository at this point in the history
* e2e. deleted step to creating public link to space

* Empty-Commit

* change ocis_commitID
  • Loading branch information
ScharfViktor authored May 12, 2023
1 parent 6707bbe commit caa4875
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The version of OCIS to use in pipelines that test against OCIS
OCIS_COMMITID=33d9be383249a9e2db2c0c1207797227186d6649
OCIS_COMMITID=c4a64ba69b87da143d01d4c4a566da2aca0ffa8c
OCIS_BRANCH=master
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
/>
</div>
<oc-button
v-oc-tooltip="$gettext('Create link')"
class="oc-ml-s"
size="small"
v-oc-tooltip="$gettext('Create link')"
:aria-label="$gettext('Create link')"
@click="createQuickLink"
>
Expand Down
10 changes: 2 additions & 8 deletions tests/e2e/cucumber/features/smoke/spaces/publicLink.ocis.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Feature: spaces public link
When "Alice" logs in
And "Alice" navigates to the projects space page
And "Alice" navigates to the project space "team.1"
And "Alice" creates a public link for the space using the sidebar panel
And "Alice" renames the most recently created public link of space to "spaceLink"
And "Alice" creates the following resources
| resource | type |
| spaceFolder | folder |
Expand All @@ -32,19 +30,15 @@ Feature: spaces public link
When "Brian" logs in
And "Brian" navigates to the projects space page
And "Brian" navigates to the project space "team.1"
Then public link named "spaceLink" should be visible to "Brian"
But "Brian" should not be able to edit the public link named "spaceLink"
And "Brian" should not be able to edit the public link named "folderLink"
And "Brian" logs out
When "David" logs in
And "David" navigates to the projects space page
And "David" navigates to the project space "team.1"
And "David" edits the public link named "spaceLink" of the space changing role to "editor"
And "David" edits the public link named "folderLink" of resource "spaceFolder" changing role to "editor"
And "David" logs out
When "Carol" logs in
And "Carol" navigates to the projects space page
And "Carol" navigates to the project space "team.1"
And public link named "spaceLink" should be visible to "Carol"
But "Carol" should not be able to edit the public link named "spaceLink"
And public link named "folderLink" of the resource "spaceFolder" should be visible to "Carol"
And "Carol" should not be able to edit the public link named "folderLink"
And "Carol" logs out
2 changes: 1 addition & 1 deletion tests/e2e/cucumber/steps/ui/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ When(
async function (this: World, stepUser: string, linkName: string, role: any): Promise<void> {
const { page } = this.actorsEnvironment.getActor({ key: stepUser })
const linkObject = new objects.applicationFiles.Link({ page })
const newPermission = await linkObject.changeRole({ linkName, role, space: true })
const newPermission = await linkObject.changeRole({ linkName, role })
expect(linkObject.roleDisplayText[role].toLowerCase()).toBe(newPermission.toLowerCase())
}
)
Expand Down
17 changes: 6 additions & 11 deletions tests/e2e/support/objects/app-files/link/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export type changeRoleArgs = {
resource?: string
linkName: string
role: string
space?: boolean
}

export type deleteLinkArgs = {
Expand Down Expand Up @@ -109,19 +108,15 @@ export const waitForPopupNotPresent = async (page): Promise<void> => {
}

export const changeRole = async (args: changeRoleArgs): Promise<string> => {
const { page, resource, linkName, role, space } = args
let shareType = 'space-share'
const { page, resource, linkName, role } = args
let resourceName = null
if (!space) {
const resourcePaths = resource.split('/')
resourceName = resourcePaths.pop()
shareType = 'sharing'
if (resourcePaths.length) {
await clickResource({ page: page, path: resourcePaths.join('/') })
}
const resourcePaths = resource.split('/')
resourceName = resourcePaths.pop()
if (resourcePaths.length) {
await clickResource({ page: page, path: resourcePaths.join('/') })
}
await sidebar.open({ page: page, resource: resourceName })
await sidebar.openPanel({ page: page, name: shareType })
await sidebar.openPanel({ page: page, name: 'sharing' })
await page.locator(util.format(publicLinkEditRoleButton, linkName)).click()
await page.locator(util.format(publicLinkSetRoleButton, role.toLowerCase())).click()
const message = await page.locator(linkUpdateDialog).textContent()
Expand Down

0 comments on commit caa4875

Please sign in to comment.