mirror of
https://github.com/enso-org/enso.git
synced 2024-12-25 00:07:53 +03:00
58512e701e
Closes: https://github.com/enso-org/cloud-v2/issues/1445 PR is more or less ready for feedback,CR, and QA. # Read before looking into: **Known issues:** - [x] Need to adjust timings for the animations (they're a bit out of sync). - [x] After the latest rebase, the side panel might expand while clicking on the sidebar toggle. - [ ] Images no longer display. 🤦 - [x] Need to restore the functionality around spotlighting a component Demo: https://github.com/user-attachments/assets/8cec9ec0-4753-482e-8637-f3857b4396a5
85 lines
2.0 KiB
TypeScript
85 lines
2.0 KiB
TypeScript
/** @file Test the setup flow. */
|
|
import * as test from '@playwright/test'
|
|
|
|
import { Plan } from 'enso-common/src/services/Backend'
|
|
import * as actions from './actions'
|
|
|
|
// Reset storage state for this file to avoid being authenticated
|
|
test.test.use({ storageState: { cookies: [], origins: [] } })
|
|
|
|
test.test('setup (free plan)', ({ page }) =>
|
|
actions
|
|
.mockAll({
|
|
page,
|
|
setupAPI: (api) => {
|
|
api.setCurrentUser(null)
|
|
},
|
|
})
|
|
.loginAsNewUser()
|
|
.setUsername('test user')
|
|
.stayOnFreePlan()
|
|
.goToPage.drive()
|
|
.withDriveView(async (drive) => {
|
|
await test.expect(drive).toBeVisible()
|
|
}),
|
|
)
|
|
|
|
test.test('setup (solo plan)', ({ page }) =>
|
|
actions
|
|
.mockAll({
|
|
page,
|
|
setupAPI: (api) => {
|
|
api.setCurrentUser(null)
|
|
},
|
|
})
|
|
.loginAsNewUser()
|
|
.setUsername('test user')
|
|
.selectSoloPlan()
|
|
.goToPage.drive()
|
|
.withDriveView(async (drive) => {
|
|
await test.expect(drive).toBeVisible()
|
|
}),
|
|
)
|
|
|
|
test.test('setup (team plan, skipping invites)', ({ page }) =>
|
|
actions
|
|
.mockAll({
|
|
page,
|
|
setupAPI: (api) => {
|
|
api.setCurrentUser(null)
|
|
},
|
|
})
|
|
.loginAsNewUser()
|
|
.setUsername('test user')
|
|
.selectTeamPlan(Plan.team)
|
|
.setOrganizationName('test organization')
|
|
.skipInvitingUsers()
|
|
.setTeamName('test team')
|
|
.goToPage.drive()
|
|
.withDriveView(async (drive) => {
|
|
await test.expect(drive).toBeVisible()
|
|
}),
|
|
)
|
|
|
|
test.test('setup (team plan)', ({ page }) =>
|
|
actions
|
|
.mockAll({
|
|
page,
|
|
setupAPI: (api) => {
|
|
api.setCurrentUser(null)
|
|
},
|
|
})
|
|
.loginAsNewUser()
|
|
.setUsername('test user')
|
|
.selectTeamPlan(Plan.team, 10)
|
|
.setOrganizationName('test organization')
|
|
.inviteUsers('foo@bar.baz bar@bar.baz, baz@example.com; other+email@org.co.uk')
|
|
.setTeamName('test team')
|
|
.goToPage.drive()
|
|
.withDriveView(async (drive) => {
|
|
await test.expect(drive).toBeVisible()
|
|
}),
|
|
)
|
|
|
|
// No test for enterprise plan as the plan must be set to enterprise manually.
|