bitbake: Toaster: Test create new project without project name

(Bitbake rev: 2670bacd5b2865ed825d24c96ecd12940218b65e)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alassane Yattara
2023-11-09 23:14:56 +01:00
committed by Richard Purdie
parent b4e16b96e1
commit 36871610c3

View File

@@ -132,3 +132,20 @@ class TestCreateNewProject(SeleniumFunctionalTestCase):
release_title,
True,
)
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')