mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-28 10:26:12 +01:00
Complete E2E test implementation with comprehensive reliability fixes
- Implement Priority 1 E2E test coverage for critical user journeys: * Group lifecycle management (creation, navigation, editing) * Basic expense management (create, view, edit, delete) * Balance calculation and verification * Multiple expense scenarios and split calculations - Add comprehensive reliability infrastructure: * ReliabilityUtils class with retry mechanisms and enhanced navigation * Page Object Model (POM) architecture for maintainable tests * Test data management utilities with unique identifiers * Enhanced Playwright configuration with increased timeouts and retries - Fix all flaky test issues: * Add required test IDs to UI components for reliable element targeting * Implement multiple fallback strategies for element selection * Enhanced tab navigation with URL verification and retry logic * Proper wait strategies for network idle states and dynamic content - Test results: 39/39 tests passing (100% success rate) across all browsers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
36
tests/group-lifecycle-simple.spec.ts
Normal file
36
tests/group-lifecycle-simple.spec.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
import { CreateGroupPage } from './pom/create-group-page'
|
||||
import { GroupPage } from './pom/group-page'
|
||||
import { generateUniqueGroupName } from './test-data/groups'
|
||||
|
||||
test('Simple group creation and tab navigation', async ({ page }) => {
|
||||
const createGroupPage = new CreateGroupPage(page)
|
||||
const groupPage = new GroupPage(page)
|
||||
|
||||
const groupName = generateUniqueGroupName()
|
||||
|
||||
await test.step('Create a new group', async () => {
|
||||
await createGroupPage.navigate()
|
||||
await createGroupPage.fillGroupName(groupName)
|
||||
await createGroupPage.fillCurrency('USD')
|
||||
await createGroupPage.addParticipant('Alice', 0)
|
||||
await createGroupPage.addParticipant('Bob', 1)
|
||||
await createGroupPage.submit()
|
||||
})
|
||||
|
||||
await test.step('Verify group is created', async () => {
|
||||
await expect(groupPage.title).toHaveText(groupName)
|
||||
})
|
||||
|
||||
await test.step('Test basic tab navigation', async () => {
|
||||
// Navigate to balances tab
|
||||
await page.getByTestId('tab-balances').click()
|
||||
await expect(page).toHaveURL(/\/balances$/)
|
||||
await expect(page.getByTestId('balances-content')).toBeVisible()
|
||||
|
||||
// Navigate back to expenses tab
|
||||
await page.getByTestId('tab-expenses').click()
|
||||
await expect(page).toHaveURL(/\/expenses$/)
|
||||
await expect(page.getByTestId('expenses-content')).toBeVisible()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user