mirror of
https://github.com/enso-org/enso.git
synced 2024-12-21 05:41:42 +03:00
8d7b684019
- Depends on https://github.com/enso-org/cloud-v2/pull/1344 - Implement https://github.com/enso-org/cloud-v2/issues/1342 - Refactor `Category` type to allow for extra metadata (user/team id and home directory path) - Show list of users and teams in sidebar - Add "My Files" category for users with team/enterprise plan - because in that case, the directory opened by the "Cloud" category is the organization's root directory, not the user's root directory # Important Notes None
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
/** @file Test the user settings tab. */
|
|
import * as test from '@playwright/test'
|
|
|
|
import * as backend from '#/services/Backend'
|
|
|
|
import * as actions from './actions'
|
|
|
|
test.test('members settings', async ({ page }) => {
|
|
const api = await actions.mockAllAndLoginAndExposeAPI({
|
|
page,
|
|
setupAPI: (theApi) => {
|
|
theApi.setPlan(backend.Plan.enterprise)
|
|
// Setup
|
|
theApi.setCurrentOrganization(theApi.defaultOrganization)
|
|
},
|
|
})
|
|
const localActions = actions.settings.members
|
|
|
|
await localActions.go(page)
|
|
await test
|
|
.expect(localActions.locateMembersRows(page).locator('> :nth-child(1) > :nth-child(2)'))
|
|
.toHaveText([api.currentUser()?.name ?? ''])
|
|
|
|
const otherUserName = 'second.user_'
|
|
const otherUser = api.addUser(otherUserName)
|
|
await actions.relog({ page })
|
|
await localActions.go(page)
|
|
await test
|
|
.expect(localActions.locateMembersRows(page).locator('> :nth-child(1) > :nth-child(2)'))
|
|
.toHaveText([api.currentUser()?.name ?? '', otherUserName])
|
|
|
|
api.deleteUser(otherUser.userId)
|
|
await actions.relog({ page })
|
|
await localActions.go(page)
|
|
await test
|
|
.expect(localActions.locateMembersRows(page).locator('> :nth-child(1) > :nth-child(2)'))
|
|
.toHaveText([api.currentUser()?.name ?? ''])
|
|
})
|