Skip to content

Commit 1120629

Browse files
committed
fix typo and import
1 parent 615f437 commit 1120629

12 files changed

Lines changed: 26 additions & 20 deletions

.drone.star

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ config = {
205205
},
206206
"oidc-iframe": {
207207
"skip": False,
208-
"feature": [
208+
"features": [
209209
"specs/oidc/iframeTokenRenewal.spec.ts",
210210
],
211211
"extraServerEnvironment": {
@@ -718,6 +718,7 @@ def e2eTestsOnPlaywright(ctx):
718718
"type": "docker",
719719
"name": "e2e-pw-%s" % suite,
720720
"workspace": web_workspace,
721+
"environment": environment,
721722
"steps": steps,
722723
"depends_on": ["cache-ocis"],
723724
"trigger": base_trigger,

tests/e2e-playwright/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default defineConfig({
2525
retries: config.retry,
2626

2727
// Opt out of parallel tests on CI.
28-
workers: process.env.CI ? 1 : undefined,
28+
workers: 1,
2929

3030
// Reporter to use
3131
reporter: [

tests/e2e-playwright/specs/navigation/personalSpacePagination.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,20 @@ test.describe('Personal space pagination', { tag: '@predefined-users' }, () => {
4040
await ui.logInUser({ usersEnvironment, actorsEnvironment, stepUser: 'Alice' })
4141

4242
// And "Alice" creates 15 folders in personal space using API
43-
for (let i = 0; i < 15; i++) {
43+
for (let i = 1; i <= 15; i++) {
4444
await api.userHasCreatedFolder({
4545
usersEnvironment,
4646
stepUser: 'Alice',
4747
folderName: `folder${i}`
4848
})
4949
}
5050
// And "Alice" creates 10 files in personal space using API
51-
for (let i = 0; i < 15; i++) {
51+
for (let i = 1; i <= 10; i++) {
5252
await api.userHasCreatedFile({
5353
usersEnvironment,
5454
stepUser: 'Alice',
55-
filename: `file${i}`
55+
filename: `file${i}`,
56+
content: `This is a test file${i}`
5657
})
5758
}
5859
// And "Alice" creates the following files into personal space using API
@@ -91,7 +92,7 @@ test.describe('Personal space pagination', { tag: '@predefined-users' }, () => {
9192
expectedNumberOfResources: 6
9293
})
9394
// When "Alice" changes the items per page to "500"
94-
await ui.changeItemsPerPage({ actorsEnvironment, stepUser: 'Alice', itemsPerPage: '20' })
95+
await ui.changeItemsPerPage({ actorsEnvironment, stepUser: 'Alice', itemsPerPage: '500' })
9596

9697
// Then "Alice" should not see the pagination in the personal space files view
9798
await ui.expectPageNumberNotToBeVisible({ actorsEnvironment, stepUser: 'Alice' })

tests/e2e-playwright/specs/oidc/iframeTokenRenewal.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test } from '@playwright/test'
1+
import { test, expect } from '@playwright/test'
22
import { config } from './../../../e2e/config.js'
33
import { ActorsEnvironment, UsersEnvironment } from '../../../e2e/support/environment'
44
import { setAccessAndRefreshToken } from '../../helpers/setAccessAndRefreshToken'

tests/e2e-playwright/specs/oidc/refreshToken.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ test.describe('details', () => {
2727
})
2828

2929
test.afterEach(async () => {
30+
await setAccessAndRefreshToken(usersEnvironment)
3031
await api.deleteUser({ usersEnvironment, stepUser: 'Admin', targetUser: 'Alice' })
3132
})
3233

tests/e2e-playwright/specs/spaces/createSpaceFromSelection.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test } from '@playwright/test'
1+
import { test, expect } from '@playwright/test'
22
import { config } from './../../../e2e/config.js'
33
import {
44
ActorsEnvironment,
@@ -84,7 +84,7 @@ test.describe('create Space shortcut', () => {
8484
actorsEnvironment,
8585
filesEnvironment,
8686
stepUser: 'Alice',
87-
resource: 'lorem.zip',
87+
resource: 'lorem.txt',
8888
to: 'spaceFolder'
8989
})
9090

@@ -141,19 +141,19 @@ test.describe('create Space shortcut', () => {
141141
// And "Alice" uploads the following resources
142142
// | resource | to |
143143
// | data.zip | resourceFolder |
144-
// | lorem.txt | spaceFolder |
144+
// | lorem.txt | |
145145
await ui.uploadResource({
146146
actorsEnvironment,
147147
filesEnvironment,
148148
stepUser: 'Alice',
149149
resource: 'data.zip',
150-
to: 'spaceFolder'
150+
to: 'resourceFolder'
151151
})
152152
await ui.uploadResource({
153153
actorsEnvironment,
154154
filesEnvironment,
155155
stepUser: 'Alice',
156-
resource: 'lorem.zip',
156+
resource: 'lorem.txt',
157157
to: ''
158158
})
159159

tests/e2e-playwright/specs/spaces/denySpaceAccess.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test } from '@playwright/test'
1+
import { test, expect } from '@playwright/test'
22
import { config } from './../../../e2e/config.js'
33
import {
44
ActorsEnvironment,
@@ -91,7 +91,7 @@ test.describe('deny space access', () => {
9191
await api.userHasAddedMembersToSpace({
9292
usersEnvironment,
9393
stepUser: 'Alice',
94-
space: 'team',
94+
space: 'sales',
9595
shareType: 'user',
9696
sharee: 'Brian',
9797
role: 'Can edit'

tests/e2e-playwright/specs/spaces/downloadSpace.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ test.describe('download space', () => {
102102
actorsEnvironment,
103103
usersEnvironment,
104104
stepUser: 'Alice',
105-
sharee: 'team.1',
105+
sharee: 'Brian',
106106
role: 'Can edit',
107107
kind: 'user'
108108
})

tests/e2e-playwright/specs/user-settings/notifications.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ test.describe('Notifications', () => {
271271
// | message |
272272
// | %user_alice_displayName% deleted Space team |
273273
messages = await ui.getNotificationMessages({ actorsEnvironment, stepUser: 'Brian' })
274-
expect(messages).toContain(substitute('%user_alice_displayName% delete Space team'))
274+
expect(messages).toContain(substitute('%user_alice_displayName% deleted Space team'))
275275

276276
await api.userHasDeletedGroup({ usersEnvironment, stepUser: 'Admin', name: 'sales' })
277277
})
@@ -298,7 +298,7 @@ test.describe('Notifications', () => {
298298
})
299299

300300
// And "Brian" logs in
301-
await ui.logInUser({ usersEnvironment, actorsEnvironment, stepUser: 'Alice' })
301+
await ui.logInUser({ usersEnvironment, actorsEnvironment, stepUser: 'Brian' })
302302

303303
// And "Brian" opens the user menu
304304
await ui.userOpensAccountPage({ actorsEnvironment, stepUser: 'Brian' })
@@ -444,7 +444,7 @@ test.describe('Notifications', () => {
444444
})
445445

446446
// Then "Carol" should see no notifications
447-
messages = await ui.getNotificationMessages({ actorsEnvironment, stepUser: 'Coral' })
447+
messages = await ui.getNotificationMessages({ actorsEnvironment, stepUser: 'Carol' })
448448
expect(messages).toHaveLength(0)
449449
})
450450
})

tests/e2e-playwright/steps/api/api.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ import { ResourceType } from '../../../e2e/support/api/share/share'
99
import { Group, Space, User } from '../../../e2e/support/types'
1010
import fs from 'fs'
1111
import { integer } from 'vscode-languageserver-types'
12-
import join from 'join-path'
12+
1313
import { checkResponseStatus, request } from '../../../e2e/support/api/http'
14+
import { join } from 'path'
1415

1516
export async function userHasBeenCreated({
1617
usersEnvironment,
@@ -360,6 +361,7 @@ export async function userHasDeletedProjectSpace({
360361
}) {
361362
const user = usersEnvironment.getUser({ key: stepUser })
362363
await api.graph.deleteSpace({ user, space: { id, name } as unknown as Space })
364+
store.createdSpaceStore.clear()
363365
}
364366

365367
export async function userHasAddedMembersToSpace({

0 commit comments

Comments
 (0)