From caa4875a6cb7d593a010f8ff1eeee94386c756c8 Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Fri, 12 May 2023 12:33:36 +0200 Subject: [PATCH] [test-only] e2e.Delete creating link to space step (#9025) * e2e. deleted step to creating public link to space * Empty-Commit * change ocis_commitID --- .drone.env | 2 +- .../SideBar/Shares/Links/CreateQuickLink.vue | 2 +- .../smoke/spaces/publicLink.ocis.feature | 10 ++-------- tests/e2e/cucumber/steps/ui/links.ts | 2 +- .../support/objects/app-files/link/actions.ts | 17 ++++++----------- 5 files changed, 11 insertions(+), 22 deletions(-) diff --git a/.drone.env b/.drone.env index d0e98d09a25..2c7ac6d20bb 100644 --- a/.drone.env +++ b/.drone.env @@ -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 diff --git a/packages/web-app-files/src/components/SideBar/Shares/Links/CreateQuickLink.vue b/packages/web-app-files/src/components/SideBar/Shares/Links/CreateQuickLink.vue index fa7fc42c3a5..6b4ec4214c7 100644 --- a/packages/web-app-files/src/components/SideBar/Shares/Links/CreateQuickLink.vue +++ b/packages/web-app-files/src/components/SideBar/Shares/Links/CreateQuickLink.vue @@ -13,9 +13,9 @@ /> diff --git a/tests/e2e/cucumber/features/smoke/spaces/publicLink.ocis.feature b/tests/e2e/cucumber/features/smoke/spaces/publicLink.ocis.feature index 880368da5c4..b9e512baa06 100644 --- a/tests/e2e/cucumber/features/smoke/spaces/publicLink.ocis.feature +++ b/tests/e2e/cucumber/features/smoke/spaces/publicLink.ocis.feature @@ -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 | @@ -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 diff --git a/tests/e2e/cucumber/steps/ui/links.ts b/tests/e2e/cucumber/steps/ui/links.ts index 69ad75de1a8..01ed115c202 100644 --- a/tests/e2e/cucumber/steps/ui/links.ts +++ b/tests/e2e/cucumber/steps/ui/links.ts @@ -139,7 +139,7 @@ When( async function (this: World, stepUser: string, linkName: string, role: any): Promise { 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()) } ) diff --git a/tests/e2e/support/objects/app-files/link/actions.ts b/tests/e2e/support/objects/app-files/link/actions.ts index 95973849f47..ea0927f0cc9 100644 --- a/tests/e2e/support/objects/app-files/link/actions.ts +++ b/tests/e2e/support/objects/app-files/link/actions.ts @@ -45,7 +45,6 @@ export type changeRoleArgs = { resource?: string linkName: string role: string - space?: boolean } export type deleteLinkArgs = { @@ -109,19 +108,15 @@ export const waitForPopupNotPresent = async (page): Promise => { } export const changeRole = async (args: changeRoleArgs): Promise => { - 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()