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
const assert = require("assert");
const { serialize } = require("./helpers");
 
Feature("Text Area");
 
const config = `
<View> 
  <Text name="text" size="10" value="$text"/> 
  <TextArea name="ta" toName="text"></TextArea> 
</View>
`;
 
const data = {
  text: "To have faith is to trust yourself to the water",
};
 
const params = { annotations: [{ id: "test", result: [] }], config, data };
 
Scenario("Check if text area is saving lead_time", async ({ I, LabelStudio, AtTextAreaView }) => {
  I.amOnPage("/");
  LabelStudio.setFeatureFlags({
    fflag_fix_front_lsdv_4600_lead_time_27072023_short: true,
  });
 
  LabelStudio.init(params);
 
  AtTextAreaView.addNewTextTag("abcabc");
 
  AtTextAreaView.addNewTextTag("abc abc abc abc");
 
  AtTextAreaView.addNewTextTag("cba cba cba");
 
  const result = await I.executeScript(serialize);
 
  assert.notEqual(result[0]?.meta?.lead_time ?? 0, 0, "Lead time is not saved");
});