mirror of
https://github.com/enso-org/enso.git
synced 2024-12-21 14:21:31 +03:00
b52e8eb9b0
- Add close button to Editor tab - Convert Settings page into a modal (not guaranteed to be the final design, but it makes sense to change it to a modal for now at least) # Important Notes None
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
/** @file Test the user settings tab. */
|
|
import * as test from '@playwright/test'
|
|
|
|
import * as actions from './actions'
|
|
|
|
test.test('members settings', async ({ page }) => {
|
|
const { api } = await actions.mockAllAndLogin({ page })
|
|
const localActions = actions.settings.members
|
|
|
|
// Setup
|
|
api.setCurrentOrganization(api.defaultOrganization)
|
|
|
|
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.closeModal(page)
|
|
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.closeModal(page)
|
|
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 ?? ''])
|
|
})
|