Skip to content

Commit

Permalink
片方向だけ
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Feb 21, 2024
1 parent 0fc0646 commit 1b80b29
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 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.skip('messaging recvonly pages', async ({ browser }) => {
test('messaging pages', async ({ browser }) => {
// 新しいページを2つ作成
const page1 = await browser.newPage()
const page2 = await browser.newPage()
Expand Down Expand Up @@ -32,17 +32,17 @@ test.skip('messaging recvonly pages', async ({ browser }) => {
console.log(`Received message on page2: ${receivedMessage1}`)
test.expect(receivedMessage1).toBe('Hello from page1')

// page2からpage1へメッセージを送信
await page2.fill('input[name="message"]', 'Hello from page2')
await page2.click('#send-message')
// // page2からpage1へメッセージを送信
// await page2.fill('input[name="message"]', 'Hello from page2')
// 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')
// // 受信したメッセージが期待したものであるか検証
// console.log(`Received message on page1: ${receivedMessage2}`)
// test.expect(receivedMessage2).toBe('Hello from page2')

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

0 comments on commit 1b80b29

Please sign in to comment.