Update account management features and improve test configurations
Multiple updates are made to refine the account management features, including updating the 'Your Teams' text to show the number of teams, and modifying the form data validation process in the 'deletePersonalAccountAction' service. Additionally, improvements have been made in test configurations including updating the test timeout settings, taking screenshots when a test fails, and adjusting the location for saving Playwright reports.
This commit is contained in:
@@ -25,6 +25,9 @@ export default defineConfig({
|
||||
/* Base URL to use in actions like `await page.goto('/')`. */
|
||||
baseURL: 'http://localhost:3000',
|
||||
|
||||
// take a screenshot when a test fails
|
||||
screenshot: "on",
|
||||
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
|
||||
@@ -55,7 +55,9 @@ test.describe('Account Deletion', () => {
|
||||
await account.setup();
|
||||
await account.deleteAccount();
|
||||
|
||||
await page.waitForURL('http://localhost:3000');
|
||||
await page.waitForURL('http://localhost:3000', {
|
||||
timeout: 5000,
|
||||
});
|
||||
|
||||
expect(page.url()).toEqual('http://localhost:3000/');
|
||||
});
|
||||
|
||||
@@ -38,7 +38,9 @@ export class TeamAccountsPageObject {
|
||||
await this.page.fill('[data-test="create-team-form"] input', teamName);
|
||||
await this.page.click('[data-test="create-team-form"] button:last-child');
|
||||
|
||||
await this.page.waitForURL(`http://localhost:3000/home/${slug}`);
|
||||
await this.page.waitForURL(`http://localhost:3000/home/${slug}`, {
|
||||
timeout: 5000,
|
||||
});
|
||||
}
|
||||
|
||||
async updateName(name: string) {
|
||||
@@ -56,7 +58,7 @@ export class TeamAccountsPageObject {
|
||||
}
|
||||
|
||||
createTeamName() {
|
||||
const random = (Math.random() * 1000000000).toFixed(0);
|
||||
const random = (Math.random() * 10).toFixed(0);
|
||||
|
||||
const teamName = `Team-Name-${random}`;
|
||||
const slug = `team-name-${random}`;
|
||||
|
||||
@@ -35,7 +35,9 @@ test.describe('Account Deletion', () => {
|
||||
|
||||
await teamAccounts.deleteAccount(params.teamName);
|
||||
|
||||
await page.waitForURL('http://localhost:3000/home');
|
||||
await page.waitForURL('http://localhost:3000/home', {
|
||||
timeout: 5000,
|
||||
});
|
||||
|
||||
expect(page.url()).toEqual('http://localhost:3000/home');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user