This commit includes three main changes. First, it updates the Zod library from version 3.23.4 to 3.23.5 across all relevant packages. Second, code readability has been enhanced by formatting modifications in several TypeScript files. Lastly, the user feedback on certain operations such as creating a team or charging for a payment is strengthened, by displaying an awaiting indicator until the operation is complete.
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import { Page, expect, test } from '@playwright/test';
|
|
|
|
import { TeamAccountsPageObject } from './team-accounts.po';
|
|
|
|
test.describe('Team Accounts', () => {
|
|
let page: Page;
|
|
let teamAccounts: TeamAccountsPageObject;
|
|
|
|
test.beforeAll(async ({ browser }) => {
|
|
page = await browser.newPage();
|
|
teamAccounts = new TeamAccountsPageObject(page);
|
|
});
|
|
|
|
test('user can update their team name (and slug)', async () => {
|
|
await teamAccounts.setup();
|
|
|
|
const { teamName, slug } = teamAccounts.createTeamName();
|
|
|
|
await teamAccounts.goToSettings();
|
|
await teamAccounts.updateName(teamName);
|
|
|
|
// the slug should be updated to match the new team name
|
|
await page.waitForURL(`http://localhost:3000/home/${slug}/settings`);
|
|
|
|
await teamAccounts.openAccountsSelector();
|
|
|
|
await expect(teamAccounts.getTeamFromSelector(slug)).toBeVisible();
|
|
});
|
|
});
|
|
|
|
test.describe('Account Deletion', () => {
|
|
test('user can delete their team account', async ({ page }) => {
|
|
const teamAccounts = new TeamAccountsPageObject(page);
|
|
const params = teamAccounts.createTeamName();
|
|
|
|
await teamAccounts.setup(params);
|
|
await teamAccounts.goToSettings();
|
|
|
|
await teamAccounts.deleteAccount(params.teamName);
|
|
await teamAccounts.openAccountsSelector();
|
|
|
|
await expect(
|
|
teamAccounts.getTeamFromSelector(params.slug),
|
|
).not.toBeVisible();
|
|
});
|
|
});
|