(Vue Renderer) use setup script + remove any changes as baselines to pass UI tests.

This commit is contained in:
chakir qatab 2022-12-30 21:35:08 +04:00
parent e1dd6bdb7c
commit f9d82f1511
3 changed files with 4 additions and 4 deletions

View File

@ -37,6 +37,6 @@ export const LoggedIn: Story = {
export const LoggedOut: Story = {
args: {
user: undefined,
user: null,
},
};

View File

@ -25,7 +25,7 @@
import './header.css';
import MyButton from './Button.vue';
defineProps<{ user: { name: string } }>();
defineProps<{ user: { name: string } | null }>();
defineEmits<{
(event: 'createAccount'): void;

View File

@ -55,13 +55,13 @@ import MyHeader from './Header.vue';
import { ref } from 'vue';
const user = ref<{ name: string } | undefined>(undefined)
const user = ref<{ name: string } | null>(null)
const onLogin = () => {
user.value = { name: 'Jane Doe' };
};
const onLogout = () => {
user.value = undefined;
user.value = null;
};
const onCreateAccount = () => {
user.value = { name: 'Jane Doe' };