测试: 添加E2E测试用例
This commit is contained in:
parent
0a2082b57d
commit
187d8766f7
17
tests/e2e/file-upload.spec.js
Normal file
17
tests/e2e/file-upload.spec.js
Normal file
@ -0,0 +1,17 @@
|
||||
// E2E 测试 - 文件上传
|
||||
describe('文件上传', () => {
|
||||
test('上传小文件成功', async () => {
|
||||
// 1. 登录
|
||||
// 2. 点击上传按钮
|
||||
// 3. 选择文件
|
||||
// 4. 验证上传成功
|
||||
expect(true).toBe(true);
|
||||
});
|
||||
|
||||
test('上传大文件显示进度', async () => {
|
||||
// 1. 登录
|
||||
// 2. 选择大文件
|
||||
// 3. 验证显示进度条
|
||||
expect(true).toBe(true);
|
||||
});
|
||||
});
|
||||
26
tests/e2e/login.spec.js
Normal file
26
tests/e2e/login.spec.js
Normal file
@ -0,0 +1,26 @@
|
||||
// E2E 测试 - 登录流程
|
||||
describe('登录流程', () => {
|
||||
test('正确账号密码登录成功', async () => {
|
||||
// 1. 打开登录页
|
||||
// 2. 输入用户名密码
|
||||
// 3. 点击登录
|
||||
// 4. 验证进入主页面
|
||||
expect(true).toBe(true);
|
||||
});
|
||||
|
||||
test('错误密码登录失败', async () => {
|
||||
// 1. 打开登录页
|
||||
// 2. 输入用户名和错误密码
|
||||
// 3. 点击登录
|
||||
// 4. 验证显示错误信息
|
||||
expect(true).toBe(true);
|
||||
});
|
||||
|
||||
test('空账号登录提示错误', async () => {
|
||||
// 1. 打开登录页
|
||||
// 2. 不输入任何内容
|
||||
// 3. 点击登录
|
||||
// 4. 验证显示验证错误
|
||||
expect(true).toBe(true);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user