Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 6 additions & 6 deletions tests/e2e-playwright/specs/admin-settings/general.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ test.describe('general management', () => {
})

await setAccessAndRefreshToken(usersEnvironment)
await ui.logInUser({ usersEnvironment, actorsEnvironment, stepUser: 'Admin' })
await ui.userLogsIn({ usersEnvironment, actorsEnvironment, stepUser: 'Admin' })
})

test('logo can be changed in the admin settings', async () => {
await ui.userOpensApplication({ actorsEnvironment, stepUser: 'Admin', name: 'admin-settings' })
await ui.navigateToGeneralManagementPage({ actorsEnvironment, stepUser: 'Admin' })
await ui.uploadLogoFromLocalPath({
await ui.userNavigatesToGeneralManagementPage({ actorsEnvironment, stepUser: 'Admin' })
await ui.userUploadsLogoFromLocalPath({
actorsEnvironment,
stepUser: 'Admin',
localFile: 'filesForUpload/testavatar.png',
filesEnvironment
})
await ui.navigateToGeneralManagementPage({ actorsEnvironment, stepUser: 'Admin' })
await ui.resetLogo({ actorsEnvironment, stepUser: 'Admin' })
await ui.logOutUser({ actorsEnvironment, stepUser: 'Admin' })
await ui.userNavigatesToGeneralManagementPage({ actorsEnvironment, stepUser: 'Admin' })
await ui.userResetsLogo({ actorsEnvironment, stepUser: 'Admin' })
await ui.userLogsOut({ actorsEnvironment, stepUser: 'Admin' })
})
})
53 changes: 22 additions & 31 deletions tests/e2e-playwright/specs/admin-settings/groups.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { expect } from '@playwright/test'
import { test } from '../../support/test'
import { config } from '../../../e2e/config.js'
import { ActorsEnvironment } from '../../../e2e/support/environment'
Expand All @@ -24,11 +23,11 @@ test.describe('groups management', () => {
})

await setAccessAndRefreshToken(usersEnvironment)
await ui.logInUser({ usersEnvironment, actorsEnvironment, stepUser: 'Admin' })
await ui.userLogsIn({ usersEnvironment, actorsEnvironment, stepUser: 'Admin' })
})

test.afterEach(async () => {
await ui.logOutUser({ actorsEnvironment, stepUser: 'Admin' })
await ui.userLogsOut({ actorsEnvironment, stepUser: 'Admin' })
})

test('admin creates group', async () => {
Expand All @@ -39,13 +38,11 @@ test.describe('groups management', () => {
stepUser: 'Admin',
groupIds: ['sales', 'security']
})
expect(
await ui.checkGroupsPresenceById({
actorsEnvironment,
stepUser: 'Admin',
expectedGroupIds: ['sales', 'security']
})
).toBeTruthy()
await ui.userShouldSeeGroupIds({
actorsEnvironment,
stepUser: 'Admin',
expectedGroupIds: ['sales', 'security']
})
})

test('admin deletes group', async ({ usersEnvironment }) => {
Expand All @@ -62,13 +59,11 @@ test.describe('groups management', () => {
groupsToBeDeleted: ['sales']
})

expect(
await ui.checkGroupsPresenceById({
actorsEnvironment,
stepUser: 'Admin',
expectedGroupIds: ['sales']
})
).toBeFalsy()
await ui.userShouldNotSeeGroupIds({
actorsEnvironment,
stepUser: 'Admin',
expectedGroupIds: ['sales']
})

await ui.userDeletesGroups({
actorsEnvironment,
Expand All @@ -77,13 +72,11 @@ test.describe('groups management', () => {
groupsToBeDeleted: ['security', 'finance']
})

expect(
await ui.checkGroupsPresenceById({
actorsEnvironment,
stepUser: 'Admin',
expectedGroupIds: ['security', 'finance']
})
).toBeFalsy()
await ui.userShouldNotSeeGroupIds({
actorsEnvironment,
stepUser: 'Admin',
expectedGroupIds: ['security', 'finance']
})
})

test('edit groups', async ({ usersEnvironment }) => {
Expand All @@ -101,12 +94,10 @@ test.describe('groups management', () => {
value: 'a renamed group',
action: 'context-menu'
})
expect(
await ui.groupDisplayNameExists({
actorsEnvironment,
stepUser: 'Admin',
groupDisplayName: 'a renamed group'
})
).toBeTruthy()
await ui.userShouldSeeGroupDisplayName({
actorsEnvironment,
stepUser: 'Admin',
groupDisplayName: 'a renamed group'
})
})
})
33 changes: 15 additions & 18 deletions tests/e2e-playwright/specs/app-provider/lock.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { expect } from '@playwright/test'
import { test } from '../../support/test'
import { config } from '../../../e2e/config.js'
import { ActorsEnvironment, UsersEnvironment } from '../../../e2e/support/environment'
Expand Down Expand Up @@ -29,13 +28,13 @@ test.describe('lock', { tag: '@sse' }, () => {
// | Alice |
// | Brian |
// | Carol |
await api.usersHasBeenCreated({
await api.usersHaveBeenCreated({
usersEnvironment,
stepUser: 'Admin',
users: ['Alice', 'Brian', 'Carol']
})
// And "Alice" logs in
await ui.logInUser({ usersEnvironment, actorsEnvironment, stepUser: 'Alice' })
await ui.userLogsIn({ usersEnvironment, actorsEnvironment, stepUser: 'Alice' })
})

test('file lock indication', async () => {
Expand Down Expand Up @@ -64,13 +63,13 @@ test.describe('lock', { tag: '@sse' }, () => {
]
})
// And "Brian" logs in
await ui.logInUser({ usersEnvironment, actorsEnvironment, stepUser: 'Brian' })
await ui.userLogsIn({ usersEnvironment, actorsEnvironment, stepUser: 'Brian' })
// And "Brian" navigates to the shared with me page
await ui.navigateToSharedWithMePage({ actorsEnvironment, stepUser: 'Brian' })
await ui.userNavigatesToSharedWithMePage({ actorsEnvironment, stepUser: 'Brian' })
// When "Brian" opens the following file in Collabora
// | resource |
// | test.odt |
await ui.openResourceInViewer({
await ui.userOpensResourceInViewer({
actorsEnvironment,
stepUser: 'Brian',
resource: 'test.odt',
Expand All @@ -92,21 +91,19 @@ test.describe('lock', { tag: '@sse' }, () => {
event: 'file-locked'
})
// And for "Alice" file "test.odt" should be locked
await ui.resourceShouldBeLocked({
await ui.resourceShouldBeLockedForUser({
actorsEnvironment,
stepUser: 'Alice',
resource: 'test.odt'
})

// checking that user cannot 'move', 'rename', 'delete' locked file
// And "Alice" should not be able to edit file "test.odt"
expect(
await ui.isAbleToEditFileOrFolder({
actorsEnvironment,
stepUser: 'Alice',
resource: 'test.odt'
})
).toBeFalsy()
await ui.userShouldNotBeAbleToEditResource({
actorsEnvironment,
stepUser: 'Alice',
resource: 'test.odt'
})

// checking that user cannot delete or change share of the locked file
// https://github.com/owncloud/web/issues/10507
Expand All @@ -123,7 +120,7 @@ test.describe('lock', { tag: '@sse' }, () => {
// And "Alice" creates a public link of following resource using the sidebar panel
// | resource | password |
// | test.odt | %public% |
await ui.createPublicLink({
await ui.userCreatesPublicLink({
actorsEnvironment,
stepUser: 'Alice',
resource: 'test.odt',
Expand Down Expand Up @@ -161,7 +158,7 @@ test.describe('lock', { tag: '@sse' }, () => {
event: 'file-unlocked'
})
// And for "Alice" file "test.odt" should not be locked
await ui.resourceShouldNotBeLocked({
await ui.resourceShouldNotBeLockedForUser({
actorsEnvironment,
stepUser: 'Alice',
resource: 'test.odt'
Expand All @@ -175,8 +172,8 @@ test.describe('lock', { tag: '@sse' }, () => {
recipient: 'Brian'
})
// And "Brian" logs out
await ui.logOutUser({ actorsEnvironment, stepUser: 'Brian' })
await ui.userLogsOut({ actorsEnvironment, stepUser: 'Brian' })
// And "Alice" logs out
await ui.logOutUser({ actorsEnvironment, stepUser: 'Alice' })
await ui.userLogsOut({ actorsEnvironment, stepUser: 'Alice' })
})
})
8 changes: 4 additions & 4 deletions tests/e2e-playwright/specs/app-provider/urlJourneys.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ test.describe('url stability for mobile and desktop client', { tag: '@predefined
// Given "Admin" creates following users using API
// | id |
// | Alice |
await api.usersHasBeenCreated({
await api.usersHaveBeenCreated({
usersEnvironment,
stepUser: 'Admin',
users: ['Alice']
})
// And "Alice" logs in
await ui.logInUser({ usersEnvironment, actorsEnvironment, stepUser: 'Alice' })
await ui.userLogsIn({ usersEnvironment, actorsEnvironment, stepUser: 'Alice' })
// And "Alice" creates the following files into personal space using API
// | pathToFile | content |
// | OpenDocument.odt | OpenDocument Content |
Expand All @@ -56,7 +56,7 @@ test.describe('url stability for mobile and desktop client', { tag: '@predefined
]
})
// And for "Alice" file "MicrosoftWord.docx" should not be locked
await ui.resourceShouldNotBeLocked({
await ui.resourceShouldNotBeLockedForUser({
actorsEnvironment,
stepUser: 'Alice',
resource: 'MicrosoftWord.docx'
Expand Down Expand Up @@ -138,6 +138,6 @@ test.describe('url stability for mobile and desktop client', { tag: '@predefined
editor: 'OnlyOffice'
})
// And "Alice" logs out
await ui.logOutUser({ actorsEnvironment, stepUser: 'Alice' })
await ui.userLogsOut({ actorsEnvironment, stepUser: 'Alice' })
})
})
27 changes: 14 additions & 13 deletions tests/e2e-playwright/specs/app-store/details.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { expect } from '@playwright/test'
import { test } from '../../support/test'
import { config } from './../../../e2e/config.js'
import { ActorsEnvironment, UsersEnvironment } from '../../../e2e/support/environment'
Expand Down Expand Up @@ -28,50 +27,52 @@ test.describe('details', { tag: '@predefined-users' }, () => {

test('Apps can be viewed and downloaded', async () => {
// When "Admin" logs in
await ui.logInUser({ usersEnvironment, actorsEnvironment, stepUser: 'Admin' })
await ui.userLogsIn({ usersEnvironment, actorsEnvironment, stepUser: 'Admin' })

// And "Admin" navigates to the app store
await ui.openAppStore({ actorsEnvironment, stepUser: 'Admin' })
await ui.userOpensAppStore({ actorsEnvironment, stepUser: 'Admin' })

// Then "Admin" should see the app store
await ui.waitForAppStoreIsVisible({ actorsEnvironment, stepUser: 'Admin' })
await ui.userShouldSeeAppStore({ actorsEnvironment, stepUser: 'Admin' })

// When "Admin" clicks on the app "Development boilerplate"
await ui.selectApp({ actorsEnvironment, stepUser: 'Admin', app: 'Development boilerplate' })
await ui.userSelectsApp({
actorsEnvironment,
stepUser: 'Admin',
app: 'Development boilerplate'
})

// Then "Admin" should see the app details of "Development boilerplate"
await ui.waitForAppDetailsIsVisible({
await ui.userShouldSeeAppDetails({
actorsEnvironment,
stepUser: 'Admin',
app: 'Development boilerplate'
})

// And "Admin" downloads app version "0.1.0"
const downloadedVersion = await ui.downloadAppVersion({
await ui.userDownloadsAppVersion({
actorsEnvironment,
stepUser: 'Admin',
version: '0.1.0'
})
expect(downloadedVersion).toContain('0.1.0')

// When "Admin" navigates back to the app store overview
await ui.navigateToAppStoreOverview({
await ui.userNavigatesToAppStoreOverview({
actorsEnvironment,
stepUser: 'Admin'
})

// Then "Admin" should see the app store
await ui.waitForAppStoreIsVisible({ actorsEnvironment, stepUser: 'Admin' })
await ui.userShouldSeeAppStore({ actorsEnvironment, stepUser: 'Admin' })

// And "Admin" downloads the latest version of the app "Development boilerplate"
const downloadedApp = await ui.downloadApp({
await ui.userDownloadsApp({
actorsEnvironment,
stepUser: 'Admin',
app: 'Development boilerplate'
})
expect(downloadedApp).toBeDefined()

// And "Admin" logs out
await ui.logOutUser({ actorsEnvironment, stepUser: 'Admin' })
await ui.userLogsOut({ actorsEnvironment, stepUser: 'Admin' })
})
})
Loading