Bin
2025-12-16 9e0b2ba2c317b1a86212f24cbae3195ad1f3dbfa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { AudioView, LabelStudio } from "@humansignal/frontend-test/helpers/LSF";
import {
  audioErrorsConfig,
  audioDecoderErrorData,
  audioHttpErrorData,
  audioErrorsAnnotations,
} from "../../data/audio/audio_errors";
 
describe("Audio Errors", () => {
  beforeEach(() => {
    LabelStudio.setFeatureFlagsOnPageLoad({
      ff_front_dev_2715_audio_3_280722_short: true,
    });
  });
 
  it("Check if audio decoder error handler is showing", () => {
    LabelStudio.params()
      .config(audioErrorsConfig)
      .data(audioDecoderErrorData)
      .withResult(audioErrorsAnnotations)
      .init();
 
    LabelStudio.waitForObjectsReady();
 
    // Check for the error message using the helper method
    AudioView.hasError("An error occurred while decoding the audio file");
  });
 
  it("Check if audio http error handler is showing", () => {
    LabelStudio.params().config(audioErrorsConfig).data(audioHttpErrorData).withResult(audioErrorsAnnotations).init();
 
    LabelStudio.waitForObjectsReady();
 
    // Check for the HTTP error message using the helper method
    AudioView.hasError("HTTP error status: 404");
  });
});