Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit de154eb

Browse files
authored
test: LSDV-4943: Fix MIG Brush test (#1312)
Fix MIG Brush test (cherry picked from commit c58cdab)
1 parent ca3586f commit de154eb

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

e2e/fragments/AtImageView.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,28 @@ module.exports = {
1010
_toolBarSelector: '.lsf-toolbar',
1111
_zoomPresetsSelector: '[title^="Zoom presets"]',
1212

13+
_rootSelector: '[class^="lsf-object wrapperComponent--"]',
14+
_paginationSelector: '[class^="pagination--"]',
15+
_paginationPrevBtnSelector: '.lsf-pagination__btn_arrow-left:not(.lsf-pagination__btn_arrow-left-double)',
16+
_paginationNextBtnSelector: '.lsf-pagination__btn_arrow-right:not(.lsf-pagination__btn_arrow-right-double)',
17+
18+
19+
locateRoot() {
20+
return locate(this._rootSelector);
21+
},
22+
23+
locate(locator) {
24+
const rootLocator = this.locateRoot();
25+
26+
return locator ? rootLocator.find(locator) : rootLocator;
27+
},
28+
29+
locatePagination(locator) {
30+
const paginationLocator = this.locate(this._paginationSelector);
31+
32+
return locator ? paginationLocator.find(locator) : paginationLocator;
33+
},
34+
1335
percToX(xPerc) {
1436
return this._stageBBox.width * xPerc / 100;
1537
},
@@ -314,4 +336,16 @@ module.exports = {
314336

315337
await this.waitForImage();
316338
},
339+
340+
async multiImageGoForward() {
341+
I.click(this.locatePagination(this._paginationNextBtnSelector));
342+
343+
await this.waitForImage();
344+
},
345+
346+
async multiImageGoBackward() {
347+
I.click(this.locatePagination(this._paginationPrevBtnSelector));
348+
349+
await this.waitForImage();
350+
},
317351
};

e2e/tests/image-list.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ Scenario('No errors during brush export in MIG', async ({ I, LabelStudio, AtImag
277277
AtLabels.clickLabel('Moonwalker');
278278
AtImageView.drawThroughPoints(brushRegionPoints);
279279

280-
await AtImageView.multiImageGoForwardWithHotkey();
280+
// @todo: We cannot use these hotkeys due to duplicating regions action used the same hotkey
281+
// await AtImageView.multiImageGoForwardWithHotkey();
282+
await AtImageView.multiImageGoForward();
281283

282284
I.pressKey('u');
283285
I.say('Create brush regions on the second image');

0 commit comments

Comments
 (0)