mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Add unit tests for fileActionsReady
This commit is contained in:
parent
8bdce6698c
commit
89ff2857fc
1 changed files with 14 additions and 0 deletions
|
|
@ -753,6 +753,20 @@ describe('OCA.Files.FileList tests', function() {
|
|||
fileList.setFiles(testFiles);
|
||||
expect(handler.calledOnce).toEqual(true);
|
||||
});
|
||||
it('triggers "fileActionsReady" event after single add', function() {
|
||||
var handler = sinon.stub();
|
||||
fileList.setFiles(testFiles);
|
||||
fileList.$fileList.on('fileActionsReady', handler);
|
||||
fileList.add({name: 'test.txt'});
|
||||
expect(handler.calledOnce).toEqual(true);
|
||||
});
|
||||
it('does not trigger "fileActionsReady" event after single add with silent argument', function() {
|
||||
var handler = sinon.stub();
|
||||
fileList.setFiles(testFiles);
|
||||
fileList.$fileList.on('fileActionsReady', handler);
|
||||
fileList.add({name: 'test.txt'}, {silent: true});
|
||||
expect(handler.notCalled).toEqual(true);
|
||||
});
|
||||
it('triggers "updated" event after update', function() {
|
||||
var handler = sinon.stub();
|
||||
fileList.$fileList.on('updated', handler);
|
||||
|
|
|
|||
Loading…
Reference in a new issue