[PATCH 7/8] Toaster: Test create new project without project name
Alassane Yattara <[email protected]> Wed, 1 Nov 2023 23:13:54 +0100
| Newsgroups | org.yoctoproject.lists.toaster |
|---|---|
| Message-ID | <[email protected]> |
Signed-off-by: Alassane Yattara <[email protected]> --- .../tests/functional/test_create_new_project.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/toaster/tests/functional/test_create_new_project.py b/lib/toaster/tests/functional/test_create_new_project.py index 809635bd..54e6231e 100644 --- a/lib/toaster/tests/functional/test_create_new_project.py +++ b/lib/toaster/tests/functional/test_create_new_project.py @@ -209,4 +209,19 @@ class TestCreateNewProject(SeleniumFunctionalTestCase): ).text), 'The project release is not defined') + def test_create_new_project_without_name(self): + """ Test create new project without project name """ + self.get(reverse('newproject')) + + select = Select(self.find('#projectversion')) + select.select_by_value(str(3)) + + # Check input name has required attribute + input_name = self.driver.find_element(By.ID, "new-project-name") + self.assertIsNotNone(input_name.get_attribute('required'), + 'Input name has not required attribute') + # Check create button is disabled + create_btn = self.driver.find_element(By.ID, "create-project-button") + self.assertIsNotNone(create_btn.get_attribute('disabled'), + 'Create button is not disabled') -- 2.34.1