Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m12s
- Changed "Skip tour" button to "Cancel" in various tutorial overlays. - Updated modal titles from "Confirm Task" to "Confirm Penalty" where applicable. - Modified tutorial step call-to-action labels from "Got it" and "Next" to "Continue" for consistency. - Added tests for new tutorial overlay behavior and button interactions. - Refactored tutorial controller to allow ignoring tutorial enabled state in step visibility checks. - Enhanced user profile tutorial restart functionality with appropriate modal messages. - Updated user profile and task confirmation dialog components to reflect new titles and messages. - Adjusted configuration files for local development environments.
31 lines
1.4 KiB
TypeScript
31 lines
1.4 KiB
TypeScript
import { test, expect } from '@playwright/test'
|
||
import { E2E_PIN } from '../../e2e-constants'
|
||
|
||
test.describe('Parent profile button – temporary parent mode', () => {
|
||
test.beforeEach(async ({ page }) => {
|
||
await page.goto('/parent')
|
||
// Dismiss tutorial overlay if present — it intercepts pointer events
|
||
const skip = page.getByRole('button', { name: 'Cancel' })
|
||
if (await skip.isVisible({ timeout: 1000 }).catch(() => false)) {
|
||
await skip.click()
|
||
}
|
||
// Switch from permanent mode to temporary mode:
|
||
// 1. Exit parent mode via Child Mode
|
||
await page.getByRole('button', { name: 'Parent menu' }).click()
|
||
await page.getByRole('menuitem', { name: 'Child Mode' }).click()
|
||
await expect(page.getByRole('button', { name: 'Parent login' })).toBeVisible()
|
||
// 2. Re-enter parent mode WITHOUT the persistence checkbox
|
||
await page.getByRole('button', { name: 'Parent login' }).click()
|
||
const pinInput = page.getByPlaceholder('4–6 digits')
|
||
await pinInput.waitFor({ timeout: 5000 })
|
||
await pinInput.fill(E2E_PIN)
|
||
// Do NOT check 'Stay in parent mode'
|
||
await page.getByRole('button', { name: 'OK' }).click()
|
||
await page.waitForURL(/\/parent(\/|$)/)
|
||
})
|
||
|
||
test('Badge – no 🔒 badge in temporary parent mode', async ({ page }) => {
|
||
await expect(page.getByLabel('Persistent parent mode active')).not.toBeVisible()
|
||
})
|
||
})
|