Blame view

Yi.Vben5.Vue3/playground/__tests__/e2e/auth-login.spec.ts 568 Bytes
515fceeb   “wangming”   框架初始化
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  import { expect, test } from '@playwright/test';
  
  import { authLogin } from './common/auth';
  
  test.beforeEach(async ({ page }) => {
    await page.goto('/');
  });
  
  test.describe('Auth Login Page Tests', () => {
    test('check title and page elements', async ({ page }) => {
      // 获取页面标题并断言标题包含 'Vben Admin'
      const title = await page.title();
      expect(title).toContain('Vben Admin');
    });
  
    // 测试用例: 成功登录
    test('should successfully login with valid credentials', async ({ page }) => {
      await authLogin(page);
    });
  });