toaster/tests/functional: Added functional testcases for project detail page
PATCH 1/1 toaster/tests/functional: Added functional testcases for project detail page
From: Libertad Cruz <[email protected]>
Added 7 new testcases that verify the UI interface and elements of the project detail page. This testcases can be found on testopia in the links:
Verifies that the project is created and that you get redirected to the configuration page
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1514
Verifies that the left side bar menu, all links are clickable and they show on the UI
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1515
Verifies that after creating a project the default project configuration is created
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1516
Verifies that the default machine is set, once creating the project
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1517
Verifies the built recipes information of the project detail page
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1518
Verifies the default release information of the project
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1519
Verifies that the default layers are assigned to the project
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1520
Verifies that the links to the Configuration, Builds, Import layer and New Custom Image are present and work.
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1521
[YOCTO #9808]
--- .../toaster/tests/functional/test_functional_basic.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
bitbake/lib/toaster/tests/functional/test_functional_basic.py +9 -9
@@ -26,7 +26,7 @@ from orm.models import Project class FuntionalTestBasic(SeleniumFunctionalTestCase): -# @testcase (1514) +# testcase (1514) def test_create_slenium_project(self): project_name = 'selenium-project' self.get('')
@@ -41,7 +41,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): self.assertTrue(Project.objects.filter(name=project_name).count(), "New project not found in database") - # @testcase (1515) + # testcase (1515) def test_verify_left_bar_menu(self): self.get('') self.wait_until_visible('#projectstable')
@@ -86,7 +86,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): except: self.fail(msg='No Bitbake variables tab available') - # @testcase (1516) +# testcase (1516) def test_review_configuration_information(self): self.get('') self.driver.find_element_by_xpath("//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click()
@@ -119,7 +119,6 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): self.assertTrue(re.search("3",self.driver.find_element_by_id("project-layers-count").text),'There should be 3 layers listed in the layer count') layer_list = self.driver.find_element_by_id("layers-in-project-list") layers = layer_list.find_elements_by_tag_name("li") - for layer in layers: if re.match ("openembedded-core",layer.text): print ("openembedded-core layer is a default layer in the project configuration")
@@ -132,12 +131,13 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): except: self.fail(msg='No Layer information in project detail page') - # @testcase (1517) +# testcase (1517) def test_verify_machine_information(self): self.get('') self.driver.find_element_by_xpath("//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() self.wait_until_visible('#projectstable') self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() + try: self.assertTrue(self.element_exists('#machine-section'),'Machine section for the project configuration page does not exist') self.assertTrue(re.search("qemux86",self.driver.find_element_by_id("project-machine-name").text),'The machine type is not assigned')
@@ -148,7 +148,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): except: self.fail(msg='The machine information is wrong in the configuration page') -# @testcase (1518) +# testcase (1518) def test_verify_most_built_recipes_information(self): self.get('') self.driver.find_element_by_xpath("//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click()
@@ -163,7 +163,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): except: self.fail(msg='No Most built information in project detail page') - # @testcase (1519) +# testcase (1519) def test_verify_project_release_information(self): self.get('') self.driver.find_element_by_xpath("//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click()
@@ -175,7 +175,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): except: self.fail(msg='No project release title information in project detail page') - # @testcase (1520) +# testcase (1520) def test_verify_layer_information(self): self.get('') self.driver.find_element_by_xpath("//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click()
@@ -206,7 +206,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): except: self.fail(msg='No Layer information in project detail page') - # @testcase (1521) +# testcase (1521) def test_verify_project_detail_links(self): self.get('') self.driver.find_element_by_xpath("//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click()
Signature · 1 line
2.1.4