Skip to content

Commit 25cc497

Browse files
committed
Update cypress and fix files without paths in cy
1 parent 02387ed commit 25cc497

File tree

3 files changed

+19
-71
lines changed

3 files changed

+19
-71
lines changed

cypress/integration/signing.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
const testFile = new File(['123'], 'filename.pdf', { lastModified: 1 });
2-
const signedTestFile = new File(['123'], 'signed.pdf', { lastModified: 1 });
3-
const invalidTestFile = new File(['123'], 'invalid.pdf', { lastModified: 1 });
4-
const unsupportedFile = new File(['123'], 'unsupported.jpg', { lastModified: 1 });
1+
// We need to add the path manually as in electron (default for headless) it is empty
2+
// TODO: Find a better way or place for this
3+
const createFile = name => {
4+
const realFile = new File(['123'], name, { lastModified: 1561032102 });
5+
const file = {};
6+
for (const name in realFile) {
7+
file[name] = realFile[name];
8+
}
9+
file.path = name;
10+
return file;
11+
};
12+
const testFile = createFile('filename.pdf');
13+
const signedTestFile = createFile('signed.pdf');
14+
const invalidTestFile = createFile('invalid.pdf');
15+
const unsupportedFile = createFile('unsupported.pdf');
516

617
describe('Card with file', function () {
718
it('Verifies and shows picked file status', function () {

package-lock.json

Lines changed: 3 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"ajv": "^6.12.2",
3939
"babel-preset-es2015": "^6.24.1",
4040
"codecov": "^3.6.5",
41-
"cypress": "^4.4.1",
41+
"cypress": "^4.5.0",
4242
"electron": "^8.2.3",
4343
"electron-builder": "^22.5.1",
4444
"eslint": "^6.8.0",

0 commit comments

Comments
 (0)