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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Feature("Video meta").tag("@regress");
 
const VIDEO = "./public/files/opossum_intro.webm";
 
Scenario("Filling meta in video regions", async ({ I, LabelStudio, AtVideoView, AtOutliner, AtDetails }) => {
  I.amOnPage("/");
  LabelStudio.init({
    config: `
<View>
  <Video name="video" value="$video"></Video>
  <VideoRectangle name="box" toName="video" />
  <Labels name="tag" toName="video">
    <Label value="" background="green" hotkey="1"/>
    <Label value="Label 1" background="blue" hotkey="2"/>
  </Labels>
</View>
`,
    data: {
      video: VIDEO,
    },
    annotations: [
      {
        id: "test",
        result: [
          {
            value: {
              sequence: [
                {
                  frame: 1,
                  enabled: true,
                  x: 10,
                  y: 10,
                  width: 20,
                  height: 10,
                  rotation: 0,
                  time: 0.041666666666666664,
                },
              ],
              framesCount: 1009,
            },
            id: "test_1",
            from_name: "box",
            to_name: "video",
            type: "videorectangle",
            origin: "manual",
          },
          {
            value: {
              sequence: [
                {
                  frame: 1,
                  enabled: true,
                  x: 40,
                  y: 10,
                  width: 20,
                  height: 10,
                  rotation: 0,
                  time: 0.041666666666666664,
                },
              ],
              framesCount: 1009,
            },
            id: "test_2",
            from_name: "box",
            to_name: "video",
            type: "videorectangle",
            origin: "manual",
          },
        ],
      },
    ],
  });
  LabelStudio.waitForObjectsReady();
 
  const META_1 = "Some meta";
  const META_2 = "Some other meta";
 
  AtOutliner.seeRegions(2);
  AtOutliner.clickRegion(2);
 
  I.say("Fill a meta for the 2nd region");
  AtDetails.clickEditMeta();
  AtDetails.fillMeta(META_1);
  I.say("Reselect region and check the meta");
  AtOutliner.clickRegion(1);
  AtOutliner.clickRegion(2);
  I.see(META_1);
 
  I.say("Fill a meta for the 1st region");
  AtOutliner.clickRegion(1);
  AtDetails.clickEditMeta();
  AtDetails.fillMeta(META_2);
  I.say("Reset selection by clicking on the canvas");
  I.click(AtVideoView.videoLocate());
  I.say("Check meta for the 1st region");
  AtOutliner.clickRegion(1);
  I.see(META_2);
});