Skip to content

Commit

Permalink
Merge pull request #15 from blockchain-certificates/chore/cvjs
Browse files Browse the repository at this point in the history
update CVJS version
  • Loading branch information
Julien Fraichot authored Nov 6, 2018
2 parents da367f5 + 6c65d71 commit ede9c24
Show file tree
Hide file tree
Showing 8 changed files with 4,481 additions and 6,843 deletions.
11,296 changes: 4,467 additions & 6,829 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"main": "dist/main.js",
"dependencies": {
"@blockcerts/cert-verifier-js": "^2.0.2",
"@blockcerts/cert-verifier-js": "^2.1.1",
"@polymer/lit-element": "^0.5.1",
"@polymer/polymer": "3.0.3",
"@webcomponents/webcomponentsjs": "2.1.0",
Expand Down Expand Up @@ -36,7 +36,7 @@
"husky": "^0.14.3",
"jest": "^23.1.0",
"jest-fetch-mock": "^1.6.4",
"polymer-cli": "^1.7.7",
"polymer-cli": "^1.8.1",
"pwa-helpers": "^0.8.2",
"rollup": "^0.62.0",
"rollup-plugin-babel": "^3.0.7",
Expand All @@ -50,8 +50,8 @@
"snazzy": "^7.1.1",
"watch": "^1.0.2",
"wc-sass-render": "^1.0.0",
"wct-browser-legacy": "^1.0.1",
"web-component-tester": "^6.7.1"
"wct-browser-legacy": "^1.0.2",
"web-component-tester": "^6.9.0"
},
"scripts": {
"build": "rollup -c rollup.config.js",
Expand Down
2 changes: 1 addition & 1 deletion test/application/actions/shareSocialNetwork.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('shareSocialNetwork action creator test suite', function () {
let wasCalled = false;
function assertFunction (e) {
wasCalled = true;
expect(e.detail.certificateDefinition).toEqual(validCertificate);
expect(e.detail.certificateDefinition.id).toEqual(validCertificate.id);
}
window.addEventListener(CERTIFICATE_EVENTS.CERTIFICATE_SHARE, assertFunction);

Expand Down
4 changes: 2 additions & 2 deletions test/application/actions/updateCertificateDefinition.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('updateCertificateDefinition action creator test suite', function () {
await store.dispatch(updateCertificateDefinition(certificateFixture));
const state = store.getState();

expect(getCertificateDefinition(state)).toEqual(validCertificate);
expect(getCertificateDefinition(state).id).toEqual(validCertificate.id);
});

it('should set the error in the state to undefined', async function () {
Expand All @@ -50,7 +50,7 @@ describe('updateCertificateDefinition action creator test suite', function () {
let wasCalled = false;
function assertFunction (e) {
wasCalled = true;
expect(e.detail.certificateDefinition).toEqual(validCertificate);
expect(e.detail.certificateDefinition.id).toEqual(validCertificate.id);
}
window.addEventListener(CERTIFICATE_EVENTS.CERTIFICATE_LOAD, assertFunction);

Expand Down
4 changes: 2 additions & 2 deletions test/application/actions/updateCertificateUrl.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('updateCertificateUrl action creator test suite', function () {
it('should update the state with the valid certificate definition', async function () {
await store.dispatch(updateCertificateUrl(MOCK_SERVER_VALID_URL));
const state = store.getState();
expect(getCertificateDefinition(state)).toEqual(validCertificate);
expect(getCertificateDefinition(state).id).toEqual(validCertificate.id);
});
});

Expand All @@ -71,7 +71,7 @@ describe('updateCertificateUrl action creator test suite', function () {
await store.dispatch(updateCertificateUrl(MOCK_SERVER_INVALID_URL));

const state = store.getState();
expect(getCertificateDefinition(state)).toEqual(invalidCertificate);
expect(getCertificateDefinition(state).id).toEqual(invalidCertificate.id);
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/application/actions/verifyCertificate.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('verifyCertificate action creator test suite', function () {
let wasCalled = false;
function assertFunction (e) {
wasCalled = true;
expect(e.detail.certificateDefinition).toEqual(validCertificate);
expect(e.detail.certificateDefinition.id).toEqual(validCertificate.id);
}
window.addEventListener(CERTIFICATE_EVENTS.CERTIFICATE_VERIFY, assertFunction);

Expand Down
6 changes: 3 additions & 3 deletions test/application/domain/certificates/useCases/parse.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import validCertificate from '../../../../assertions/validCertificate';

describe('domain certificates parse method test suite', function () {
describe('given a valid definition of a certificate', function () {
it('should return an object with isValid property set to true', function () {
expect(domain.certificates.parse(certificateFixture).certificateDefinition).toEqual(validCertificate);
it('should return an object with a certificate definition', function () {
expect(domain.certificates.parse(certificateFixture).certificateDefinition.id).toEqual(validCertificate.id);
});

it('should return an object with errorMessage property undefined', function () {
Expand All @@ -15,7 +15,7 @@ describe('domain certificates parse method test suite', function () {
});

describe('given an invalid definition of a certificate', function () {
it('should return an object with isValid property set to false', function () {
it('should return an object with a null certificate definition', function () {
expect(domain.certificates.parse(notACertificateDefinition).certificateDefinition).toBe(null);
});

Expand Down
2 changes: 1 addition & 1 deletion test/application/domain/events/useCases/dispatch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('domain events dispatch method test suite', function () {
let wasCalled = false;
function assertFunction (e) {
wasCalled = true;
expect(e.detail.certificateDefinition).toEqual(validCertificate);
expect(e.detail.certificateDefinition.id).toEqual(validCertificate.id);
}
window.addEventListener(eventType, assertFunction);

Expand Down

0 comments on commit ede9c24

Please sign in to comment.