fix: 完善打包历史与登录提示
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user