Skip to content

Commit

Permalink
fix: LEAP-724: Fix Textarea required + skipDuplicates (HumanSignal#1705)
Browse files Browse the repository at this point in the history
* Adjust test to fail with required + skipDuplicates

* Fix test to really see the problem

* Run only this test for now

* Rename validateValue in Textarea to fix validation

This method is used to validate text when it's added by user,
not to validate the entire value of Textarea result, it has different signature.
We could adjust it to validate duplicated texts on submit, but that's improvement
and we need just a fix right now.

* Return all tests

* Unrelated doc for displayMode param + fix FF comment

* Fix linting and line endings in some tests

ocr + textarea.skip-duplicates

* Fix Textarea editing

* One more missed thing
  • Loading branch information
hlomzik authored and MasherJames committed Feb 29, 2024
1 parent f1097be commit 5d9e68d
Show file tree
Hide file tree
Showing 6 changed files with 544 additions and 538 deletions.
6 changes: 3 additions & 3 deletions e2e/tests/ocr.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Scenario('Drawing multiple blank regions and then attaching labels', async ({ I,
'ff_front_1170_outliner_030222_short': true,
});
I.amOnPage('/');
LabelStudio.init({ config: createConfig( ), data });
LabelStudio.init({ config: createConfig(), data });
AtImageView.waitForImage();
AtSettings.open();
AtSettings.setGeneralSettings({
Expand Down Expand Up @@ -192,12 +192,12 @@ Scenario('Drawing multiple blank regions and then attaching labels', async ({ I,
}
session('Deserialization', () => {
I.amOnPage('/');
LabelStudio.init({ config: createConfig( ), data, annotations: [{ id: 'test', result: results }] });
LabelStudio.init({ config: createConfig(), data, annotations: [{ id: 'test', result: results }] });
AtImageView.waitForImage();
AtOutliner.seeRegions(regions.length);
for (const [idx, region] of Object.entries(regions)) {
if (region.text) {
I.seeInField(AtOutliner.locateRegionIndex((+idx)+1).find('.lsf-textarea-tag__input'), region.text);
I.seeInField(AtOutliner.locateRegionIndex((+idx) + 1).find('.lsf-textarea-tag__input'), region.text);
}
}
});
Expand Down
Loading

0 comments on commit 5d9e68d

Please sign in to comment.