使用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('平台', function(){
|
||||
test.describe('平台', function(){
|
||||
|
||||
it('登陆', async function(){
|
||||
test('登陆', async function(){
|
||||
|
||||
const browser = await chromium.launch({
|
||||
// headless: false
|
||||
@@ -30,7 +30,7 @@ describe('平台', function(){
|
||||
|
||||
let path = await page.evaluateHandle(()=>window.location.pathname);
|
||||
|
||||
expect(await path.jsonValue()).not.toEqual('/user-login.html')
|
||||
test.expect(await path.jsonValue()).not.toEqual('/user-login.html')
|
||||
|
||||
// ---------------------
|
||||
await context.close();
|
||||
|
Reference in New Issue
Block a user