I have a project that has Protractor tests that are run by TravisCI through SauceLabs.
One of the tests involves βdownloadingβ a file:
it('should not allow "image/jpeg" file', function () {
pathToFile = path.resolve(__dirname, 'file.jpg');
elem.sendKeys(pathToFile);
expect(elem.getAttribute('class')).toMatch('ng-invalid');
});
This works fine locally, however Travis generates an error:
.,. / file.jpg 'does not exist on the file system
I think this is because it file.pngdoes not exist on SauceLabs.
My question is: how can I make this work?
The corresponding directive is: https://github.com/GrumpyWizards/ngValidation/blob/master/wizValidation/src/file/file.dir.js
source
share