diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-24 09:46:42 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-24 09:46:42 +0100 |
commit | af2e92982b722ed0ea8f465649b843cb5ed4fda7 (patch) | |
tree | 4e4567ccb803c004402d4050a2317bc000335b68 /views | |
parent | 5f17e726ad63eec6ef78d15baa8ed42625679197 (diff) | |
download | kube-af2e92982b722ed0ea8f465649b843cb5ed4fda7.tar.gz kube-af2e92982b722ed0ea8f465649b843cb5ed4fda7.zip |
Tested account setup
Diffstat (limited to 'views')
-rw-r--r-- | views/accounts/tests/tst_accountsview.qml | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/views/accounts/tests/tst_accountsview.qml b/views/accounts/tests/tst_accountsview.qml index c278136f..c280ea54 100644 --- a/views/accounts/tests/tst_accountsview.qml +++ b/views/accounts/tests/tst_accountsview.qml | |||
@@ -29,14 +29,50 @@ TestCase { | |||
29 | name: "AccountsView" | 29 | name: "AccountsView" |
30 | when: windowShown | 30 | when: windowShown |
31 | 31 | ||
32 | function visitChildren(item) { | ||
33 | console.warn(item) | ||
34 | for (var i = 0; i < item.children.length; i++) { | ||
35 | visitChildren(item.children[i]) | ||
36 | } | ||
37 | } | ||
38 | |||
32 | Component { | 39 | Component { |
33 | id: accountsComponent | 40 | id: accountsComponent |
34 | View { | 41 | View { |
35 | } | 42 | } |
36 | } | 43 | } |
37 | 44 | ||
38 | function test_start() { | 45 | function test_1start() { |
46 | var accountsView = createTemporaryObject(accountsComponent, testCase, {}) | ||
47 | verify(accountsView) | ||
48 | } | ||
49 | |||
50 | function test_2createAccount() { | ||
39 | var accountsView = createTemporaryObject(accountsComponent, testCase, {}) | 51 | var accountsView = createTemporaryObject(accountsComponent, testCase, {}) |
40 | verify(accountsView) | 52 | verify(accountsView) |
53 | |||
54 | var accountWizard = findChild(accountsView, "accountWizard"); | ||
55 | verify(accountWizard) | ||
56 | |||
57 | var typeButton = findChild(accountWizard.contentItem, "accountTypeButton" + "kolabnow") | ||
58 | verify(typeButton) | ||
59 | typeButton.clicked() | ||
60 | |||
61 | var name = findChild(accountWizard.contentItem, "nameTextField") | ||
62 | verify(name) | ||
63 | name.text = "Name" | ||
64 | |||
65 | var email = findChild(accountWizard.contentItem, "emailTextField") | ||
66 | verify(email) | ||
67 | email.text = "email@test.com" | ||
68 | |||
69 | var save = findChild(accountWizard.contentItem, "saveButton") | ||
70 | verify(save) | ||
71 | save.clicked() | ||
72 | |||
73 | var accounts = TestStore.loadList("account", {}) | ||
74 | compare(accounts.length, 1) | ||
75 | var resources = TestStore.loadList("resource", {}) | ||
76 | compare(resources.length, 3) | ||
41 | } | 77 | } |
42 | } | 78 | } |