modified comparison condition
[sgn.git] / t / selenium2 / breeders / crosses.t
blob36eb2572069af458209842707fe1e692a006ac52
2 use strict;
4 use lib 't/lib';
6 use Test::More 'tests'=>12;
8 use SGN::Test::WWW::WebDriver;
10 my $t = SGN::Test::WWW::WebDriver->new();
12 $t->while_logged_in_as(
13     "submitter", 
14     sub { 
15         $t->get_ok('/breeders/crosses');
16         
17         $t->find_element_ok( 
18             "add_cross_link",
19             "id",
20             "find element add location link as submitter"
21             )->click();
23         sleep(2);
25         $t->find_element_ok(
26             "cross_name", "id", "find cross name input element")
27             ->send_keys("test_cross_1");
28         
29         $t->find_element_ok(
30             "cross_type", "id", "find cross type select element")->click("biparental");
32          $t->find_element_ok(
33              "maternal_parent", "id", "find maternal parent input box")->send_keys("test_accession1");
34         
35          $t->find_element_ok(
36              "paternal_parent", "id", "find paternal parent input box")
37              ->send_keys("test_accession2");
38         
39 #        $t->find_element_ok(
40 #            "cross_upload_breeding_program", "id", "find program select")
41 #            ->click(134);
43 #       $t->find_element_ok(
44 #           "location", "id", "find location select")
45 #           ->click(23);
47         $t->find_element_ok(
48             "create_progeny_checkbox", "id", "find create accessions checkbox")
49             ->click();
50         
51         $t->find_element_ok(
52             "progeny_number", "id", "find progeny number input box")
53             ->send_keys("20");
55         $t->find_element_ok(
56             "create_cross_submit","id", "find cross submit button")
57             ->click();
58         
59         sleep(10);
61         $t->find_element_ok(
62             "dismiss_cross_saved_dialog", "id", "find dismiss message button")
63             ->click();
65         sleep(5);
67         $t->get_ok('/breeders/crosses');
68         
69         $t->find_element_ok(
70             "test_cross_1", "partial_link_text", "find link for test_cross")->click();
72         
74                 
75     });