Skip to content

Commit be7fe21

Browse files
committed
add timeouts
1 parent 9827cfd commit be7fe21

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/Umbraco.Web.UI.Client/src/packages/core/sorter/sorter.controller.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,27 +120,30 @@ describe('UmbSorterController', () => {
120120
expect(items.length).to.equal(4);
121121
});
122122

123-
it('sets all allowed draggable items to draggable', () => {
123+
it('sets all allowed draggable items to draggable', async () => {
124124
const items = element.getSortableItems();
125125
expect(items.length).to.equal(3);
126+
await aTimeout(100);
126127
items.forEach((item) => {
127128
expect(item.draggable).to.be.true;
128129
});
129130
});
130131

131-
it('sets all disabled items non draggable', () => {
132+
it('sets all disabled items non draggable', async () => {
132133
const items = element.getDisabledItems();
133134
expect(items.length).to.equal(1);
135+
await aTimeout(100);
134136
items.forEach((item) => {
135137
expect(item.draggable).to.be.false;
136138
});
137139
});
138140
});
139141

140142
describe('disable', () => {
141-
it('sets all items to non draggable', () => {
143+
it('sets all items to non draggable', async () => {
142144
element.sorter.disable();
143145
const items = element.getAllItems();
146+
await aTimeout(100);
144147
items.forEach((item) => {
145148
expect(item.draggable).to.be.false;
146149
});
@@ -161,9 +164,10 @@ describe('UmbSorterController', () => {
161164
});
162165
});
163166

164-
it('sets all disabled items non draggable', () => {
167+
it('sets all disabled items non draggable', async () => {
165168
const items = element.getDisabledItems();
166169
expect(items.length).to.equal(1);
170+
await aTimeout(100);
167171
items.forEach((item) => {
168172
expect(item.draggable).to.be.false;
169173
});

0 commit comments

Comments
 (0)