Skip to content

Commit

Permalink
fixup! revised e2e test cases based on enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
eric2788 committed Apr 13, 2024
1 parent 73c5278 commit b9b2476
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/content.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ test('測試弹出直播视窗按鈕', async ({ context, optionPageUrl, content
})


test('測試大海報房間下返回非海报界面按鈕', async ({ context, themeRoom: room }) => {
test('測試大海報房間下返回非海报界面按鈕', async ({ context, room, isThemeRoom }) => {

test.skip(!isThemeRoom, '此測試只適用於大海報房間')

const content = await room.getContentLocator()
await content.locator('body').scrollIntoViewIfNeeded()
Expand Down
11 changes: 10 additions & 1 deletion tests/features/recorder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,16 @@ test('測試 WEBM 錄製 - 更換視頻源時的處理', async ({ content, page,
expect(info.relativeDuration()).toBeGreaterThanOrEqual(5)
})

test('測試 WEBM 錄製 - 不解除靜音的處理', async ({ content, page, api, room, optionPageUrl, context }) => {
test('測試 WEBM 錄製 - 不解除靜音的處理', async ({ content, page, optionPageUrl, context }) => {

// first, we need to mute the video
await content.waitForSelector('video')
await content.evaluate(() => {
const video = document.querySelector('video')
if (video?.muted === false) {
video.muted = true
}
})

page.on('dialog', d => {
if (d.message().includes('解除静音')) {
Expand Down

0 comments on commit b9b2476

Please sign in to comment.