diff options
Diffstat (limited to 'bitbake/lib/toaster/tests/browser/test_landing_page.py')
| -rw-r--r-- | bitbake/lib/toaster/tests/browser/test_landing_page.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/tests/browser/test_landing_page.py b/bitbake/lib/toaster/tests/browser/test_landing_page.py index 8fe5fea467..62fdf83c91 100644 --- a/bitbake/lib/toaster/tests/browser/test_landing_page.py +++ b/bitbake/lib/toaster/tests/browser/test_landing_page.py | |||
| @@ -34,6 +34,7 @@ class TestLandingPage(SeleniumTestCase): | |||
| 34 | def test_icon_info_visible_and_clickable(self): | 34 | def test_icon_info_visible_and_clickable(self): |
| 35 | """ Test that the information icon is visible and clickable """ | 35 | """ Test that the information icon is visible and clickable """ |
| 36 | self.get(reverse('landing')) | 36 | self.get(reverse('landing')) |
| 37 | self.wait_until_visible('#toaster-version-info-sign') | ||
| 37 | info_sign = self.find('#toaster-version-info-sign') | 38 | info_sign = self.find('#toaster-version-info-sign') |
| 38 | 39 | ||
| 39 | # check that the info sign is visible | 40 | # check that the info sign is visible |
| @@ -50,6 +51,7 @@ class TestLandingPage(SeleniumTestCase): | |||
| 50 | def test_documentation_link_displayed(self): | 51 | def test_documentation_link_displayed(self): |
| 51 | """ Test that the documentation link is displayed """ | 52 | """ Test that the documentation link is displayed """ |
| 52 | self.get(reverse('landing')) | 53 | self.get(reverse('landing')) |
| 54 | self.wait_until_visible('#navbar-docs') | ||
| 53 | documentation_link = self.find('#navbar-docs > a') | 55 | documentation_link = self.find('#navbar-docs > a') |
| 54 | 56 | ||
| 55 | # check that the documentation link is visible | 57 | # check that the documentation link is visible |
| @@ -65,6 +67,7 @@ class TestLandingPage(SeleniumTestCase): | |||
| 65 | def test_openembedded_jumbotron_link_visible_and_clickable(self): | 67 | def test_openembedded_jumbotron_link_visible_and_clickable(self): |
| 66 | """ Test OpenEmbedded link jumbotron is visible and clickable: """ | 68 | """ Test OpenEmbedded link jumbotron is visible and clickable: """ |
| 67 | self.get(reverse('landing')) | 69 | self.get(reverse('landing')) |
| 70 | self.wait_until_visible('.jumbotron') | ||
| 68 | jumbotron = self.find('.jumbotron') | 71 | jumbotron = self.find('.jumbotron') |
| 69 | 72 | ||
| 70 | # check OpenEmbedded | 73 | # check OpenEmbedded |
| @@ -76,6 +79,7 @@ class TestLandingPage(SeleniumTestCase): | |||
| 76 | def test_bitbake_jumbotron_link_visible_and_clickable(self): | 79 | def test_bitbake_jumbotron_link_visible_and_clickable(self): |
| 77 | """ Test BitBake link jumbotron is visible and clickable: """ | 80 | """ Test BitBake link jumbotron is visible and clickable: """ |
| 78 | self.get(reverse('landing')) | 81 | self.get(reverse('landing')) |
| 82 | self.wait_until_visible('.jumbotron') | ||
| 79 | jumbotron = self.find('.jumbotron') | 83 | jumbotron = self.find('.jumbotron') |
| 80 | 84 | ||
| 81 | # check BitBake | 85 | # check BitBake |
| @@ -88,6 +92,7 @@ class TestLandingPage(SeleniumTestCase): | |||
| 88 | def test_yoctoproject_jumbotron_link_visible_and_clickable(self): | 92 | def test_yoctoproject_jumbotron_link_visible_and_clickable(self): |
| 89 | """ Test Yocto Project link jumbotron is visible and clickable: """ | 93 | """ Test Yocto Project link jumbotron is visible and clickable: """ |
| 90 | self.get(reverse('landing')) | 94 | self.get(reverse('landing')) |
| 95 | self.wait_until_visible('.jumbotron') | ||
| 91 | jumbotron = self.find('.jumbotron') | 96 | jumbotron = self.find('.jumbotron') |
| 92 | 97 | ||
| 93 | # check Yocto Project | 98 | # check Yocto Project |
| @@ -101,6 +106,7 @@ class TestLandingPage(SeleniumTestCase): | |||
| 101 | if visible and clickable | 106 | if visible and clickable |
| 102 | """ | 107 | """ |
| 103 | self.get(reverse('landing')) | 108 | self.get(reverse('landing')) |
| 109 | self.wait_until_visible('.jumbotron') | ||
| 104 | jumbotron = self.find('.jumbotron') | 110 | jumbotron = self.find('.jumbotron') |
| 105 | 111 | ||
| 106 | # check Big magenta button | 112 | # check Big magenta button |
| @@ -119,6 +125,7 @@ class TestLandingPage(SeleniumTestCase): | |||
| 119 | Layer_Version.objects.create(layer=layer) | 125 | Layer_Version.objects.create(layer=layer) |
| 120 | 126 | ||
| 121 | self.get(reverse('landing')) | 127 | self.get(reverse('landing')) |
| 128 | self.wait_until_visible('.jumbotron') | ||
| 122 | jumbotron = self.find('.jumbotron') | 129 | jumbotron = self.find('.jumbotron') |
| 123 | 130 | ||
| 124 | # check Big Blue button | 131 | # check Big Blue button |
| @@ -132,6 +139,7 @@ class TestLandingPage(SeleniumTestCase): | |||
| 132 | def test_toaster_manual_link_visible_and_clickable(self): | 139 | def test_toaster_manual_link_visible_and_clickable(self): |
| 133 | """ Test Read the Toaster manual link jumbotron is visible and clickable: """ | 140 | """ Test Read the Toaster manual link jumbotron is visible and clickable: """ |
| 134 | self.get(reverse('landing')) | 141 | self.get(reverse('landing')) |
| 142 | self.wait_until_visible('.jumbotron') | ||
| 135 | jumbotron = self.find('.jumbotron') | 143 | jumbotron = self.find('.jumbotron') |
| 136 | 144 | ||
| 137 | # check Read the Toaster manual | 145 | # check Read the Toaster manual |
| @@ -145,6 +153,7 @@ class TestLandingPage(SeleniumTestCase): | |||
| 145 | def test_contrib_to_toaster_link_visible_and_clickable(self): | 153 | def test_contrib_to_toaster_link_visible_and_clickable(self): |
| 146 | """ Test Contribute to Toaster link jumbotron is visible and clickable: """ | 154 | """ Test Contribute to Toaster link jumbotron is visible and clickable: """ |
| 147 | self.get(reverse('landing')) | 155 | self.get(reverse('landing')) |
| 156 | self.wait_until_visible('.jumbotron') | ||
| 148 | jumbotron = self.find('.jumbotron') | 157 | jumbotron = self.find('.jumbotron') |
| 149 | 158 | ||
| 150 | # check Contribute to Toaster | 159 | # check Contribute to Toaster |
| @@ -161,6 +170,7 @@ class TestLandingPage(SeleniumTestCase): | |||
| 161 | => should see the landing page | 170 | => should see the landing page |
| 162 | """ | 171 | """ |
| 163 | self.get(reverse('landing')) | 172 | self.get(reverse('landing')) |
| 173 | self.wait_until_visible('.jumbotron') | ||
| 164 | self.assertTrue(self.LANDING_PAGE_TITLE in self.get_page_source()) | 174 | self.assertTrue(self.LANDING_PAGE_TITLE in self.get_page_source()) |
| 165 | 175 | ||
| 166 | def test_default_project_has_build(self): | 176 | def test_default_project_has_build(self): |
| @@ -193,6 +203,7 @@ class TestLandingPage(SeleniumTestCase): | |||
| 193 | user_project.save() | 203 | user_project.save() |
| 194 | 204 | ||
| 195 | self.get(reverse('landing')) | 205 | self.get(reverse('landing')) |
| 206 | self.wait_until_visible('#projectstable') | ||
| 196 | 207 | ||
| 197 | elements = self.find_all('#projectstable') | 208 | elements = self.find_all('#projectstable') |
| 198 | self.assertEqual(len(elements), 1, 'should redirect to projects') | 209 | self.assertEqual(len(elements), 1, 'should redirect to projects') |
