diff --git a/lang/js/BrowserTestExtension/index.html b/lang/js/BrowserTestExtension/index.html index 05d413ba..7f8d97de 100644 --- a/lang/js/BrowserTestExtension/index.html +++ b/lang/js/BrowserTestExtension/index.html @@ -23,6 +23,15 @@ The functionality tests, to be found in gpgme/lang/js/BrowserTestExtension, check the overall functionality of the standard packaged version of gpgmejs. +

+

+ Most tests rely on a test gpg key to be available in gpg, which can be + found at the bottom of this page, or as "testkey.sec" in the + BrowserTestExtension's directory. Please import this key to your tested + gpg installation, or adapt the input defined in tests/inputvalues.js + if you want to use different values. +

+

+
+

+ + + +

diff --git a/lang/js/BrowserTestExtension/tests/KeyImportExport.js b/lang/js/BrowserTestExtension/tests/KeyImportExport.js index 6b298049..33e6bd29 100644 --- a/lang/js/BrowserTestExtension/tests/KeyImportExport.js +++ b/lang/js/BrowserTestExtension/tests/KeyImportExport.js @@ -19,6 +19,7 @@ * * Author(s): * Maximilian Krambach + * Raimund Renkert */ /* global describe, it, expect, Gpgmejs, ImportablePublicKey */ @@ -53,27 +54,27 @@ describe('Key importing', function () { expect(result.length).to.equal(0); context.Keyring.importKey(ImportablePublicKey.key, true) .then(function(result){ - expect(result[0]).to.not.be.undefined; - expect(result[0].key).to.be.an('object'); - expect(result[0].key.fingerprint).to.equal( + expect(result.Keys[0]).to.not.be.undefined; + expect(result.Keys[0].key).to.be.an('object'); + expect(result.Keys[0].key.fingerprint).to.equal( ImportablePublicKey.fingerprint); - expect(result[0].status).to.equal('newkey'); + expect(result.Keys[0].status).to.equal('newkey'); context.Keyring.importKey( ImportablePublicKey.keyChangedUserId,true) .then(function(res){ - expect(res[0]).to.not.be.undefined; - expect(res[0].key).to.be.an('object'); - expect(res[0].key.fingerprint).to.equal( + expect(res.Keys[0]).to.not.be.undefined; + expect(res.Keys[0].key).to.be.an('object'); + expect(res.Keys[0].key.fingerprint).to.equal( ImportablePublicKey.fingerprint); - expect(res[0].status).to.equal( + expect(res.Keys[0].status).to.equal( 'change'); expect( - res[0].changes.userId).to.be.true; + res.Keys[0].changes.userId).to.be.true; expect( - res[0].changes.subkey).to.be.false; + res.Keys[0].changes.subkey).to.be.false; expect( - res[0].changes.signature).to.be.true; - res[0].key.delete().then(function(result){ + res.Keys[0].changes.signature).to.be.true; + res.Keys[0].key.delete().then(function(result){ expect(result).to.be.true; done(); }); diff --git a/lang/js/src/permittedOperations.js b/lang/js/src/permittedOperations.js index 044ae4af..312eaa52 100644 --- a/lang/js/src/permittedOperations.js +++ b/lang/js/src/permittedOperations.js @@ -272,7 +272,7 @@ export const permittedOperations = { answer: { type: [], data: { - 'result': 'Object' + 'result': 'object' } } },