diff --git a/tests/e2e/cucumber/features/smoke/languageChange.feature b/tests/e2e/cucumber/features/smoke/languageChange.feature index c2d820857ec..9e7ee2c4a6e 100644 --- a/tests/e2e/cucumber/features/smoke/languageChange.feature +++ b/tests/e2e/cucumber/features/smoke/languageChange.feature @@ -28,23 +28,3 @@ Feature: language settings | Brian Murphy hat check_message mit Ihnen geteilt | And "Alice" logs out - - Scenario: anonymous user language change - When "Alice" logs in - And "Alice" creates the following folder in personal space using API - | name | - | folderPublic | - And "Alice" uploads the following local file into personal space using API - | localFile | to | - | filesForUpload/lorem.txt | lorem.txt | - - And "Alice" opens the "files" app - And "Alice" creates a public link of following resource using the sidebar panel - | resource | password | - | folderPublic | %public% | - And "Alice" logs out - When "Anonymous" opens the public link "Link" - And "Anonymous" unlocks the public link with password "%public%" - And "Anonymous" opens the user menu - And "Anonymous" changes the language to "Deutsch - German" - Then "Anonymous" should see the following account page title "Konto" diff --git a/tests/e2e/cucumber/features/smoke/trashbinDelete.feature b/tests/e2e/cucumber/features/smoke/trashbinDelete.feature index ee0e5d1b645..835a59f20fc 100644 --- a/tests/e2e/cucumber/features/smoke/trashbinDelete.feature +++ b/tests/e2e/cucumber/features/smoke/trashbinDelete.feature @@ -46,11 +46,12 @@ Feature: Trashbin delete Given "Alice" creates the following folders in personal space using API | name | | folderToShare | - | empty-folder | + | empty-folder | And "Alice" creates the following files into personal space using API | pathToFile | content | | folderToShare/lorem.txt | lorem ipsum | | sample.txt | sample | + And "Alice" opens the "files" app And "Alice" shares the following resource using the sidebar panel | resource | recipient | type | role | resourceType | | folderToShare | Brian | user | Can edit | folder | diff --git a/tests/e2e/support/objects/app-files/resource/actions.ts b/tests/e2e/support/objects/app-files/resource/actions.ts index 5f7c46849bf..184c167af06 100644 --- a/tests/e2e/support/objects/app-files/resource/actions.ts +++ b/tests/e2e/support/objects/app-files/resource/actions.ts @@ -1,7 +1,7 @@ import { Download, Locator, Page, expect } from '@playwright/test' import util from 'util' import path from 'path' -import { resourceExists, waitForResources } from './utils' +import { resourceExists, waitForResources, resourceNameSelector } from './utils' import { editor, sidebar } from '../utils' import { File, Space } from '../../../types' import { dragDropFiles } from '../../../utils/dragDrop' @@ -26,8 +26,6 @@ const checkBoxForTrashbin = `//*[@data-test-resource-path="%s"]//ancestor::tr//i const filesSelector = '//*[@data-test-resource-name="%s"]' export const fileRow = '//ancestor::*[(contains(@class, "oc-tile-card") or contains(@class, "oc-tbody-tr"))]' -export const resourceNameSelector = - ':is(#files-space-table, .oc-tiles-item, #files-shared-with-me-accepted-section, .files-table) [data-test-resource-name="%s"]' // following breadcrumb selectors is passed to buildXpathLiteral function as the content to be inserted might contain quotes const breadcrumbResourceNameSelector = '//span[contains(@class, "oc-breadcrumb-item-text") and text()=%s]' @@ -138,13 +136,9 @@ export const clickResource = async ({ const folder = name.replace(/'/g, "\\'").replace(/"/g, '\\"') const resource = page.locator(util.format(resourceNameSelector, folder)) - const itemId = await resource.locator(fileRow).getAttribute('data-item-id') await Promise.all([ page.waitForResponse( - (resp) => - resp.url().endsWith(encodeURIComponent(name)) || - resp.url().endsWith(itemId) || - resp.url().endsWith(encodeURIComponent(itemId)) + (resp) => resp.status() === 207 && resp.request().method() === 'PROPFIND' ), resource.click() ]) diff --git a/tests/e2e/support/objects/app-files/resource/utils.ts b/tests/e2e/support/objects/app-files/resource/utils.ts index 19b24cdfec4..a5c1b903e84 100644 --- a/tests/e2e/support/objects/app-files/resource/utils.ts +++ b/tests/e2e/support/objects/app-files/resource/utils.ts @@ -1,7 +1,9 @@ import { errors, Page } from '@playwright/test' import util from 'util' -const resourceNameSelector = '#files-space-table [data-test-resource-name="%s"]' +export const resourceNameSelector = + ':is(#files-space-table, .oc-tiles-item, #files-shared-with-me-accepted-section, .files-table) [data-test-resource-name="%s"]' + /** * one of the few places where timeout should be used, as we also use this to detect the absence of an element * it is not possible to differentiate between `element not there yet` and `element not loaded yet`.