Skip to content

Commit

Permalink
Update cypress and fix files without paths in cy
Browse files Browse the repository at this point in the history
  • Loading branch information
durasj committed May 2, 2020
1 parent 02387ed commit 25cc497
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 71 deletions.
19 changes: 15 additions & 4 deletions cypress/integration/signing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
const testFile = new File(['123'], 'filename.pdf', { lastModified: 1 });
const signedTestFile = new File(['123'], 'signed.pdf', { lastModified: 1 });
const invalidTestFile = new File(['123'], 'invalid.pdf', { lastModified: 1 });
const unsupportedFile = new File(['123'], 'unsupported.jpg', { lastModified: 1 });
// We need to add the path manually as in electron (default for headless) it is empty
// TODO: Find a better way or place for this
const createFile = name => {
const realFile = new File(['123'], name, { lastModified: 1561032102 });
const file = {};
for (const name in realFile) {
file[name] = realFile[name];
}
file.path = name;
return file;
};
const testFile = createFile('filename.pdf');
const signedTestFile = createFile('signed.pdf');
const invalidTestFile = createFile('invalid.pdf');
const unsupportedFile = createFile('unsupported.pdf');

describe('Card with file', function () {
it('Verifies and shows picked file status', function () {
Expand Down
69 changes: 3 additions & 66 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"ajv": "^6.12.2",
"babel-preset-es2015": "^6.24.1",
"codecov": "^3.6.5",
"cypress": "^4.4.1",
"cypress": "^4.5.0",
"electron": "^8.2.3",
"electron-builder": "^22.5.1",
"eslint": "^6.8.0",
Expand Down

0 comments on commit 25cc497

Please sign in to comment.