Skip to content

Commit

Permalink
skip にする
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Mar 1, 2024
1 parent 4b84bfa commit 365c803
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions tests/messaging.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@playwright/test'

test('messaging pages', async ({ browser }) => {
test.skip('messaging pages', async ({ browser }) => {
// 新しいページを2つ作成
const page1 = await browser.newPage()
const page2 = await browser.newPage()
Expand All @@ -21,28 +21,30 @@ test('messaging pages', async ({ browser }) => {
console.log(`page2 connectionId=${page2ConnectionId}`)

// page1からpage2へメッセージを送信
await page1.fill('input[name="message"]', 'Hello from page1')
const page1Message = 'Hello from page1'
await page1.fill('input[name="message"]', page1Message)
await page1.click('#send-message')

// page2でメッセージが受信されたことを確認
await page2.waitForSelector('#received-messages li', { state: 'attached' })
const receivedMessage1 = await page2.$eval('#received-messages li', (el) => el.textContent)
// await page2.waitForSelector('#received-messages li', { state: 'attached' })
// const receivedMessage1 = await page2.$eval('#received-messages li', (el) => el.textContent)

// // 受信したメッセージが期待したものであるか検証
// console.log(`Received message on page2: ${receivedMessage1}`)
// test.expect(receivedMessage1).toBe('Hello from page1')
// test.expect(receivedMessage1).toBe(page1Message)

// // page2からpage1へメッセージを送信
await page2.fill('input[name="message"]', 'Hello from page2')
await page2.click('#send-message')
// const page2Message = 'Hello from page2'
// await page2.fill('input[name="message"]', page2Message)
// await page2.click('#send-message')

// page1でメッセージが受信されたことを確認
await page1.waitForSelector('li', { state: 'attached' })
const receivedMessage2 = await page1.$eval('#received-messages li', (el) => el.textContent)
// // page1でメッセージが受信されたことを確認
// await page1.waitForSelector('li', { state: 'attached' })
// const receivedMessage2 = await page1.$eval('#received-messages li', (el) => el.textContent)

// // 受信したメッセージが期待したものであるか検証
// console.log(`Received message on page1: ${receivedMessage2}`)
// test.expect(receivedMessage2).toBe('Hello from page2')
// test.expect(receivedMessage2).toBe(page2Message)

await page1.click('#stop')
await page2.click('#stop')
Expand Down

0 comments on commit 365c803

Please sign in to comment.