Adding a trust creates a range -> range search facet should be marked as expired.

https://fedorahosted.org/freeipa/ticket/3874
--
Petr Vobornik
From 08691a0c62a1a73a2fa130b0f1737304ae080e08 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Tue, 20 Aug 2013 13:44:59 +0200
Subject: [PATCH] Update idrange search facet after trust creation

Adding a trust creates a range -> range search facet should be marked as expired.

https://fedorahosted.org/freeipa/ticket/3874
---
 install/ui/src/freeipa/trust.js   | 10 ++++++++++
 ipatests/test_webui/test_range.py |  2 --
 ipatests/test_webui/test_trust.py |  4 ----
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/install/ui/src/freeipa/trust.js b/install/ui/src/freeipa/trust.js
index 53a536763a7e640c2248322c455481c2b137a05d..2653d3e67c2c5591f000e32c43a3a5878eef28fd 100644
--- a/install/ui/src/freeipa/trust.js
+++ b/install/ui/src/freeipa/trust.js
@@ -38,6 +38,16 @@ return {
     enable_test: function() {
         return IPA.trust_enabled;
     },
+    policies: [
+        IPA.search_facet_update_policy,
+        IPA.details_facet_update_policy,
+        {
+            $factory: IPA.adder_facet_update_policy,
+            source_facet: 'search',
+            dest_entity: 'idrange',
+            dest_facet: 'search'
+        }
+    ],
     facets: [
         {
             $type: 'search',
diff --git a/ipatests/test_webui/test_range.py b/ipatests/test_webui/test_range.py
index 98c4098a6dba51d9b5d17c36727e3609f5c7ba36..534cd1cdd20435aebf6fa5832fac68cbf717bf31 100644
--- a/ipatests/test_webui/test_range.py
+++ b/ipatests/test_webui/test_range.py
@@ -67,8 +67,6 @@ class test_range(range_tasks):
             sid = self.get_sid()
 
             self.navigate_to_entity(ENTITY)
-            self.facet_button_click('refresh')
-            self.wait_for_request(n=2)
 
             add = self.get_add_data(pkey_ad, range_type='ipa-ad-trust', sid=sid)
             data = self.get_data(pkey_ad, add_data=add)
diff --git a/ipatests/test_webui/test_trust.py b/ipatests/test_webui/test_trust.py
index 713bcfa640f3767bd1d1b987c4b795d32349cf02..c0e851f322595399142a4a63f8774b660d8046b3 100644
--- a/ipatests/test_webui/test_trust.py
+++ b/ipatests/test_webui/test_trust.py
@@ -132,8 +132,6 @@ class test_trust(trust_tasks):
         data = self.get_data(add_data=add)
         self.add_record(ENTITY, data, delete=True)
         self.navigate_to_entity('idrange')
-        self.facet_button_click('refresh')
-        self.wait_for_request(n=2)
         self.assert_record_value('Active Directory domain range', range_pkey, column)
         self.delete_record(range_pkey)
 
@@ -141,8 +139,6 @@ class test_trust(trust_tasks):
         data = self.get_data(add_data=add)
         self.add_record(ENTITY, data, delete=True)
         self.navigate_to_entity('idrange')
-        self.facet_button_click('refresh')
-        self.wait_for_request(n=2)
         self.assert_record_value('Active Directory trust range with POSIX attributes', range_pkey, column)
         self.delete_record(range_pkey)
 
-- 
1.8.3.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to