add timeouts

This commit is contained in:
Mads Rasmussen
2025-01-30 23:15:47 +01:00
parent 9827cfd87e
commit be7fe21099

View File

@@ -120,17 +120,19 @@ describe('UmbSorterController', () => {
expect(items.length).to.equal(4);
});
it('sets all allowed draggable items to draggable', () => {
it('sets all allowed draggable items to draggable', async () => {
const items = element.getSortableItems();
expect(items.length).to.equal(3);
await aTimeout(100);
items.forEach((item) => {
expect(item.draggable).to.be.true;
});
});
it('sets all disabled items non draggable', () => {
it('sets all disabled items non draggable', async () => {
const items = element.getDisabledItems();
expect(items.length).to.equal(1);
await aTimeout(100);
items.forEach((item) => {
expect(item.draggable).to.be.false;
});
@@ -138,9 +140,10 @@ describe('UmbSorterController', () => {
});
describe('disable', () => {
it('sets all items to non draggable', () => {
it('sets all items to non draggable', async () => {
element.sorter.disable();
const items = element.getAllItems();
await aTimeout(100);
items.forEach((item) => {
expect(item.draggable).to.be.false;
});
@@ -161,9 +164,10 @@ describe('UmbSorterController', () => {
});
});
it('sets all disabled items non draggable', () => {
it('sets all disabled items non draggable', async () => {
const items = element.getDisabledItems();
expect(items.length).to.equal(1);
await aTimeout(100);
items.forEach((item) => {
expect(item.draggable).to.be.false;
});