使用playwright内置test
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { describe, it, expect } from '@jest/globals'
|
||||
import { test } from '@playwright/test'
|
||||
import { chromium } from "playwright";
|
||||
|
||||
describe("mes登录", function () {
|
||||
test.describe("mes登录", function () {
|
||||
|
||||
it('login', async function () {
|
||||
test('login', async function () {
|
||||
const browser = await chromium.launch({
|
||||
// headless: false
|
||||
});
|
||||
@@ -32,7 +32,7 @@ describe("mes登录", function () {
|
||||
|
||||
await page.waitForTimeout(1000)
|
||||
let path = await page.evaluateHandle(()=>window.location.hash.substr(1))
|
||||
expect(await path.jsonValue()).toEqual('/dashboard')
|
||||
test.expect(await path.jsonValue()).toEqual('/dashboard')
|
||||
|
||||
|
||||
// ---------------------
|
||||
|
Reference in New Issue
Block a user