Skip to content

Commit

Permalink
EXT: Add the current client version (#9823)
Browse files Browse the repository at this point in the history
* add version info to the status

* test that

* fix test?

* duh
  • Loading branch information
strseb authored Sep 3, 2024
1 parent cee1543 commit 040eca1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/webextensionadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ QJsonObject WebExtensionAdapter::serializeStatus() {
QJsonObject obj;
obj["authenticated"] = App::isUserAuthenticated();
obj["location"] = locationObj;
obj["version"] = Constants::versionString();
obj["connectedSince"] =
QString::number(vpn->controller()->connectionTimestamp());
{
Expand Down
7 changes: 5 additions & 2 deletions tests/functional/testWebExtensionApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const {
getMessageStream,
ExtensionMessage,
readResponseOfType
} = require('./utils/webextension.js')
} = require('./utils/webextension.js');


if(!vpn.runningOnWasm()) {

Expand All @@ -23,8 +24,10 @@ describe('WebExtension API', function() {
it('A Webextension can query the Status of the VPN', async () => {
const sock = await connectExtension();
const messagePipe = getMessageStream(sock);
const statusPromise = readResponseOfType('status', messagePipe);
sentToClient(new ExtensionMessage('status'), sock);
await readResponseOfType('status', messagePipe);
const msg = await statusPromise
assert(msg.status.version, `A Version is sent in msg: ${JSON.stringify(msg)}` )
sock.destroy();
});
it('A Webextension can activate the VPN', async () => {
Expand Down

0 comments on commit 040eca1

Please sign in to comment.