summaryrefslogtreecommitdiffstats
path: root/xt/selenium/custom_fields_admin.t
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-02-26 18:57:55 +0100
committerDavid Lawrence <dkl@mozilla.com>2016-02-26 18:57:55 +0100
commit9b6ec1f545da1cc4088ddf9cc117747954e58e65 (patch)
tree6cc3eb342a740b795052e587756f6c33438b772a /xt/selenium/custom_fields_admin.t
parent6f70920f2d2bb038a371e3cb3debff44f7001fa8 (diff)
downloadbugzilla-9b6ec1f545da1cc4088ddf9cc117747954e58e65.tar.gz
bugzilla-9b6ec1f545da1cc4088ddf9cc117747954e58e65.tar.xz
Bug 1069799 - move the QA repository into the main repository
r=LpSolit
Diffstat (limited to 'xt/selenium/custom_fields_admin.t')
-rw-r--r--xt/selenium/custom_fields_admin.t56
1 files changed, 56 insertions, 0 deletions
diff --git a/xt/selenium/custom_fields_admin.t b/xt/selenium/custom_fields_admin.t
new file mode 100644
index 000000000..d0ffb9db8
--- /dev/null
+++ b/xt/selenium/custom_fields_admin.t
@@ -0,0 +1,56 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This Source Code Form is "Incompatible With Secondary Licenses", as
+# defined by the Mozilla Public License, v. 2.0.
+
+use 5.10.1;
+use strict;
+use warnings;
+
+use FindBin qw($RealBin);
+use lib "$RealBin/../lib";
+
+use Test::More "no_plan";
+
+use QA::Util;
+
+my ($sel, $config) = get_selenium();
+log_in($sel, $config, 'admin');
+
+# Create a custom field, going through each type available,
+# mark it as obsolete and delete it immediately.
+
+go_to_admin($sel);
+$sel->click_ok("link=Custom Fields");
+$sel->wait_for_page_to_load_ok(WAIT_TIME);
+$sel->title_is("Custom Fields");
+
+my @types = ("Bug ID", "Large Text Box", "Free Text", "Multiple-Selection Box",
+ "Drop Down", "Date/Time");
+my $counter = int(rand(10000));
+
+foreach my $type (@types) {
+ my $fname = "cf_field" . ++$counter;
+ my $fdesc = "Field" . $counter;
+
+ $sel->click_ok("link=Add a new custom field");
+ $sel->wait_for_page_to_load_ok(WAIT_TIME);
+ $sel->title_is("Add a new Custom Field");
+ $sel->type_ok("name", $fname);
+ $sel->type_ok("desc", $fdesc);
+ $sel->select_ok("type", "label=$type");
+ $sel->click_ok("obsolete");
+ $sel->click_ok("create");
+ $sel->wait_for_page_to_load_ok(WAIT_TIME);
+ $sel->title_is("Custom Field Created");
+ $sel->click_ok("//a[\@href='editfields.cgi?action=del&name=$fname']");
+ $sel->wait_for_page_to_load_ok(WAIT_TIME);
+ $sel->title_is("Delete the Custom Field '$fname' ($fdesc)");
+ $sel->click_ok("link=Delete field '$fdesc'");
+ $sel->wait_for_page_to_load_ok(WAIT_TIME);
+ $sel->title_is("Custom Field Deleted");
+}
+
+logout($sel);