Skip to content

Commit e2e8dc3

Browse files
Fixed test to align with correct exception.
1 parent 785f717 commit e2e8dc3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/IntegrationTests/MediaDevicesNotSupportedTest.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ public class MediaDevicesNotSupportedTest(string browserName) : BlazorTest(brows
77
protected override string[] Args => [];
88

99
[Test]
10-
public async Task GetUserMedia_Throws_NotSupportedErrorException_WhenNotSupported()
10+
public async Task GetUserMedia_Throws_NotFoundErrorException_Or_NotSupportedErrorException_WhenNotSupported()
1111
{
1212
// Arrange
1313
await using MediaDevices mediaDevices = await MediaDevicesService.GetMediaDevicesAsync();
1414

1515
// Assert
16-
Assert.ThrowsAsync<NotSupportedErrorException>(async () => await mediaDevices.GetUserMediaAsync(new() { Audio = true }));
16+
Assert.ThrowsAsync(
17+
Is.AssignableTo<NotFoundErrorException>()
18+
.Or.AssignableTo<NotSupportedErrorException>(),
19+
async () => await mediaDevices.GetUserMediaAsync(new() { Audio = true })
20+
);
1721
}
1822
}

0 commit comments

Comments
 (0)