Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix annotation button test
  • Loading branch information
Gondragos committed Oct 12, 2023
commit 541a270dd51e0714a0b9a6312beb41dd9e0e30cb
8 changes: 5 additions & 3 deletions e2e/tests/regression-tests/annotation-button.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ Scenario('Annotation button should keep border width on hover', async ({ I, Labe
],
});

const borderWidth = await I.executeScript(()=>{
LabelStudio.waitForObjectsReady();
I.seeElement('.lsf-annotation-button:nth-child(2)');
const borderWidth = await I.executeScript(() => {
const el = document.querySelector('.lsf-annotation-button:nth-child(2)');
const borderWidth = window.getComputedStyle(el).getPropertyValue('border-width');

Expand All @@ -36,7 +38,7 @@ Scenario('Annotation button should keep border width on hover', async ({ I, Labe

I.moveCursorTo('.lsf-annotation-button:nth-child(2)');

const borderWidthHovered = await I.executeScript(()=>{
const borderWidthHovered = await I.executeScript(() => {
const el = document.querySelector('.lsf-annotation-button:nth-child(2)');
const borderWidth = window.getComputedStyle(el).getPropertyValue('border-width');

Expand All @@ -48,4 +50,4 @@ Scenario('Annotation button should keep border width on hover', async ({ I, Labe
borderWidthHovered,
'Annotation button\'s border width should not change on hover',
);
});
});