feat: enhance tutorial functionality by disabling inputs and buttons during active steps
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m12s
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m12s
This commit is contained in:
@@ -2,20 +2,20 @@
|
||||
"cookies": [
|
||||
{
|
||||
"name": "refresh_token",
|
||||
"value": "QRDDJrwVfrRB_5Z--i4k48Q4-0kktQnZJelqd9JABBQ",
|
||||
"value": "qYJH5LMH5O4UK92tdAp7R49rzGACFvTMVj29S-Pzygc",
|
||||
"domain": "localhost",
|
||||
"path": "/api/auth",
|
||||
"expires": 1791758861.201632,
|
||||
"expires": 1792435594.088715,
|
||||
"httpOnly": true,
|
||||
"secure": true,
|
||||
"sameSite": "Strict"
|
||||
},
|
||||
{
|
||||
"name": "access_token",
|
||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS1jY0B0ZXN0LmNvbSIsInVzZXJfaWQiOiIyNjU1MGUxZS00NTBiLTRmMzMtOGI3MC02NjA1MGU2MzZkNzgiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3ODM5OTM2NjF9.pZegL2iwonftDyVlaADPhHeTPrx7VKkoi8TtDY3Byuk",
|
||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS1jY0B0ZXN0LmNvbSIsInVzZXJfaWQiOiI2NmNlMzgzMy0zMGQ3LTRjMTItYjRhMi1iNmIxMjcxYTI1YzEiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3ODQ2NzAzOTR9.jkyiFTxBQ0oatY6jCAWFG88E8e6mCrDDlN_8I56RMBA",
|
||||
"domain": "localhost",
|
||||
"path": "/",
|
||||
"expires": 1783993661.201585,
|
||||
"expires": 1784670394.088677,
|
||||
"httpOnly": true,
|
||||
"secure": true,
|
||||
"sameSite": "Lax"
|
||||
@@ -27,11 +27,11 @@
|
||||
"localStorage": [
|
||||
{
|
||||
"name": "authSyncEvent",
|
||||
"value": "{\"type\":\"logout\",\"at\":1783982861064}"
|
||||
"value": "{\"type\":\"logout\",\"at\":1784659593888}"
|
||||
},
|
||||
{
|
||||
"name": "parentAuth",
|
||||
"value": "{\"expiresAt\":1784155661355}"
|
||||
"value": "{\"expiresAt\":1784832394248}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
"cookies": [
|
||||
{
|
||||
"name": "refresh_token",
|
||||
"value": "QCQAmUFxc_xNvuLjIGYO4HL49nrDnWW2K54jTZT3ZBw",
|
||||
"value": "PylNoNcxDjRuoocNg4ZmApg_7OIxp9Jfs7ttsX3C5uA",
|
||||
"domain": "localhost",
|
||||
"path": "/api/auth",
|
||||
"expires": 1791758861.100584,
|
||||
"expires": 1792435594.088028,
|
||||
"httpOnly": true,
|
||||
"secure": true,
|
||||
"sameSite": "Strict"
|
||||
},
|
||||
{
|
||||
"name": "access_token",
|
||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS1kZWxldGVAdGVzdC5jb20iLCJ1c2VyX2lkIjoiZjkyN2FjMzItZDE3ZC00MjhhLWI5YTgtYTQ5NjM5YjE4YTgzIiwidG9rZW5fdmVyc2lvbiI6MCwiZXhwIjoxNzgzOTkzNjYxfQ.GE6KZ4PXLwLsF8HYZckYwvBruIBMNqVxY-Yg94_QBcU",
|
||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS1kZWxldGVAdGVzdC5jb20iLCJ1c2VyX2lkIjoiN2UzNjdjMGItMDU3ZS00MWEzLThlNzYtZWZmNDUyMmFmOTU2IiwidG9rZW5fdmVyc2lvbiI6MCwiZXhwIjoxNzg0NjcwMzk0fQ.cVkoiVTtH1O7TFqW5yQ9BEBlTq7hR8YEya7FW2b_Yh8",
|
||||
"domain": "localhost",
|
||||
"path": "/",
|
||||
"expires": 1783993661.100535,
|
||||
"expires": 1784670394.08796,
|
||||
"httpOnly": true,
|
||||
"secure": true,
|
||||
"sameSite": "Lax"
|
||||
@@ -27,11 +27,11 @@
|
||||
"localStorage": [
|
||||
{
|
||||
"name": "authSyncEvent",
|
||||
"value": "{\"type\":\"logout\",\"at\":1783982860894}"
|
||||
"value": "{\"type\":\"logout\",\"at\":1784659593889}"
|
||||
},
|
||||
{
|
||||
"name": "parentAuth",
|
||||
"value": "{\"expiresAt\":1784155661256}"
|
||||
"value": "{\"expiresAt\":1784832394248}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
"cookies": [
|
||||
{
|
||||
"name": "refresh_token",
|
||||
"value": "xQQnxda8ujhjlZDBQ2Rl4Xxlh4X2_Kt1e80YSWniAXA",
|
||||
"value": "LZA3Bk15HR3io_q8vfyqD3wlRoyV-GJwY-MjWvtUQzg",
|
||||
"domain": "localhost",
|
||||
"path": "/api/auth",
|
||||
"expires": 1791760814.863417,
|
||||
"expires": 1792435594.060453,
|
||||
"httpOnly": true,
|
||||
"secure": true,
|
||||
"sameSite": "Strict"
|
||||
},
|
||||
{
|
||||
"name": "access_token",
|
||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS10dXRvcmlhbEB0ZXN0LmNvbSIsInVzZXJfaWQiOiIzNWI3ZGVjMS01ODNmLTQ5M2YtYTQ5ZS1mNWM0NzM3YTQ5NzgiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3ODM5OTU2MTR9.KWJqO7mVswb5IoHsJOOdZSm8iCmYoNVXwixDsQ8lbmI",
|
||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS10dXRvcmlhbEB0ZXN0LmNvbSIsInVzZXJfaWQiOiJjYjQyMzZkNC1kNDRlLTQ0YjMtOTYzYi0xYTUwMWEzZjM2NTMiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3ODQ2NzAzOTR9.pPd0JYgaAyn4_0YPOlxKoX1B9Ka4Vq2M3CpNcl7EDAU",
|
||||
"domain": "localhost",
|
||||
"path": "/",
|
||||
"expires": 1783995614.863369,
|
||||
"expires": 1784670394.06041,
|
||||
"httpOnly": true,
|
||||
"secure": true,
|
||||
"sameSite": "Lax"
|
||||
@@ -27,11 +27,11 @@
|
||||
"localStorage": [
|
||||
{
|
||||
"name": "authSyncEvent",
|
||||
"value": "{\"type\":\"logout\",\"at\":1783984814749}"
|
||||
"value": "{\"type\":\"logout\",\"at\":1784659593886}"
|
||||
},
|
||||
{
|
||||
"name": "parentAuth",
|
||||
"value": "{\"expiresAt\":1784157614996}"
|
||||
"value": "{\"expiresAt\":1784832394232}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
"cookies": [
|
||||
{
|
||||
"name": "refresh_token",
|
||||
"value": "zFYZnbIZmC4uH9DcQ3PO8WPPAy_IOts57gvbCMERHvw",
|
||||
"value": "MYMeAyxeWQy7LVHrJsvF-10FozU5Ko_QoEvmV3bHwPc",
|
||||
"domain": "localhost",
|
||||
"path": "/api/auth",
|
||||
"expires": 1791760813.448801,
|
||||
"expires": 1792435592.056481,
|
||||
"httpOnly": true,
|
||||
"secure": true,
|
||||
"sameSite": "Strict"
|
||||
},
|
||||
{
|
||||
"name": "access_token",
|
||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZUB0ZXN0LmNvbSIsInVzZXJfaWQiOiIzNDkyZjAyMi0yMDdiLTRjMjMtYWFlYy1lMmNjNzc0N2IxYjAiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3ODM5OTU2MTN9.PM5XaijvAuzEPSY3Mz1DB1jvYTJDeaMhGZnrYukUJ0Q",
|
||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZUB0ZXN0LmNvbSIsInVzZXJfaWQiOiJiODJhZDU2Mi03MjMwLTRkN2EtODU3NS04N2FhNzE1ZWNhMjQiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3ODQ2NzAzOTJ9.iEbCtV3csb9AUWoXL4MJ-GLL1yiJDumvYmKr-vyuwBg",
|
||||
"domain": "localhost",
|
||||
"path": "/",
|
||||
"expires": 1783995613.448755,
|
||||
"expires": 1784670392.056434,
|
||||
"httpOnly": true,
|
||||
"secure": true,
|
||||
"sameSite": "Lax"
|
||||
@@ -27,11 +27,11 @@
|
||||
"localStorage": [
|
||||
{
|
||||
"name": "authSyncEvent",
|
||||
"value": "{\"type\":\"logout\",\"at\":1783984813329}"
|
||||
"value": "{\"type\":\"logout\",\"at\":1784659591903}"
|
||||
},
|
||||
{
|
||||
"name": "parentAuth",
|
||||
"value": "{\"expiresAt\":1784157613579}"
|
||||
"value": "{\"expiresAt\":1784832392197}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -377,4 +377,68 @@ test.describe('Tutorial system', () => {
|
||||
await page.reload()
|
||||
await expect(getTutorialCard(page)).not.toBeVisible({ timeout: 3000 })
|
||||
})
|
||||
|
||||
test('add-child FAB is disabled while the create-child tutorial is showing', async ({
|
||||
page,
|
||||
request,
|
||||
}) => {
|
||||
await deleteAllChildren(request)
|
||||
await page.goto('/parent')
|
||||
await expectTutorialCard(page, 'Add your child')
|
||||
|
||||
const fab = page.locator('.fab')
|
||||
await expect(fab).toBeVisible()
|
||||
await expect(fab).toBeDisabled()
|
||||
|
||||
// The page should still be on the children list and the tutorial visible.
|
||||
await expect(page).toHaveURL('/parent')
|
||||
await expect(getTutorialCard(page)).toBeVisible()
|
||||
})
|
||||
|
||||
test('child form inputs are disabled while the edit-child-name tutorial is showing', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto('/parent/children/create')
|
||||
await expect(page).toHaveURL('/parent/children/create')
|
||||
await expectTutorialCard(page, "Child's Name")
|
||||
|
||||
await expect(page.locator('input#name')).toBeDisabled()
|
||||
await expect(page.locator('input#age')).toBeDisabled()
|
||||
|
||||
// The tutorial card should remain visible after checking the inputs.
|
||||
await expect(getTutorialCard(page)).toBeVisible()
|
||||
})
|
||||
|
||||
test('clicking the highlighted Points area does not navigate while child-points tutorial is showing', async ({
|
||||
page,
|
||||
request,
|
||||
}) => {
|
||||
const childName = 'TutorialPointsKid'
|
||||
await ensureChild(request, childName, 7)
|
||||
await page.goto('/parent')
|
||||
await expect(page).toHaveURL('/parent')
|
||||
|
||||
// Wait for the child card to render so the children list has finished
|
||||
// loading before we assert on the Points tutorial.
|
||||
await expect(page.getByText(childName, { exact: true }).first()).toBeVisible({ timeout: 10000 })
|
||||
|
||||
await expectTutorialCard(page, 'Points')
|
||||
|
||||
// Small resilience delay so the spotlight blocker is positioned before the
|
||||
// synthetic click reaches it.
|
||||
await page.waitForTimeout(50)
|
||||
|
||||
const points = page.locator('.card .points').first()
|
||||
await expect(points).toBeVisible()
|
||||
const box = await points.boundingBox()
|
||||
if (!box) throw new Error('Could not resolve points element bounding box')
|
||||
|
||||
// Click the center of the highlighted points area. The tutorial spotlight
|
||||
// blocker should intercept the click, preventing the card click handler
|
||||
// from navigating to the child detail page.
|
||||
await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2)
|
||||
|
||||
await expect(page).toHaveURL('/parent')
|
||||
await expect(getTutorialCard(page)).toBeVisible()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user