summaryrefslogtreecommitdiffstats
path: root/install/ui/test/functional/user.js
blob: d8039ecb0a5f78b6bb3b9f2cbe7daa8e8a6c0dba (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
29
30
31
module("test", {
    setup: function(){
        S.open("//test.html");
    }
});

test("Add User", function(){
    S('span[name="search"] input[name="add"]').click();

    S('div.ui-dialog input[name="uid"]').type('testuser');
    S('div.ui-dialog input[name="givenname"]').type('Test');
    S('div.ui-dialog input[name="sn"]').type('User');

    S('div.ui-dialog button').click();

    S('span[name="search"] input[name="select"][value="testuser"]').exists();

    ok(true, 'Added Test User');
});

test("Delete User", function(){

    var checkbox = S('span[name="search"] input[name="select"][value="testuser"]');
    checkbox.click();

    S('span[name="search"] input[name="delete"]').click();

    checkbox.missing();

    ok(true, 'Deleted Test User');
});