-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove iron-resizable-behavior from board (#3211)
- Loading branch information
1 parent
cf34d87
commit 7836d86
Showing
8 changed files
with
96 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import sinon from 'sinon'; | ||
|
||
/** | ||
* Resolves once the function is invoked on the given object. | ||
*/ | ||
function onceInvoked(object, functionName) { | ||
return new Promise((resolve) => { | ||
const stub = sinon.stub(object, functionName).callsFake((...args) => { | ||
stub.restore(); | ||
object[functionName](...args); | ||
resolve(); | ||
}); | ||
}); | ||
} | ||
|
||
/** | ||
* Resolves once the ResizeObserver in BoardRow has processed a resize. | ||
*/ | ||
export async function onceResized(boardRow) { | ||
await onceInvoked(boardRow, '_onResize'); | ||
} | ||
|
||
/** | ||
* Resolves once the ResizeObserver in all the BoardRows has processed a resize. | ||
*/ | ||
export function allResized(boardRows) { | ||
return Promise.all(boardRows.map((boardRow) => onceResized(boardRow))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.