mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
bitbake: Toaster: Write UI TestCase import new project using
* Test import new project using: - Project Name: Any string - Project type: select (Import command line project) - Import existing project directory: Wrong Path (Bitbake rev: d9239f2d2235f2adb0322ecb2cedd507a00e1e90) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
36871610c3
commit
a9befd527e
@@ -149,3 +149,28 @@ class TestCreateNewProject(SeleniumFunctionalTestCase):
|
||||
create_btn = self.driver.find_element(By.ID, "create-project-button")
|
||||
self.assertIsNotNone(create_btn.get_attribute('disabled'),
|
||||
'Create button is not disabled')
|
||||
|
||||
def test_import_new_project(self):
|
||||
""" Test import new project using:
|
||||
- Project Name: Any string
|
||||
- Project type: select (Import command line project)
|
||||
- Import existing project directory: Wrong Path
|
||||
"""
|
||||
project_name = 'projectimport'
|
||||
self.get(reverse('newproject'))
|
||||
self.driver.find_element(By.ID,
|
||||
"new-project-name").send_keys(project_name)
|
||||
# select import project
|
||||
self.find('#type-import').click()
|
||||
|
||||
# set wrong path
|
||||
wrong_path = '/wrongpath'
|
||||
self.driver.find_element(By.ID,
|
||||
"import-project-dir").send_keys(wrong_path)
|
||||
self.driver.find_element(By.ID, "create-project-button").click()
|
||||
|
||||
# check error message
|
||||
self.assertTrue(self.element_exists('.alert-danger'),
|
||||
'Allert message not shown')
|
||||
self.assertTrue(wrong_path in self.find('.alert-danger').text,
|
||||
"Wrong path not in alert message")
|
||||
|
||||
Reference in New Issue
Block a user