[Pkg-mozext-commits] [requestpolicy] 143/257: [tst][add] TestImportPage

David Prévot taffit at moszumanska.debian.org
Thu Jan 28 03:20:06 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository requestpolicy.

commit 6a952a18e0cfc88b8e74758d3fb5198693110a32
Author: Martin Kimmerle <dev at 256k.de>
Date:   Tue Nov 17 17:12:59 2015 +0100

    [tst][add] TestImportPage
---
 .../tests/policy/old_rules/test_import.py          | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tests/marionette/tests/policy/old_rules/test_import.py b/tests/marionette/tests/policy/old_rules/test_import.py
index c3799a8..d072c29 100644
--- a/tests/marionette/tests/policy/old_rules/test_import.py
+++ b/tests/marionette/tests/policy/old_rules/test_import.py
@@ -82,3 +82,25 @@ class TestAutomaticRulesImportOnUpgrade(RulesImportTestCase):
         if with_welcomewin:
             # Close the setup tab.
             self.browser.tabbar.tabs[-1].close()
+
+
+class TestImportPage(RulesImportTestCase):
+
+    def test_import(self):
+        # Add some "old rules".
+        self.prefs.old_rules.set_rules(self.oldrules_prefs)
+
+        with self.marionette.using_context("content"):
+            self.settings.old_rules.open()
+            self.settings.old_rules.show_rules()
+
+            # Check the rule rows.
+            rule_rows = self.settings.old_rules.rules_table.all_rule_rows
+            displayed_rules = [row.create_rule() for row in rule_rows]
+            self.assertListEqual(sorted(displayed_rules),
+                                 sorted(self.oldrules_rules))
+
+            # Import and compare.
+            self.settings.old_rules.import_rules()
+            self.assertListEqual(sorted(self.rules.get_rules()),
+                                 sorted(self.oldrules_rules))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git



More information about the Pkg-mozext-commits mailing list