enso/app/ide-desktop/lib/dashboard/e2e/membersSettings.spec.ts
somebody1234 b52e8eb9b0
Improve tab bar (#10333)
- 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
2024-06-24 16:02:22 +00:00

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 ?? ''])
})