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 | 14 |
1 files changed, 13 insertions, 1 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..210359d561 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 |
@@ -43,6 +44,7 @@ class TestLandingPage(SeleniumTestCase): | |||
43 | # and info modal is appearing when clicking on the info sign | 44 | # and info modal is appearing when clicking on the info sign |
44 | info_sign.click() # click on the info sign make attribute 'aria-describedby' visible | 45 | info_sign.click() # click on the info sign make attribute 'aria-describedby' visible |
45 | info_model_id = info_sign.get_attribute('aria-describedby') | 46 | info_model_id = info_sign.get_attribute('aria-describedby') |
47 | self.wait_until_visible(f'#{info_model_id}') | ||
46 | info_modal = self.find(f'#{info_model_id}') | 48 | info_modal = self.find(f'#{info_model_id}') |
47 | self.assertTrue(info_modal.is_displayed()) | 49 | self.assertTrue(info_modal.is_displayed()) |
48 | self.assertTrue("Toaster version information" in info_modal.text) | 50 | self.assertTrue("Toaster version information" in info_modal.text) |
@@ -50,6 +52,7 @@ class TestLandingPage(SeleniumTestCase): | |||
50 | def test_documentation_link_displayed(self): | 52 | def test_documentation_link_displayed(self): |
51 | """ Test that the documentation link is displayed """ | 53 | """ Test that the documentation link is displayed """ |
52 | self.get(reverse('landing')) | 54 | self.get(reverse('landing')) |
55 | self.wait_until_visible('#navbar-docs') | ||
53 | documentation_link = self.find('#navbar-docs > a') | 56 | documentation_link = self.find('#navbar-docs > a') |
54 | 57 | ||
55 | # check that the documentation link is visible | 58 | # check that the documentation link is visible |
@@ -65,6 +68,7 @@ class TestLandingPage(SeleniumTestCase): | |||
65 | def test_openembedded_jumbotron_link_visible_and_clickable(self): | 68 | def test_openembedded_jumbotron_link_visible_and_clickable(self): |
66 | """ Test OpenEmbedded link jumbotron is visible and clickable: """ | 69 | """ Test OpenEmbedded link jumbotron is visible and clickable: """ |
67 | self.get(reverse('landing')) | 70 | self.get(reverse('landing')) |
71 | self.wait_until_visible('.jumbotron') | ||
68 | jumbotron = self.find('.jumbotron') | 72 | jumbotron = self.find('.jumbotron') |
69 | 73 | ||
70 | # check OpenEmbedded | 74 | # check OpenEmbedded |
@@ -76,6 +80,7 @@ class TestLandingPage(SeleniumTestCase): | |||
76 | def test_bitbake_jumbotron_link_visible_and_clickable(self): | 80 | def test_bitbake_jumbotron_link_visible_and_clickable(self): |
77 | """ Test BitBake link jumbotron is visible and clickable: """ | 81 | """ Test BitBake link jumbotron is visible and clickable: """ |
78 | self.get(reverse('landing')) | 82 | self.get(reverse('landing')) |
83 | self.wait_until_visible('.jumbotron') | ||
79 | jumbotron = self.find('.jumbotron') | 84 | jumbotron = self.find('.jumbotron') |
80 | 85 | ||
81 | # check BitBake | 86 | # check BitBake |
@@ -88,6 +93,7 @@ class TestLandingPage(SeleniumTestCase): | |||
88 | def test_yoctoproject_jumbotron_link_visible_and_clickable(self): | 93 | def test_yoctoproject_jumbotron_link_visible_and_clickable(self): |
89 | """ Test Yocto Project link jumbotron is visible and clickable: """ | 94 | """ Test Yocto Project link jumbotron is visible and clickable: """ |
90 | self.get(reverse('landing')) | 95 | self.get(reverse('landing')) |
96 | self.wait_until_visible('.jumbotron') | ||
91 | jumbotron = self.find('.jumbotron') | 97 | jumbotron = self.find('.jumbotron') |
92 | 98 | ||
93 | # check Yocto Project | 99 | # check Yocto Project |
@@ -101,6 +107,7 @@ class TestLandingPage(SeleniumTestCase): | |||
101 | if visible and clickable | 107 | if visible and clickable |
102 | """ | 108 | """ |
103 | self.get(reverse('landing')) | 109 | self.get(reverse('landing')) |
110 | self.wait_until_visible('.jumbotron') | ||
104 | jumbotron = self.find('.jumbotron') | 111 | jumbotron = self.find('.jumbotron') |
105 | 112 | ||
106 | # check Big magenta button | 113 | # check Big magenta button |
@@ -119,6 +126,7 @@ class TestLandingPage(SeleniumTestCase): | |||
119 | Layer_Version.objects.create(layer=layer) | 126 | Layer_Version.objects.create(layer=layer) |
120 | 127 | ||
121 | self.get(reverse('landing')) | 128 | self.get(reverse('landing')) |
129 | self.wait_until_visible('.jumbotron') | ||
122 | jumbotron = self.find('.jumbotron') | 130 | jumbotron = self.find('.jumbotron') |
123 | 131 | ||
124 | # check Big Blue button | 132 | # check Big Blue button |
@@ -132,6 +140,7 @@ class TestLandingPage(SeleniumTestCase): | |||
132 | def test_toaster_manual_link_visible_and_clickable(self): | 140 | def test_toaster_manual_link_visible_and_clickable(self): |
133 | """ Test Read the Toaster manual link jumbotron is visible and clickable: """ | 141 | """ Test Read the Toaster manual link jumbotron is visible and clickable: """ |
134 | self.get(reverse('landing')) | 142 | self.get(reverse('landing')) |
143 | self.wait_until_visible('.jumbotron') | ||
135 | jumbotron = self.find('.jumbotron') | 144 | jumbotron = self.find('.jumbotron') |
136 | 145 | ||
137 | # check Read the Toaster manual | 146 | # check Read the Toaster manual |
@@ -145,6 +154,7 @@ class TestLandingPage(SeleniumTestCase): | |||
145 | def test_contrib_to_toaster_link_visible_and_clickable(self): | 154 | def test_contrib_to_toaster_link_visible_and_clickable(self): |
146 | """ Test Contribute to Toaster link jumbotron is visible and clickable: """ | 155 | """ Test Contribute to Toaster link jumbotron is visible and clickable: """ |
147 | self.get(reverse('landing')) | 156 | self.get(reverse('landing')) |
157 | self.wait_until_visible('.jumbotron') | ||
148 | jumbotron = self.find('.jumbotron') | 158 | jumbotron = self.find('.jumbotron') |
149 | 159 | ||
150 | # check Contribute to Toaster | 160 | # check Contribute to Toaster |
@@ -161,6 +171,7 @@ class TestLandingPage(SeleniumTestCase): | |||
161 | => should see the landing page | 171 | => should see the landing page |
162 | """ | 172 | """ |
163 | self.get(reverse('landing')) | 173 | self.get(reverse('landing')) |
174 | self.wait_until_visible('.jumbotron') | ||
164 | self.assertTrue(self.LANDING_PAGE_TITLE in self.get_page_source()) | 175 | self.assertTrue(self.LANDING_PAGE_TITLE in self.get_page_source()) |
165 | 176 | ||
166 | def test_default_project_has_build(self): | 177 | def test_default_project_has_build(self): |
@@ -193,6 +204,7 @@ class TestLandingPage(SeleniumTestCase): | |||
193 | user_project.save() | 204 | user_project.save() |
194 | 205 | ||
195 | self.get(reverse('landing')) | 206 | self.get(reverse('landing')) |
207 | self.wait_until_visible('#projectstable') | ||
196 | 208 | ||
197 | elements = self.find_all('#projectstable') | 209 | elements = self.find_all('#projectstable') |
198 | self.assertEqual(len(elements), 1, 'should redirect to projects') | 210 | self.assertEqual(len(elements), 1, 'should redirect to projects') |
@@ -213,7 +225,7 @@ class TestLandingPage(SeleniumTestCase): | |||
213 | 225 | ||
214 | self.get(reverse('landing')) | 226 | self.get(reverse('landing')) |
215 | 227 | ||
216 | self.wait_until_visible("#latest-builds", poll=3) | 228 | self.wait_until_visible("#latest-builds") |
217 | elements = self.find_all('#allbuildstable') | 229 | elements = self.find_all('#allbuildstable') |
218 | self.assertEqual(len(elements), 1, 'should redirect to builds') | 230 | self.assertEqual(len(elements), 1, 'should redirect to builds') |
219 | content = self.get_page_source() | 231 | content = self.get_page_source() |