Mercurial > gemma
annotate client/tests/e2e/specs/login.js @ 3555:76eafbf0a98d
client: fairway profiles: re-added stroke to fairway box
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Fri, 31 May 2019 15:22:30 +0200 |
parents | 05cfeeb65411 |
children |
rev | line source |
---|---|
1364
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
1 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
2 * without warranty, see README.md and license for details. |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
3 * |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
4 * SPDX-License-Identifier: AGPL-3.0-or-later |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
5 * License-Filename: LICENSES/AGPL-3.0.txt |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
6 * |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
7 * Copyright (C) 2018 by via donau |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
8 * – Österreichische Wasserstraßen-Gesellschaft mbH |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
9 * Software engineering by Intevation GmbH |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
10 * |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
11 * Author(s): |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
12 * Thomas Junk <thomas.junk@intevation.de> |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
13 */ |
0c5cbbafbd94
add headers license for some client files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
623
diff
changeset
|
14 |
164
7c40e9f28f94
test: Moved testfile. Established nightwatch tests
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
15 // For authoring Nightwatch tests, see |
7c40e9f28f94
test: Moved testfile. Established nightwatch tests
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
16 // http://nightwatchjs.org/guide#usage |
7c40e9f28f94
test: Moved testfile. Established nightwatch tests
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
17 |
7c40e9f28f94
test: Moved testfile. Established nightwatch tests
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
18 module.exports = { |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
19 "Page Load": browser => { |
164
7c40e9f28f94
test: Moved testfile. Established nightwatch tests
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
20 browser |
7c40e9f28f94
test: Moved testfile. Established nightwatch tests
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
21 .url(process.env.VUE_DEV_SERVER_URL) |
7c40e9f28f94
test: Moved testfile. Established nightwatch tests
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
22 .waitForElementVisible("#app", 5000) |
7c40e9f28f94
test: Moved testfile. Established nightwatch tests
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
23 .assert.elementPresent(".login") |
7c40e9f28f94
test: Moved testfile. Established nightwatch tests
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
24 .end(); |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
25 }, |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
26 "Login failed": browser => { |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
27 browser |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
28 .url(process.env.VUE_DEV_SERVER_URL) |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
29 .waitForElementVisible("#app", 5000) |
590
d85d5e286dc5
fix: e2e tests fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
166
diff
changeset
|
30 .setValue("input[id='inputUsername']", "bla") |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
31 .setValue("input[id='inputPassword']", "bla") |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
32 .click("button[type='submit']") |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
33 .waitForElementVisible("#alert", 2000) |
590
d85d5e286dc5
fix: e2e tests fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
166
diff
changeset
|
34 .assert.elementPresent(".alert-danger") |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
35 .end(); |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
36 }, |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
37 "Login oana success": browser => { |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
38 browser |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
39 .url(process.env.VUE_DEV_SERVER_URL) |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
40 .waitForElementVisible("#app", 5000) |
590
d85d5e286dc5
fix: e2e tests fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
166
diff
changeset
|
41 .setValue("input[id='inputUsername']", "oana") |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
42 .setValue("input[id='inputPassword']", "oa2Na2") |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
43 .click("button[type='submit']") |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
44 .pause(1000) |
2039 | 45 .click(".menubutton") |
590
d85d5e286dc5
fix: e2e tests fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
166
diff
changeset
|
46 .pause(1000) |
2039 | 47 .assert.elementPresent(".logout") |
48 .assert.containsText(".logout", "oana") | |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
49 .end(); |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
50 }, |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
51 "Login oana switch url": browser => { |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
52 browser |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
53 .url(process.env.VUE_DEV_SERVER_URL) |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
54 .waitForElementVisible("#app", 5000) |
590
d85d5e286dc5
fix: e2e tests fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
166
diff
changeset
|
55 .setValue("input[id='inputUsername']", "oana") |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
56 .setValue("input[id='inputPassword']", "oa2Na2") |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
57 .click("button[type='submit']") |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
58 .pause(1000) |
2039 | 59 .click(".menubutton") |
590
d85d5e286dc5
fix: e2e tests fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
166
diff
changeset
|
60 .pause(1000) |
2039 | 61 .assert.elementPresent(".logout") |
62 .assert.containsText(".logout", "oana") | |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
63 .url(process.env.VUE_DEV_SERVER_URL + "#/login") |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
64 .pause(1000) |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
65 .url(process.env.VUE_DEV_SERVER_URL + "#/") |
2039 | 66 .assert.elementPresent(".logout") |
67 .assert.containsText(".logout", "oana") | |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
68 .end(); |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
69 }, |
2268
05cfeeb65411
automatically trigger some imports
Thomas Junk <thomas.junk@intevation.de>
parents:
2039
diff
changeset
|
70 "Login switch user from oana to sophie": browser => { |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
71 browser |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
72 .url(process.env.VUE_DEV_SERVER_URL) |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
73 .waitForElementVisible("#app", 5000) |
590
d85d5e286dc5
fix: e2e tests fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
166
diff
changeset
|
74 .setValue("input[id='inputUsername']", "oana") |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
75 .setValue("input[id='inputPassword']", "oa2Na2") |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
76 .click("button[type='submit']") |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
77 .pause(1000) |
2039 | 78 .click(".menubutton") |
590
d85d5e286dc5
fix: e2e tests fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
166
diff
changeset
|
79 .pause(1000) |
2039 | 80 .assert.elementPresent(".logout") |
81 .assert.containsText(".logout", "oana") | |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
82 .url(process.env.VUE_DEV_SERVER_URL + "#/login") |
590
d85d5e286dc5
fix: e2e tests fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
166
diff
changeset
|
83 .setValue("input[id='inputUsername']", "sophie") |
d85d5e286dc5
fix: e2e tests fixed
Thomas Junk <thomas.junk@intevation.de>
parents:
166
diff
changeset
|
84 .setValue("input[id='inputPassword']", "so2Phie4") |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
85 .click("button[type='submit']") |
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
86 .pause(1000) |
2039 | 87 .assert.elementPresent(".logout") |
88 .assert.containsText(".logout", "sophie") | |
166
8f49ba6cddd9
test: login now as e2e test
Thomas Junk <thomas.junk@intevation.de>
parents:
164
diff
changeset
|
89 .end(); |
164
7c40e9f28f94
test: Moved testfile. Established nightwatch tests
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
90 } |
7c40e9f28f94
test: Moved testfile. Established nightwatch tests
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
91 }; |