summaryrefslogtreecommitdiffstats
path: root/install/ui/test
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/test')
-rw-r--r--install/ui/test/data/dnsrecord_find.json37
-rw-r--r--install/ui/test/data/dnsrecord_show.json73
-rw-r--r--install/ui/test/widget_tests.js35
3 files changed, 137 insertions, 8 deletions
diff --git a/install/ui/test/data/dnsrecord_find.json b/install/ui/test/data/dnsrecord_find.json
index fa103d109..87160e55e 100644
--- a/install/ui/test/data/dnsrecord_find.json
+++ b/install/ui/test/data/dnsrecord_find.json
@@ -2,7 +2,7 @@
"error": null,
"id": null,
"result": {
- "count": 11,
+ "count": 12,
"result": [
{
"dn": "idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
@@ -96,20 +96,41 @@
},
{
"aaaarecord": [
- "00::11",
- "00::112"
- ],
- "arecord": [
- "192.168.122.28",
- "1.2.3.4"
+ "fec0::5054:ff:feb5:5a47"
],
"dn": "idnsname=server15,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
"idnsname": [
"server15"
]
+ },
+ {
+ "aaaarecord": [
+ "feed:babe:beef:cafe::0001",
+ "feed:babe:beef:cafe::0002",
+ "feed:babe:beef:cafe::0004"
+ ],
+ "arecord": [
+ "3.4.5.6",
+ "1.3.5.7",
+ "10.10.2.1"
+ ],
+ "dn": "idnsname=testrec,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "idnsname": [
+ "testrec"
+ ],
+ "keyrecord": [
+ "key"
+ ],
+ "srvrecord": [
+ "1 1 80 server15"
+ ],
+ "txtrecord": [
+ "A TExt Record",
+ "Another Text Record"
+ ]
}
],
"summary": null,
"truncated": false
}
-}
+} \ No newline at end of file
diff --git a/install/ui/test/data/dnsrecord_show.json b/install/ui/test/data/dnsrecord_show.json
new file mode 100644
index 000000000..e2a412546
--- /dev/null
+++ b/install/ui/test/data/dnsrecord_show.json
@@ -0,0 +1,73 @@
+{
+ "error": null,
+ "id": null,
+ "result": {
+ "result": {
+ "aaaarecord": [
+ "feed:babe:beef:cafe::0001",
+ "feed:babe:beef:cafe::0002",
+ "feed:babe:beef:cafe::0004"
+ ],
+ "arecord": [
+ "3.4.5.6",
+ "1.3.5.7",
+ "10.10.2.1"
+ ],
+ "attributelevelrights": {
+ "a6record": "rscwo",
+ "aaaarecord": "rscwo",
+ "aci": "rscwo",
+ "afsdbrecord": "rscwo",
+ "arecord": "rscwo",
+ "certrecord": "rscwo",
+ "cn": "rscwo",
+ "cnamerecord": "rscwo",
+ "dnamerecord": "rscwo",
+ "dnsclass": "rscwo",
+ "dnsttl": "rscwo",
+ "dsrecord": "rscwo",
+ "hinforecord": "rscwo",
+ "idnsallowdynupdate": "rscwo",
+ "idnsname": "rscwo",
+ "keyrecord": "rscwo",
+ "kxrecord": "rscwo",
+ "locrecord": "rscwo",
+ "mdrecord": "rscwo",
+ "minforecord": "rscwo",
+ "mxrecord": "rscwo",
+ "naptrrecord": "rscwo",
+ "nsaccountlock": "rscwo",
+ "nsecrecord": "rscwo",
+ "nsrecord": "rscwo",
+ "nxtrecord": "rscwo",
+ "objectclass": "rscwo",
+ "ptrrecord": "rscwo",
+ "rrsigrecord": "rscwo",
+ "sigrecord": "rscwo",
+ "srvrecord": "rscwo",
+ "sshfprecord": "rscwo",
+ "txtrecord": "rscwo"
+ },
+ "dn": "idnsname=testrec,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "idnsname": [
+ "testrec"
+ ],
+ "keyrecord": [
+ "key"
+ ],
+ "objectclass": [
+ "top",
+ "idnsrecord"
+ ],
+ "srvrecord": [
+ "1 1 80 server15"
+ ],
+ "txtrecord": [
+ "A Text Record",
+ "Another Text Record"
+ ]
+ },
+ "summary": null,
+ "value": "testrec"
+ }
+} \ No newline at end of file
diff --git a/install/ui/test/widget_tests.js b/install/ui/test/widget_tests.js
index f323f9697..1abac1ca0 100644
--- a/install/ui/test/widget_tests.js
+++ b/install/ui/test/widget_tests.js
@@ -275,6 +275,41 @@ test("IPA.entity_select_widget" ,function(){
});
+test("IPA.entity_link_widget" ,function(){
+ var widget = IPA.entity_link_widget({
+ name: 'gidnumber',
+ other_entity:'group',
+ });
+ base_widget_test(widget,'user','test_value');
+
+ var mock_entity = {
+ get_primary_key: function(){
+ return "";
+ }
+ };
+
+ mock_record = {'uid':'kfrog','gidnumber':'123456'};
+
+ widget.entity = mock_entity;
+ widget.create(widget_container);
+
+ var nonlink = widget_container.find('label');
+ var link = widget_container.find('a');
+
+ ok(nonlink.length > 1);
+ ok(link.length > 1);
+
+ widget.load(mock_record);
+
+ link = widget_container.find('a[text=123456]');
+
+ same(link.length, 1,'link is populated');
+ same(link.css('display'), 'inline','link is displayed');
+ same(widget.nonlink.css('display'), 'none','text is not displayed');
+
+});
+
+
test("IPA.radio_widget" ,function(){