ipa/freeipa-3.0.0.pre1-065-web-ui-tests-fix.patch
2012-08-06 18:17:49 +02:00

57 lines
2.2 KiB
Diff

From 8ce157910a86dc8abf16b4846cabe61052a6754d Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvoborni@redhat.com>
Date: Wed, 25 Jul 2012 13:06:42 +0200
Subject: [PATCH 65/79] Web UI tests fix
ACI tests were crashing because of misconfigured facet.
Entity link test were crashing because of incorrect jquery selector.
https://fedorahosted.org/freeipa/ticket/2817
---
install/ui/test/aci_tests.js | 5 +++--
install/ui/test/widget_tests.js | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/install/ui/test/aci_tests.js b/install/ui/test/aci_tests.js
index 4055120f22b59fcadd63228536d56836edb81f78..52fdc60376da67b2986456c663b7d883e98191f6 100644
--- a/install/ui/test/aci_tests.js
+++ b/install/ui/test/aci_tests.js
@@ -22,7 +22,7 @@
var target_container;
var target_widget;
var target_facet;
-var entity = IPA.entity({ name: 'bogus' });
+var entity = IPA.entity({ name: 'bogus', redirect_facet: 'details' });
var group_entity = IPA.entity({ name: 'group' });
module('aci', {
@@ -99,10 +99,11 @@ module('aci', {
IPA.permission_target_policy('target')
]
});
+ entity.add_facet('details', target_facet);
target_container = $('<div id="target"/>').appendTo(document.body);
+ target_facet.create(target_container);
target_widget = target_facet.widgets.get_widget('target');
- target_widget.create(target_container);
},
teardown: function() {
target_container.remove();
diff --git a/install/ui/test/widget_tests.js b/install/ui/test/widget_tests.js
index 489572c2c21077216f65dc47ac84919b85e71176..7ed93608ebbfef59986d81d1ff891c4e8abbc5a6 100644
--- a/install/ui/test/widget_tests.js
+++ b/install/ui/test/widget_tests.js
@@ -315,7 +315,7 @@ test("IPA.entity_link_widget" ,function(){
widget.is_link = true; //setting is_link is responsibility of field
widget.update(mock_record.gidnumber);
- link = widget_container.find('a[text=123456]');
+ link = widget_container.find('a:contains("123456")');
same(link.length, 1,'link is populated');
same(link.css('display'), 'inline','link is displayed');
--
1.7.11.2