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
Feature("Readonly Annotation");
 
const imageExamples = new DataTable(["example", "regionName"]);
 
imageExamples.add([require("../../../examples/classification"), "Walk"]);
 
Data(imageExamples).Scenario("Classification Readonly Annotations", async ({ I, current, LabelStudio }) => {
  LabelStudio.setFeatureFlags({
    fflag_fix_front_lsdv_4600_lead_time_27072023_short: true,
  });
 
  I.amOnPage("/");
  const { config, result, data } = current.example;
 
  const params = {
    annotations: [
      {
        id: "test",
        readonly: true,
        result,
      },
    ],
    config,
    data,
  };
 
  LabelStudio.init(params);
 
  /**
   * Checking the Number input
   */
  I.say("Checking the Number input");
  I.say("Check number not editable");
  I.seeElement(".lsf-number input:disabled");
 
  /**
   * Checking the Textarea input
   */
  I.say("Checking the number TextArea");
  I.say("Check textarea is not editable");
  I.seeElement('[aria-label="TextArea Input"]:disabled');
  I.say("Try to input anyways");
  I.fillField('[aria-label="TextArea Input"]', "Hello world");
  I.pressKey("Enter");
 
  I.say("Check region is not editable");
  I.dontSee('.lsf-text-area [aria-label="Edit Region"]');
 
  I.say("Check region is not deletable");
  I.dontSee('.lsf-text-area [aria-label="Delete Region"]');
 
  /**
   * Checking the Choices
   */
  I.say("Checking the Choices");
  I.seeElement(".lsf-choices input:disabled");
 
  I.say("Try selecting anyways");
  I.checkOption("Choice 1", ".lsf-choices");
 
  /**
   * Checking the Taxonomy input
   */
  I.say("Checking the Taxonomy input");
  I.click("Click to add...", ".htx-taxonomy");
  I.seeElement(".htx-taxonomy input:disabled");
 
  I.say("Checking selected values");
  I.dontSee({ css: ".htx-taxonomy-selected input[type=button]" });
 
  I.say("Try selecting anyways");
  I.see("Choice 1", ".htx-taxonomy");
 
  I.say("Results are equal after editing attempt");
  await LabelStudio.resultsNotChanged(result);
});