@@ -22,44 +22,44 @@ test('测试浮动按钮是否正常', async ({ page, browser }, testInfo) => {
2222 await expect ( floatBtn ) . toBeVisible ( )
2323} )
2424
25- for ( const url of testUrls ) {
26- test ( `docPIP能否打开 - ${ new URL ( url ) . hostname } ` , async ( {
27- page,
28- browser,
29- } ) => {
30- await page . goto ( url )
31- await onPageAndExtensionLoaded ( page )
25+ // for (const url of testUrls) {
26+ // test(`docPIP能否打开 - ${new URL(url).hostname}`, async ({
27+ // page,
28+ // browser,
29+ // }) => {
30+ // await page.goto(url)
31+ // await onPageAndExtensionLoaded(page)
3232
33- const videoEl = await page . waitForSelector ( 'video' )
34- const timer = setInterval ( async ( ) => {
35- try {
36- if ( ! videoEl || page . isClosed ( ) ) {
37- clearInterval ( timer )
38- return
39- }
40- await videoEl . dispatchEvent ( 'mousemove' , {
41- bubbles : true ,
42- } )
43- } catch ( error ) {
44- clearInterval ( timer )
45- }
46- } , 500 )
47- browser . on ( 'disconnected' , ( ) => {
48- clearInterval ( timer )
49- } )
33+ // const videoEl = await page.waitForSelector('video')
34+ // const timer = setInterval(async () => {
35+ // try {
36+ // if (!videoEl || page.isClosed()) {
37+ // clearInterval(timer)
38+ // return
39+ // }
40+ // await videoEl.dispatchEvent('mousemove', {
41+ // bubbles: true,
42+ // })
43+ // } catch (error) {
44+ // clearInterval(timer)
45+ // }
46+ // }, 500)
47+ // browser.on('disconnected', () => {
48+ // clearInterval(timer)
49+ // })
5050
51- // 点击float按钮
52- const startPipBtn = page . locator ( '.start-pip-btn' )
53- await startPipBtn . click ( )
51+ // // 点击float按钮
52+ // const startPipBtn = page.locator('.start-pip-btn')
53+ // await startPipBtn.click()
5454
55- await wait ( 1000 )
55+ // await wait(1000)
5656
57- const pipWindow = await page . evaluate ( 'documentPictureInPicture.window' )
57+ // const pipWindow = await page.evaluate('documentPictureInPicture.window')
5858
59- await expect ( pipWindow ) . not . toBeNull ( )
59+ // await expect(pipWindow).not.toBeNull()
6060
61- clearInterval ( timer )
62- } )
63- }
61+ // clearInterval(timer)
62+ // })
63+ // }
6464
6565// test('bilibili大功能测试', () => {})
0 commit comments