diff --git a/frontend/e2e/.auth/user-tutorial.json b/frontend/e2e/.auth/user-tutorial.json index 38af82e..47a74a1 100644 --- a/frontend/e2e/.auth/user-tutorial.json +++ b/frontend/e2e/.auth/user-tutorial.json @@ -2,20 +2,20 @@ "cookies": [ { "name": "refresh_token", - "value": "ND-PngBFXIuDrD3eLsaPs1mWqwzusUSI6nPw-M3JjJo", + "value": "5gEK_iLdGl1BAGfetT8hEf6SJK2lQVbYxQjH0BdKWwU", "domain": "localhost", "path": "/api/auth", - "expires": 1792774029.131567, + "expires": 1792813397.168935, "httpOnly": true, "secure": true, "sameSite": "Strict" }, { "name": "access_token", - "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS10dXRvcmlhbEB0ZXN0LmNvbSIsInVzZXJfaWQiOiJkM2E5OWI5MC1kZDdlLTQ5MjQtYTZkZS1hMWU1OTcxMTE3NDciLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3ODUwMDg4Mjl9.ey7BplN-ghoJ8OGMkdOJavVAYVM_bv_xRBrtL02ASjQ", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS10dXRvcmlhbEB0ZXN0LmNvbSIsInVzZXJfaWQiOiJkODk0ZjA0OS0xODU3LTQwM2UtYjgzZC1jMTY2NTNmZDU2MmEiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3ODUwNDgxOTd9.S7frWOrZwXC5xVgtG2RDioXGok04qK_jLCYWvfedD7s", "domain": "localhost", "path": "/", - "expires": 1785008829.130873, + "expires": 1785048197.167997, "httpOnly": true, "secure": true, "sameSite": "Lax" @@ -27,11 +27,11 @@ "localStorage": [ { "name": "authSyncEvent", - "value": "{\"type\":\"logout\",\"at\":1784998028750}" + "value": "{\"type\":\"logout\",\"at\":1785037396813}" }, { "name": "parentAuth", - "value": "{\"expiresAt\":1785170829369}" + "value": "{\"expiresAt\":1785210197388}" } ] } diff --git a/frontend/e2e/.auth/user.json b/frontend/e2e/.auth/user.json index b02a4a8..2f1c2f2 100644 --- a/frontend/e2e/.auth/user.json +++ b/frontend/e2e/.auth/user.json @@ -2,20 +2,20 @@ "cookies": [ { "name": "refresh_token", - "value": "PbjRbjt9aqRjxoNjBDVJTuDsEEzgUPoplaNgzhOOwdQ", + "value": "Ke6qDj_0RYyrMSI1Z9C69DPtvYo26oUUiLZr_pDXZv4", "domain": "localhost", "path": "/api/auth", - "expires": 1792774174.76082, + "expires": 1792813392.716776, "httpOnly": true, "secure": true, "sameSite": "Strict" }, { "name": "access_token", - "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZUB0ZXN0LmNvbSIsInVzZXJfaWQiOiI4YzU1MWFiNi1lNmMxLTQ1MzgtOTEzNS0xNDgwN2M2NjM0OTQiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3ODUwMDg5NzR9._hCAKJRJgq4gcDKppcjkcWf9nX94wjBfa4J94Lh2ZlI", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZUB0ZXN0LmNvbSIsInVzZXJfaWQiOiI3NTYwZDBlNy1iMmVlLTRiMjktYTYwNi1lZTM3NmIzN2Y3ODciLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3ODUwNDgxOTJ9.QB4bXo88KC7jr94QSjJI3Y1eVWeU4KNKdHRi1_7zcD0", "domain": "localhost", "path": "/", - "expires": 1785008974.760293, + "expires": 1785048192.71579, "httpOnly": true, "secure": true, "sameSite": "Lax" @@ -27,11 +27,11 @@ "localStorage": [ { "name": "authSyncEvent", - "value": "{\"type\":\"logout\",\"at\":1784998174529}" + "value": "{\"type\":\"logout\",\"at\":1785037392502}" }, { "name": "parentAuth", - "value": "{\"expiresAt\":1785170974948}" + "value": "{\"expiresAt\":1785210192904}" } ] } diff --git a/frontend/e2e/mode_parent/tutorial/dialog-help-button.spec.ts b/frontend/e2e/mode_parent/tutorial/dialog-help-button.spec.ts index 1a0ed1f..3db1cdd 100644 --- a/frontend/e2e/mode_parent/tutorial/dialog-help-button.spec.ts +++ b/frontend/e2e/mode_parent/tutorial/dialog-help-button.spec.ts @@ -285,4 +285,43 @@ test.describe('Dialog help button and titles', () => { await expect(modalBackdrop(page)).not.toBeVisible({ timeout: 3000 }) await expect(helpButton(page)).toBeVisible({ timeout: 5000 }) }) + + test('help button replays the full tutorial chain when tutorial tips are disabled', async ({ + page, + request, + }) => { + await setTutorialEnabled(request, false) + await resetTutorialProgress(request) + + await page.goto(`/parent/${childId}`) + await expect(page.getByText(CHILD_NAME, { exact: true }).first()).toBeVisible({ timeout: 10000 }) + await expect(page.locator('.tutorial-root .card')).not.toBeVisible() + await expect(helpButton(page)).toBeVisible({ timeout: 5000 }) + + await helpButton(page).click() + + const cardTitle = page.locator('.tutorial-root .card .title') + await expect(cardTitle).toHaveText("This is your child's page") + + await page.locator('.tutorial-root .btn-primary').click() + await expect(cardTitle).toHaveText('Assign chores') + + await page.locator('.tutorial-root .btn-primary').click() + await expect(cardTitle).toHaveText('Assign kindness acts') + + await page.locator('.tutorial-root .btn-primary').click() + await expect(cardTitle).toHaveText('Assign rewards') + + await page.locator('.tutorial-root .btn-primary').click() + await expect(cardTitle).toHaveText('Assign routines') + + await page.locator('.tutorial-root .btn-primary').click() + await expect(cardTitle).toHaveText('Assign penalties') + + await page.locator('.tutorial-root .btn-primary').click() + await expect(cardTitle).toHaveText('Quick actions') + + await page.locator('.tutorial-root .btn-primary').click() + await expect(page.locator('.tutorial-root .card')).not.toBeVisible() + }) }) diff --git a/frontend/src/components/profile/UserProfile.vue b/frontend/src/components/profile/UserProfile.vue index e81c39b..574617f 100644 --- a/frontend/src/components/profile/UserProfile.vue +++ b/frontend/src/components/profile/UserProfile.vue @@ -49,7 +49,12 @@ Change Parent PIN - + Change Password @@ -174,7 +179,7 @@ title="Tutorial Restart" @close="showRestartSuccess = false" > - Tutorial mode has been restarted + Tutorial mode has been restarted. OK diff --git a/frontend/src/tutorial/HelpButton.vue b/frontend/src/tutorial/HelpButton.vue index b9e8fb0..6ad20cc 100644 --- a/frontend/src/tutorial/HelpButton.vue +++ b/frontend/src/tutorial/HelpButton.vue @@ -14,7 +14,7 @@