diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-17 23:04:03 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-24 11:24:03 +0100 |
| commit | d4288a778557ebfc2653bf9e570ae3f131702a14 (patch) | |
| tree | dcfceaaaa941ad1d17762d06927b2bd29777e736 /bitbake/lib/toaster/tests | |
| parent | 9ed0df26fb56d7e784eb5a7ee03bb065eed1fef0 (diff) | |
| download | poky-d4288a778557ebfc2653bf9e570ae3f131702a14.tar.gz | |
bitbake: toaster/tests/functional_basic: Reuse common project creation code
Switch this test module to use the common project creation code which contains
race fixes. That code requires the database access wrapper be dropped and
we no longer have ordering constraints.
(Bitbake rev: f015d96e28d89fd0aef76ff127ebde8613125a66)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/tests')
| -rw-r--r-- | bitbake/lib/toaster/tests/functional/test_functional_basic.py | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/bitbake/lib/toaster/tests/functional/test_functional_basic.py b/bitbake/lib/toaster/tests/functional/test_functional_basic.py index e4070fbb88..e2d1c7dd86 100644 --- a/bitbake/lib/toaster/tests/functional/test_functional_basic.py +++ b/bitbake/lib/toaster/tests/functional/test_functional_basic.py | |||
| @@ -17,8 +17,6 @@ from selenium.webdriver.common.by import By | |||
| 17 | from tests.functional.utils import get_projectId_from_url | 17 | from tests.functional.utils import get_projectId_from_url |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | @pytest.mark.django_db | ||
| 21 | @pytest.mark.order("second_to_last") | ||
| 22 | class FuntionalTestBasic(SeleniumFunctionalTestCase): | 20 | class FuntionalTestBasic(SeleniumFunctionalTestCase): |
| 23 | """Basic functional tests for Toaster""" | 21 | """Basic functional tests for Toaster""" |
| 24 | project_id = None | 22 | project_id = None |
| @@ -26,25 +24,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): | |||
| 26 | def setUp(self): | 24 | def setUp(self): |
| 27 | super(FuntionalTestBasic, self).setUp() | 25 | super(FuntionalTestBasic, self).setUp() |
| 28 | if not FuntionalTestBasic.project_id: | 26 | if not FuntionalTestBasic.project_id: |
| 29 | self._create_slenium_project() | 27 | FuntionalTestBasic.project_id = self.create_new_project('selenium-project', '3', None, False) |
| 30 | current_url = self.driver.current_url | ||
| 31 | FuntionalTestBasic.project_id = get_projectId_from_url(current_url) | ||
| 32 | |||
| 33 | # testcase (1514) | ||
| 34 | def _create_slenium_project(self): | ||
| 35 | project_name = 'selenium-project' | ||
| 36 | self.get(reverse('newproject')) | ||
| 37 | self.wait_until_visible('#new-project-name', poll=3) | ||
| 38 | self.driver.find_element(By.ID, "new-project-name").send_keys(project_name) | ||
| 39 | self.driver.find_element(By.ID, 'projectversion').click() | ||
| 40 | self.driver.find_element(By.ID, "create-project-button").click() | ||
| 41 | element = self.wait_until_visible('#project-created-notification', poll=10) | ||
| 42 | self.assertTrue(self.element_exists('#project-created-notification'),'Project creation notification not shown') | ||
| 43 | self.assertTrue(project_name in element.text, | ||
| 44 | "New project name not in new project notification") | ||
| 45 | self.assertTrue(Project.objects.filter(name=project_name).count(), | ||
| 46 | "New project not found in database") | ||
| 47 | return Project.objects.last().id | ||
| 48 | 28 | ||
| 49 | # testcase (1515) | 29 | # testcase (1515) |
| 50 | def test_verify_left_bar_menu(self): | 30 | def test_verify_left_bar_menu(self): |
