This commit is contained in:
@@ -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.');
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user