summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlassane Yattara <alassane.yattara@savoirfairelinux.com>2023-12-18 22:41:22 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-20 12:02:07 +0000
commit98214f1bc2cd4ae4588ba94300d3122428f8f287 (patch)
tree440caf6540304f549ae828d34fb7885682017b30
parent08369812c1a9a33338a3998968b802822b97c40a (diff)
downloadpoky-98214f1bc2cd4ae4588ba94300d3122428f8f287.tar.gz
bitbake: toaster/tests: Bug-fix test_functional_basic, delay driver actions
The errors causing faileds on functional_basic are dû to the delay between actions, increase between driver actions. (Bitbake rev: e8f8f6203b63c46249673e80872fea40475f6875) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/tests/functional/test_functional_basic.py76
1 files changed, 38 insertions, 38 deletions
diff --git a/bitbake/lib/toaster/tests/functional/test_functional_basic.py b/bitbake/lib/toaster/tests/functional/test_functional_basic.py
index e48f13b003..47f7452e81 100644
--- a/bitbake/lib/toaster/tests/functional/test_functional_basic.py
+++ b/bitbake/lib/toaster/tests/functional/test_functional_basic.py
@@ -7,7 +7,7 @@
7# SPDX-License-Identifier: GPL-2.0-only 7# SPDX-License-Identifier: GPL-2.0-only
8# 8#
9 9
10import re, time 10import re
11from django.urls import reverse 11from django.urls import reverse
12import pytest 12import pytest
13from tests.functional.functional_helpers import SeleniumFunctionalTestCase 13from tests.functional.functional_helpers import SeleniumFunctionalTestCase
@@ -26,7 +26,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase):
26 self.driver.find_element(By.ID, "new-project-name").send_keys(project_name) 26 self.driver.find_element(By.ID, "new-project-name").send_keys(project_name)
27 self.driver.find_element(By.ID, 'projectversion').click() 27 self.driver.find_element(By.ID, 'projectversion').click()
28 self.driver.find_element(By.ID, "create-project-button").click() 28 self.driver.find_element(By.ID, "create-project-button").click()
29 element = self.wait_until_visible('#project-created-notification') 29 element = self.wait_until_visible('#project-created-notification', poll=10)
30 self.assertTrue(self.element_exists('#project-created-notification'),'Project creation notification not shown') 30 self.assertTrue(self.element_exists('#project-created-notification'),'Project creation notification not shown')
31 self.assertTrue(project_name in element.text, 31 self.assertTrue(project_name in element.text,
32 "New project name not in new project notification") 32 "New project name not in new project notification")
@@ -36,52 +36,52 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase):
36 # testcase (1515) 36 # testcase (1515)
37 def test_verify_left_bar_menu(self): 37 def test_verify_left_bar_menu(self):
38 self.get(reverse('all-projects')) 38 self.get(reverse('all-projects'))
39 self.wait_until_visible('#projectstable') 39 self.wait_until_visible('#projectstable', poll=10)
40 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() 40 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click()
41 self.wait_until_visible('#config-nav') 41 self.wait_until_visible('#config-nav', poll=10)
42 self.assertTrue(self.element_exists('#config-nav'),'Configuration Tab does not exist') 42 self.assertTrue(self.element_exists('#config-nav'),'Configuration Tab does not exist')
43 project_URL=self.get_URL() 43 project_URL=self.get_URL()
44 self.driver.find_element(By.XPATH, '//a[@href="'+project_URL+'"]').click() 44 self.driver.find_element(By.XPATH, '//a[@href="'+project_URL+'"]').click()
45 self.wait_until_visible('#config-nav') 45 self.wait_until_visible('#config-nav', poll=10)
46 46
47 try: 47 try:
48 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'customimages/"'+"]").click() 48 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'customimages/"'+"]").click()
49 self.wait_until_visible('#config-nav') 49 self.wait_until_visible('#config-nav', poll=10)
50 self.assertTrue(re.search("Custom images",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'Custom images information is not loading properly') 50 self.assertTrue(re.search("Custom images",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'Custom images information is not loading properly')
51 except: 51 except:
52 self.fail(msg='No Custom images tab available') 52 self.fail(msg='No Custom images tab available')
53 53
54 try: 54 try:
55 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'images/"'+"]").click() 55 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'images/"'+"]").click()
56 self.wait_until_visible('#config-nav') 56 self.wait_until_visible('#config-nav', poll=10)
57 self.assertTrue(re.search("Compatible image recipes",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible image recipes information is not loading properly') 57 self.assertTrue(re.search("Compatible image recipes",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible image recipes information is not loading properly')
58 except: 58 except:
59 self.fail(msg='No Compatible image tab available') 59 self.fail(msg='No Compatible image tab available')
60 60
61 try: 61 try:
62 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'softwarerecipes/"'+"]").click() 62 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'softwarerecipes/"'+"]").click()
63 self.wait_until_visible('#config-nav') 63 self.wait_until_visible('#config-nav', poll=10)
64 self.assertTrue(re.search("Compatible software recipes",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible software recipe information is not loading properly') 64 self.assertTrue(re.search("Compatible software recipes",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible software recipe information is not loading properly')
65 except: 65 except:
66 self.fail(msg='No Compatible software recipe tab available') 66 self.fail(msg='No Compatible software recipe tab available')
67 67
68 try: 68 try:
69 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'machines/"'+"]").click() 69 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'machines/"'+"]").click()
70 self.wait_until_visible('#config-nav') 70 self.wait_until_visible('#config-nav', poll=10)
71 self.assertTrue(re.search("Compatible machines",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible machine information is not loading properly') 71 self.assertTrue(re.search("Compatible machines",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible machine information is not loading properly')
72 except: 72 except:
73 self.fail(msg='No Compatible machines tab available') 73 self.fail(msg='No Compatible machines tab available')
74 74
75 try: 75 try:
76 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'layers/"'+"]").click() 76 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'layers/"'+"]").click()
77 self.wait_until_visible('#config-nav') 77 self.wait_until_visible('#config-nav', poll=10)
78 self.assertTrue(re.search("Compatible layers",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible layer information is not loading properly') 78 self.assertTrue(re.search("Compatible layers",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible layer information is not loading properly')
79 except: 79 except:
80 self.fail(msg='No Compatible layers tab available') 80 self.fail(msg='No Compatible layers tab available')
81 81
82 try: 82 try:
83 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'configuration"'+"]").click() 83 self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'configuration"'+"]").click()
84 self.wait_until_visible('#config-nav') 84 self.wait_until_visible('#config-nav', poll=10)
85 self.assertTrue(re.search("Bitbake variables",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Bitbake variables information is not loading properly') 85 self.assertTrue(re.search("Bitbake variables",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Bitbake variables information is not loading properly')
86 except: 86 except:
87 self.fail(msg='No Bitbake variables tab available') 87 self.fail(msg='No Bitbake variables tab available')
@@ -89,18 +89,18 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase):
89# testcase (1516) 89# testcase (1516)
90 def test_review_configuration_information(self): 90 def test_review_configuration_information(self):
91 self.get('') 91 self.get('')
92 self.wait_until_visible('#global-nav') 92 self.wait_until_visible('#global-nav', poll=10)
93 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() 93 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click()
94 self.wait_until_visible('#projectstable') 94 self.wait_until_visible('#projectstable', poll=10)
95 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() 95 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click()
96 project_URL=self.get_URL() 96 project_URL=self.get_URL()
97 self.wait_until_visible('#config-nav') 97 self.wait_until_visible('#config-nav', poll=10)
98 try: 98 try:
99 self.assertTrue(self.element_exists('#machine-section'),'Machine section for the project configuration page does not exist') 99 self.assertTrue(self.element_exists('#machine-section'),'Machine section for the project configuration page does not exist')
100 self.assertTrue(re.search("qemux86-64",self.driver.find_element(By.XPATH, "//span[@id='project-machine-name']").text),'The machine type is not assigned') 100 self.assertTrue(re.search("qemux86-64",self.driver.find_element(By.XPATH, "//span[@id='project-machine-name']").text),'The machine type is not assigned')
101 self.driver.find_element(By.XPATH, "//span[@id='change-machine-toggle']").click() 101 self.driver.find_element(By.XPATH, "//span[@id='change-machine-toggle']").click()
102 self.wait_until_visible('#select-machine-form') 102 self.wait_until_visible('#select-machine-form', poll=10)
103 self.wait_until_visible('#cancel-machine-change') 103 self.wait_until_visible('#cancel-machine-change', poll=10)
104 self.driver.find_element(By.XPATH, "//form[@id='select-machine-form']/a[@id='cancel-machine-change']").click() 104 self.driver.find_element(By.XPATH, "//form[@id='select-machine-form']/a[@id='cancel-machine-change']").click()
105 except: 105 except:
106 self.fail(msg='The machine information is wrong in the configuration page') 106 self.fail(msg='The machine information is wrong in the configuration page')
@@ -135,18 +135,18 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase):
135# testcase (1517) 135# testcase (1517)
136 def test_verify_machine_information(self): 136 def test_verify_machine_information(self):
137 self.get('') 137 self.get('')
138 self.wait_until_visible('#global-nav') 138 self.wait_until_visible('#global-nav', poll=10)
139 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() 139 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click()
140 self.wait_until_visible('#projectstable') 140 self.wait_until_visible('#projectstable', poll=10)
141 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() 141 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click()
142 self.wait_until_visible('#config-nav') 142 self.wait_until_visible('#config-nav', poll=10)
143 143
144 try: 144 try:
145 self.assertTrue(self.element_exists('#machine-section'),'Machine section for the project configuration page does not exist') 145 self.assertTrue(self.element_exists('#machine-section'),'Machine section for the project configuration page does not exist')
146 self.assertTrue(re.search("qemux86-64",self.driver.find_element(By.ID, "project-machine-name").text),'The machine type is not assigned') 146 self.assertTrue(re.search("qemux86-64",self.driver.find_element(By.ID, "project-machine-name").text),'The machine type is not assigned')
147 self.driver.find_element(By.ID, "change-machine-toggle").click() 147 self.driver.find_element(By.ID, "change-machine-toggle").click()
148 self.wait_until_visible('#select-machine-form') 148 self.wait_until_visible('#select-machine-form', poll=10)
149 self.wait_until_visible('#cancel-machine-change') 149 self.wait_until_visible('#cancel-machine-change', poll=10)
150 self.driver.find_element(By.ID, "cancel-machine-change").click() 150 self.driver.find_element(By.ID, "cancel-machine-change").click()
151 except: 151 except:
152 self.fail(msg='The machine information is wrong in the configuration page') 152 self.fail(msg='The machine information is wrong in the configuration page')
@@ -154,16 +154,16 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase):
154# testcase (1518) 154# testcase (1518)
155 def test_verify_most_built_recipes_information(self): 155 def test_verify_most_built_recipes_information(self):
156 self.get('') 156 self.get('')
157 self.wait_until_visible('#global-nav') 157 self.wait_until_visible('#global-nav', poll=10)
158 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() 158 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click()
159 self.wait_until_visible('#projectstable') 159 self.wait_until_visible('#projectstable', poll=10)
160 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() 160 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click()
161 self.wait_until_visible('#config-nav') 161 self.wait_until_visible('#config-nav', poll=10)
162 project_URL=self.get_URL() 162 project_URL=self.get_URL()
163 try: 163 try:
164 self.assertTrue(re.search("You haven't built any recipes yet",self.driver.find_element(By.ID, "no-most-built").text),'Default message of no builds is not present') 164 self.assertTrue(re.search("You haven't built any recipes yet",self.driver.find_element(By.ID, "no-most-built").text),'Default message of no builds is not present')
165 self.driver.find_element(By.XPATH, "//div[@id='no-most-built']/p/a[@href="+'"'+project_URL+'images/"'+"]").click() 165 self.driver.find_element(By.XPATH, "//div[@id='no-most-built']/p/a[@href="+'"'+project_URL+'images/"'+"]").click()
166 self.wait_until_visible('#config-nav') 166 self.wait_until_visible('#config-nav', poll=10)
167 self.assertTrue(re.search("Compatible image recipes",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Choose a recipe to build link is not working properly') 167 self.assertTrue(re.search("Compatible image recipes",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Choose a recipe to build link is not working properly')
168 except: 168 except:
169 self.fail(msg='No Most built information in project detail page') 169 self.fail(msg='No Most built information in project detail page')
@@ -171,11 +171,11 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase):
171# testcase (1519) 171# testcase (1519)
172 def test_verify_project_release_information(self): 172 def test_verify_project_release_information(self):
173 self.get('') 173 self.get('')
174 self.wait_until_visible('#global-nav') 174 self.wait_until_visible('#global-nav', poll=10)
175 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() 175 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click()
176 self.wait_until_visible('#projectstable') 176 self.wait_until_visible('#projectstable', poll=10)
177 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() 177 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click()
178 self.wait_until_visible('#config-nav') 178 self.wait_until_visible('#config-nav', poll=10)
179 179
180 try: 180 try:
181 self.assertTrue(re.search("Yocto Project master",self.driver.find_element(By.ID, "project-release-title").text),'The project release is not defined') 181 self.assertTrue(re.search("Yocto Project master",self.driver.find_element(By.ID, "project-release-title").text),'The project release is not defined')
@@ -185,11 +185,11 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase):
185# testcase (1520) 185# testcase (1520)
186 def test_verify_layer_information(self): 186 def test_verify_layer_information(self):
187 self.get('') 187 self.get('')
188 self.wait_until_visible('#global-nav') 188 self.wait_until_visible('#global-nav', poll=10)
189 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() 189 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click()
190 self.wait_until_visible('#projectstable') 190 self.wait_until_visible('#projectstable', poll=10)
191 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() 191 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click()
192 self.wait_until_visible('#config-nav') 192 self.wait_until_visible('#config-nav', poll=10)
193 project_URL=self.get_URL() 193 project_URL=self.get_URL()
194 try: 194 try:
195 self.driver.find_element(By.XPATH, "//div[@id='layer-container']") 195 self.driver.find_element(By.XPATH, "//div[@id='layer-container']")
@@ -217,19 +217,19 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase):
217# testcase (1521) 217# testcase (1521)
218 def test_verify_project_detail_links(self): 218 def test_verify_project_detail_links(self):
219 self.get('') 219 self.get('')
220 self.wait_until_visible('#global-nav') 220 self.wait_until_visible('#global-nav', poll=10)
221 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() 221 self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click()
222 self.wait_until_visible('#projectstable') 222 self.wait_until_visible('#projectstable', poll=10)
223 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() 223 self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click()
224 self.wait_until_visible('#config-nav') 224 self.wait_until_visible('#config-nav', poll=10)
225 project_URL=self.get_URL() 225 project_URL=self.get_URL()
226 self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li[@id='topbar-configuration-tab']/a[@href="+'"'+project_URL+'"'+"]").click() 226 self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li[@id='topbar-configuration-tab']/a[@href="+'"'+project_URL+'"'+"]").click()
227 self.wait_until_visible('#config-nav') 227 self.wait_until_visible('#config-nav', poll=10)
228 self.assertTrue(re.search("Configuration",self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li[@id='topbar-configuration-tab']/a[@href="+'"'+project_URL+'"'+"]").text), 'Configuration tab in project topbar is misspelled') 228 self.assertTrue(re.search("Configuration",self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li[@id='topbar-configuration-tab']/a[@href="+'"'+project_URL+'"'+"]").text), 'Configuration tab in project topbar is misspelled')
229 229
230 try: 230 try:
231 self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'builds/"'+"]").click() 231 self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'builds/"'+"]").click()
232 self.wait_until_visible('#project-topbar') 232 self.wait_until_visible('#project-topbar', poll=10)
233 self.assertTrue(re.search("Builds",self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'builds/"'+"]").text), 'Builds tab in project topbar is misspelled') 233 self.assertTrue(re.search("Builds",self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'builds/"'+"]").text), 'Builds tab in project topbar is misspelled')
234 self.driver.find_element(By.XPATH, "//div[@id='empty-state-projectbuildstable']") 234 self.driver.find_element(By.XPATH, "//div[@id='empty-state-projectbuildstable']")
235 except: 235 except:
@@ -237,7 +237,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase):
237 237
238 try: 238 try:
239 self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'importlayer"'+"]").click() 239 self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'importlayer"'+"]").click()
240 self.wait_until_visible('#project-topbar') 240 self.wait_until_visible('#project-topbar', poll=10)
241 self.assertTrue(re.search("Import layer",self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'importlayer"'+"]").text), 'Import layer tab in project topbar is misspelled') 241 self.assertTrue(re.search("Import layer",self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'importlayer"'+"]").text), 'Import layer tab in project topbar is misspelled')
242 self.driver.find_element(By.XPATH, "//fieldset[@id='repo-select']") 242 self.driver.find_element(By.XPATH, "//fieldset[@id='repo-select']")
243 self.driver.find_element(By.XPATH, "//fieldset[@id='git-repo']") 243 self.driver.find_element(By.XPATH, "//fieldset[@id='git-repo']")
@@ -246,7 +246,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase):
246 246
247 try: 247 try:
248 self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'newcustomimage/"'+"]").click() 248 self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'newcustomimage/"'+"]").click()
249 self.wait_until_visible('#project-topbar') 249 self.wait_until_visible('#project-topbar', poll=10)
250 self.assertTrue(re.search("New custom image",self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'newcustomimage/"'+"]").text), 'New custom image tab in project topbar is misspelled') 250 self.assertTrue(re.search("New custom image",self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li/a[@href="+'"'+project_URL+'newcustomimage/"'+"]").text), 'New custom image tab in project topbar is misspelled')
251 self.assertTrue(re.search("Select the image recipe you want to customise",self.driver.find_element(By.XPATH, "//div[@class='col-md-12']/h2").text),'The new custom image tab is not loading correctly') 251 self.assertTrue(re.search("Select the image recipe you want to customise",self.driver.find_element(By.XPATH, "//div[@class='col-md-12']/h2").text),'The new custom image tab is not loading correctly')
252 except: 252 except: