summaryrefslogtreecommitdiff
path: root/tests/tst_smoke.qml
blob: 19904a61420aeb4dfdbb129f75a4749b811035e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import QtQuick 2.3
import QtTest 1.0


TestCase {
    name: "SmokeTests"

    property var ctx

    function refresh() {
        ctx = JSON.parse(helper.refreshContext())
    }

    function test_helper() {
        compare(Boolean(helper), true, "does helper exist?")
    }

    function test_model() {
        compare(Boolean(jsonModel), true, "does model exist?")
    }

    function test_loadCtx() {
        refresh()
        compare(ctx.appName, "RiseupVPN", "can read appName?")
        compare(ctx.tosURL, "https://riseup.net/tos", "can read tosURL?")
        compare(ctx.status, "off", "is initial status off?")
    }
}