Skip to content

Commit

Permalink
page2 からもメッセージを送ってみる
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Mar 1, 2024
1 parent 2fb9e50 commit ca33023
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/messaging.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ test('messaging 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}`)
Expand Down

0 comments on commit ca33023

Please sign in to comment.