test: cover session expiry messaging
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-11 15:31:52 -04:00
parent f1190fa806
commit 255848fcaa
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -1,5 +1,6 @@
import LoginPage from './LoginPage.vue';
import { expect, userEvent, within } from '@storybook/test';
import { storybookRouter } from '../../.storybook/router.js';
export default { title: 'Pages/LoginPage', component: LoginPage };
export const Empty = {};
@@ -20,3 +21,11 @@ export const ErrorFocus = {
}
},
};
export const SessionExpired = {
beforeEach: async () => { await storybookRouter.push({ name: 'login', query: { reason: 'session-expired' } }); },
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
await expect(canvas.getByRole('alert')).toHaveTextContent('Your session expired. Sign in again to continue.');
},
};