This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: DEV-2408: Regions disappearing from UI (#631)
* fix: DEV-2408: Regions disappearing from UI * test: DEV-2408: Add test for wrong reordered results of per-region textarea and richtext
- Loading branch information
Showing
2 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* global Feature, Scenario */ | ||
|
||
Feature("Wrong ordered results deserialization").tag("@regress"); | ||
|
||
Scenario("Combining results of per-region textarea and richtext regions.", async ({ I, LabelStudio, AtSidebar }) => { | ||
I.amOnPage("/"); | ||
|
||
LabelStudio.init({ | ||
annotations: [ | ||
{ | ||
id: "test", result: [ | ||
|
||
{ | ||
id: "id_1", | ||
from_name: "comment", | ||
to_name: "text", | ||
type: "textarea", | ||
value: { | ||
start: 0, | ||
end: 11, | ||
text: ["That's true"], | ||
}, | ||
}, | ||
{ | ||
id: "id_1", | ||
from_name: "labels", | ||
to_name: "text", | ||
type: "labels", | ||
value: { | ||
start: 0, | ||
end: 11, | ||
labels: ["Label 1"], | ||
text: "Just a text", | ||
}, | ||
}, | ||
], | ||
}], | ||
config: ` | ||
<View> | ||
<Labels name="labels" toname="text"> | ||
<Label value="Label 1"/> | ||
</Labels> | ||
<Text name="text" value="$text" /> | ||
<Textarea name="comment" toname="text" perregion="true"/> | ||
</View>`, | ||
data: { text: "Just a text" }, | ||
}); | ||
|
||
AtSidebar.seeRegions(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters