fix: 完善打包历史与登录提示

This commit is contained in:
shenlei
2026-07-20 14:54:06 +09:00
parent c209ae423c
commit 3e3e4123d0
5 changed files with 31 additions and 16 deletions
+11
View File
@@ -65,6 +65,17 @@ describe('App.vue', () => {
expect(wrapper.find('.login-modal').exists()).toBe(true)
})
it('登录框不展示默认管理员账号密码', async () => {
const router = createMockRouter()
const wrapper = mount(App, {
global: { plugins: [router] },
})
await wrapper.find('.btn-login').trigger('click')
expect(wrapper.find('.login-modal').text()).not.toContain('默认账号')
expect(wrapper.find('.login-modal').text()).not.toContain('admin123')
})
it('登录成功后更新状态', async () => {
fetch.mockResolvedValueOnce({
ok: true,