Created
December 30, 2014 19:06
-
-
Save ryanhanks-wf/43302cbfcf06cc911f64 to your computer and use it in GitHub Desktop.
test for add pdf to legacy binder manager
This file contains hidden or 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
| 'add a pdf to existing binder manager': function () { | |
| var binder = { | |
| name: 'Add a PDF to existing binder manager' | |
| }; | |
| return this.remote | |
| .buildBinder(binder) | |
| .then(function(val) { | |
| this.get(require.toUrl('http://localhost:8010/books/' + val.contentKey)); | |
| }) | |
| .sleep(1000) | |
| .execute(function () { | |
| fileInput = window.$('<input/>').attr({id: 'fileUploadHelper', type: 'file'}).appendTo('body'); | |
| }) | |
| .findById('fileUploadHelper') | |
| .type(intern.args.testDocumentsDirectory + '/doc1.pdf') | |
| .end() | |
| .execute(function() { | |
| console.log(fileInput.get(0).files); | |
| var e = $.Event('drop'); | |
| e.originalEvent = {dataTransfer : { files : fileInput.get(0).files } }; $('.drop-area').trigger(e); | |
| }) | |
| .then(pollUntil(function () { | |
| return $('.status-text').text() == 'Document updated' ? true : null; | |
| })); | |
| }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment