Skip to content

Commit

Permalink
統計は不要なので削除
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Dec 8, 2024
1 parent e8a76a4 commit 0d85584
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions tests/type_switched.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,47 +50,6 @@ test('data_channel_signaling_only type:switched pages', async ({ browser }) => {
const value3 = await msg.args()[2].jsonValue()
expect(value3).toBe('websocket')

// 'Get Stats' ボタンをクリックして統計情報を取得
await dataChannelSignalingOnly.click('#get-stats')

// 統計情報が表示されるまで待機
await dataChannelSignalingOnly.waitForSelector('#stats-report')
// データセットから統計情報を取得
const dataChannelSignalingOnlyStatsReportJson: Record<string, unknown>[] =
await dataChannelSignalingOnly.evaluate(() => {
const statsReportDiv = document.querySelector('#stats-report') as HTMLDivElement
return statsReportDiv ? JSON.parse(statsReportDiv.dataset.statsReportJson || '[]') : []
})

// sendonly audio codec
const dataChannelSignalingOnlyAudioCodecStats = dataChannelSignalingOnlyStatsReportJson.find(
(report) => report.type === 'codec' && report.mimeType === 'audio/opus',
)
expect(dataChannelSignalingOnlyAudioCodecStats).toBeDefined()

// sendonly audio outbound-rtp
const dataChannelSignalingOnlyAudioOutboundRtp = dataChannelSignalingOnlyStatsReportJson.find(
(report) => report.type === 'outbound-rtp' && report.kind === 'audio',
)
expect(dataChannelSignalingOnlyAudioOutboundRtp).toBeDefined()
expect(dataChannelSignalingOnlyAudioOutboundRtp?.bytesSent).toBeGreaterThan(0)
expect(dataChannelSignalingOnlyAudioOutboundRtp?.packetsSent).toBeGreaterThan(0)

// sendonly video codec
const dataChannelSignalingOnlyVideoCodecStats = dataChannelSignalingOnlyStatsReportJson.find(
(stats) => stats.type === 'codec' && stats.mimeType === 'video/VP9',
)
expect(dataChannelSignalingOnlyVideoCodecStats).toBeDefined()

// sendonly video outbound-rtp
const dataChannelSignalingOnlyVideoOutboundRtpStats =
dataChannelSignalingOnlyStatsReportJson.find(
(stats) => stats.type === 'outbound-rtp' && stats.kind === 'video',
)
expect(dataChannelSignalingOnlyVideoOutboundRtpStats).toBeDefined()
expect(dataChannelSignalingOnlyVideoOutboundRtpStats?.bytesSent).toBeGreaterThan(0)
expect(dataChannelSignalingOnlyVideoOutboundRtpStats?.packetsSent).toBeGreaterThan(0)

await dataChannelSignalingOnly.click('#disconnect')

await dataChannelSignalingOnly.close()
Expand Down

0 comments on commit 0d85584

Please sign in to comment.