Skip to content

Commit dabbbb4

Browse files
committed
test: insert a timeout for flaky test
1 parent 94c4a00 commit dabbbb4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/packages/core/sorter/sorter.controller.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,14 @@ describe('UmbSorterController', () => {
148148
});
149149

150150
describe('enable', () => {
151-
it('sets all allowed items to draggable', () => {
152-
// [NL] I have experienced an issue with this test, it may need a little delay before testing for this. As the test relies on DOM.
151+
it('sets all allowed items to draggable', async () => {
153152
const items = element.getSortableItems();
154153
expect(items.length).to.equal(3);
154+
155+
await aTimeout(100);
156+
await element.updateComplete;
157+
158+
// Expect all items to be draggable
155159
items.forEach((item) => {
156160
expect(item.draggable).to.be.true;
157161
});

0 commit comments

Comments
 (0)