From patchwork Fri Dec 29 15:10:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 37024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D692C47074 for ; Fri, 29 Dec 2023 15:10:57 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web10.150605.1703862648843780350 for ; Fri, 29 Dec 2023 07:10:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=HvDcpG7x; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id B149F9C354C for ; Fri, 29 Dec 2023 10:10:47 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id xJCBOukt1Uxe; Fri, 29 Dec 2023 10:10:46 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id A05D39C27A2; Fri, 29 Dec 2023 10:10:46 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com A05D39C27A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1703862646; bh=TO32D7SFVkQ/w8LKp7FlQs5SCxm8Kp4TL+fLfXMRanQ=; h=From:To:Date:Message-Id:MIME-Version; b=HvDcpG7xL1Jy5Sfgb9HV8ESX0ZzfuBB433yTCj7oGJj9BgXcwhqOP22HeTPSKZE4g R02XxBEBQ5xz4DQ0jxdI/qqxtECvIF6fgFU9LlhuN2eA+LBlxukh5sXikk/mUWZK6c cdI3XV6Z2HQGEvJPY+mN0d67P+saMR9i01rkjtO3ViWzM0X/ilDERDdtjvX8Z2vtP7 1fMq+0VspszkElz91rs17Mh8iMBULvwQIVu8KPut2x1Y2f1tKr6NUHbjrrbgTnCquh 4YOlvkdAvOxuUgN1GL5nTMImhQbHYUbZWg0hSzx4XyB0JP1Hit2ko/cvJT4kMEyEaY 5bEgWD2xyon8w== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id 9OCnSiypAKtG; Fri, 29 Dec 2023 10:10:46 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id BA1E29C14F4; Fri, 29 Dec 2023 10:10:45 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH 1/4] toaster/test: bug-fix An element matching "#projectstable" should be visible Date: Fri, 29 Dec 2023 16:10:21 +0100 Message-Id: <20231229151024.43476-1-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 29 Dec 2023 15:10:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15721 Signed-off-by: Alassane Yattara --- .../tests/browser/selenium_helpers_base.py | 2 + .../tests/functional/test_functional_basic.py | 87 ++++++++++--------- 2 files changed, 46 insertions(+), 43 deletions(-) diff --git a/lib/toaster/tests/browser/selenium_helpers_base.py b/lib/toaster/tests/browser/selenium_helpers_base.py index 13806624..562fedec 100644 --- a/lib/toaster/tests/browser/selenium_helpers_base.py +++ b/lib/toaster/tests/browser/selenium_helpers_base.py @@ -206,6 +206,8 @@ class SeleniumTestCaseBase(unittest.TestCase): is_present = lambda driver: self.find(selector) msg = 'An element matching "%s" should be on the page' % selector element = Wait(self.driver, poll=poll).until(is_present, msg) + if poll > 2: + time.sleep(poll) # element need more delay to be present return element def wait_until_visible(self, selector, poll=1): diff --git a/lib/toaster/tests/functional/test_functional_basic.py b/lib/toaster/tests/functional/test_functional_basic.py index 47f7452e..e4070fbb 100644 --- a/lib/toaster/tests/functional/test_functional_basic.py +++ b/lib/toaster/tests/functional/test_functional_basic.py @@ -14,15 +14,27 @@ from tests.functional.functional_helpers import SeleniumFunctionalTestCase from orm.models import Project from selenium.webdriver.common.by import By +from tests.functional.utils import get_projectId_from_url + +@pytest.mark.django_db @pytest.mark.order("second_to_last") class FuntionalTestBasic(SeleniumFunctionalTestCase): + """Basic functional tests for Toaster""" + project_id = None + + def setUp(self): + super(FuntionalTestBasic, self).setUp() + if not FuntionalTestBasic.project_id: + self._create_slenium_project() + current_url = self.driver.current_url + FuntionalTestBasic.project_id = get_projectId_from_url(current_url) # testcase (1514) - @pytest.mark.django_db - def test_create_slenium_project(self): + def _create_slenium_project(self): project_name = 'selenium-project' self.get(reverse('newproject')) + self.wait_until_visible('#new-project-name', poll=3) self.driver.find_element(By.ID, "new-project-name").send_keys(project_name) self.driver.find_element(By.ID, 'projectversion').click() self.driver.find_element(By.ID, "create-project-button").click() @@ -32,69 +44,68 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): "New project name not in new project notification") self.assertTrue(Project.objects.filter(name=project_name).count(), "New project not found in database") + return Project.objects.last().id # testcase (1515) def test_verify_left_bar_menu(self): self.get(reverse('all-projects')) - self.wait_until_visible('#projectstable', poll=10) + self.wait_until_present('#projectstable', poll=10) self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) self.assertTrue(self.element_exists('#config-nav'),'Configuration Tab does not exist') project_URL=self.get_URL() self.driver.find_element(By.XPATH, '//a[@href="'+project_URL+'"]').click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) try: self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'customimages/"'+"]").click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) self.assertTrue(re.search("Custom images",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'Custom images information is not loading properly') except: self.fail(msg='No Custom images tab available') try: self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'images/"'+"]").click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) self.assertTrue(re.search("Compatible image recipes",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible image recipes information is not loading properly') except: self.fail(msg='No Compatible image tab available') try: self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'softwarerecipes/"'+"]").click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) self.assertTrue(re.search("Compatible software recipes",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible software recipe information is not loading properly') except: self.fail(msg='No Compatible software recipe tab available') try: self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'machines/"'+"]").click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) self.assertTrue(re.search("Compatible machines",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible machine information is not loading properly') except: self.fail(msg='No Compatible machines tab available') try: self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'layers/"'+"]").click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) self.assertTrue(re.search("Compatible layers",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Compatible layer information is not loading properly') except: self.fail(msg='No Compatible layers tab available') try: self.driver.find_element(By.XPATH, "//*[@id='config-nav']/ul/li/a[@href="+'"'+project_URL+'configuration"'+"]").click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) self.assertTrue(re.search("Bitbake variables",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Bitbake variables information is not loading properly') except: self.fail(msg='No Bitbake variables tab available') # testcase (1516) def test_review_configuration_information(self): - self.get('') - self.wait_until_visible('#global-nav', poll=10) - self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() - self.wait_until_visible('#projectstable', poll=10) + self.get(reverse('all-projects')) + self.wait_until_present('#projectstable', poll=10) self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() project_URL=self.get_URL() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) try: self.assertTrue(self.element_exists('#machine-section'),'Machine section for the project configuration page does not exist') self.assertTrue(re.search("qemux86-64",self.driver.find_element(By.XPATH, "//span[@id='project-machine-name']").text),'The machine type is not assigned') @@ -134,12 +145,10 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): # testcase (1517) def test_verify_machine_information(self): - self.get('') - self.wait_until_visible('#global-nav', poll=10) - self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() - self.wait_until_visible('#projectstable', poll=10) + self.get(reverse('all-projects')) + self.wait_until_present('#projectstable', poll=10) self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) try: self.assertTrue(self.element_exists('#machine-section'),'Machine section for the project configuration page does not exist') @@ -153,29 +162,25 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): # testcase (1518) def test_verify_most_built_recipes_information(self): - self.get('') - self.wait_until_visible('#global-nav', poll=10) - self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() - self.wait_until_visible('#projectstable', poll=10) + self.get(reverse('all-projects')) + self.wait_until_present('#projectstable', poll=10) self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) project_URL=self.get_URL() try: self.assertTrue(re.search("You haven't built any recipes yet",self.driver.find_element(By.ID, "no-most-built").text),'Default message of no builds is not present') self.driver.find_element(By.XPATH, "//div[@id='no-most-built']/p/a[@href="+'"'+project_URL+'images/"'+"]").click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) self.assertTrue(re.search("Compatible image recipes",self.driver.find_element(By.XPATH, "//div[@class='col-md-10']").text),'The Choose a recipe to build link is not working properly') except: self.fail(msg='No Most built information in project detail page') # testcase (1519) def test_verify_project_release_information(self): - self.get('') - self.wait_until_visible('#global-nav', poll=10) - self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() - self.wait_until_visible('#projectstable', poll=10) + self.get(reverse('all-projects')) + self.wait_until_present('#projectstable', poll=10) self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) try: self.assertTrue(re.search("Yocto Project master",self.driver.find_element(By.ID, "project-release-title").text),'The project release is not defined') @@ -184,12 +189,10 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): # testcase (1520) def test_verify_layer_information(self): - self.get('') - self.wait_until_visible('#global-nav', poll=10) - self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() - self.wait_until_visible('#projectstable', poll=10) + self.get(reverse('all-projects')) + self.wait_until_present('#projectstable', poll=10) self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) project_URL=self.get_URL() try: self.driver.find_element(By.XPATH, "//div[@id='layer-container']") @@ -216,15 +219,13 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): # testcase (1521) def test_verify_project_detail_links(self): - self.get('') - self.wait_until_visible('#global-nav', poll=10) - self.driver.find_element(By.XPATH, "//div[@id='global-nav']/ul/li/a[@href="+'"'+'/toastergui/projects/'+'"'+"]").click() - self.wait_until_visible('#projectstable', poll=10) + self.get(reverse('all-projects')) + self.wait_until_present('#projectstable', poll=10) self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) project_URL=self.get_URL() self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li[@id='topbar-configuration-tab']/a[@href="+'"'+project_URL+'"'+"]").click() - self.wait_until_visible('#config-nav', poll=10) + self.wait_until_present('#config-nav', poll=10) self.assertTrue(re.search("Configuration",self.driver.find_element(By.XPATH, "//div[@id='project-topbar']/ul[@class='nav nav-tabs']/li[@id='topbar-configuration-tab']/a[@href="+'"'+project_URL+'"'+"]").text), 'Configuration tab in project topbar is misspelled') try: From patchwork Fri Dec 29 15:10:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 37023 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CA6AC47072 for ; Fri, 29 Dec 2023 15:10:57 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.150100.1703862648983324946 for ; Fri, 29 Dec 2023 07:10:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=j0x7Frfc; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 1CE369C14F4 for ; Fri, 29 Dec 2023 10:10:48 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id aXH0_oQzYSja; Fri, 29 Dec 2023 10:10:47 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id D23689C27A2; Fri, 29 Dec 2023 10:10:47 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com D23689C27A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1703862647; bh=PNefWm70TeQUuBTaSpanlS7nZTFnOQyVpG8UDE0cUW4=; h=From:To:Date:Message-Id:MIME-Version; b=j0x7Frfc1yAV3tYOs64tAhGqtUHQNJa9OxYOBrPWl0gBdXGB2ry8v30NCoJipclrE cFR2TYTw3wg+66AyU5iaow2KE7hCXEtjS76N6QeoKeCTII1hrs8UQ5SfxTguZ12cYF 6gH4sEP5xojSgaTbPtLD7jSeFgD1Dy92cVL3aCaltJufwhIzgXcD8JCIZetqYHOwwx 59cqvsrHuUiaH0BWT6BMwqPUfHXhytFHEK83vVEHj25sgHhDfaheDPioHNlwUaPyY4 cBo9Rhlqu0n5OTFEr8sx07tuZIo61rBROMgPksUISKbLGAVs1EvRhPahbmoYn1SOkF TZPFtJUiUfn9A== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id YlaJm7w3pUnr; Fri, 29 Dec 2023 10:10:47 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 212FA9C14F4; Fri, 29 Dec 2023 10:10:47 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH 2/4] toaster/test: bug-fix An element matching "#lastest_builds" should be on the page Date: Fri, 29 Dec 2023 16:10:22 +0100 Message-Id: <20231229151024.43476-2-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231229151024.43476-1-alassane.yattara@savoirfairelinux.com> References: <20231229151024.43476-1-alassane.yattara@savoirfairelinux.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 29 Dec 2023 15:10:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15720 Signed-off-by: Alassane Yattara --- lib/toaster/tests/functional/test_project_page_tab_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/toaster/tests/functional/test_project_page_tab_config.py b/lib/toaster/tests/functional/test_project_page_tab_config.py index 4dbf5aeb..ee1f5c4b 100644 --- a/lib/toaster/tests/functional/test_project_page_tab_config.py +++ b/lib/toaster/tests/functional/test_project_page_tab_config.py @@ -376,7 +376,7 @@ class TestProjectConfigTab(SeleniumFunctionalTestCase): checkbox.click() build_btn = self.find('#freq-build-btn') build_btn.click() - self.wait_until_present('#latest-builds') + self.wait_until_visible('#latest-builds') wait_until_build(self, 'queued cloning starting parsing failed') lastest_builds = self.driver.find_elements( By.XPATH, From patchwork Fri Dec 29 15:10:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 37026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AF61C47079 for ; Fri, 29 Dec 2023 15:10:57 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.150102.1703862649935396871 for ; Fri, 29 Dec 2023 07:10:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=qeKAo4n7; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 45B3E9C2794 for ; Fri, 29 Dec 2023 10:10:49 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id 54beg3WFOvzB; Fri, 29 Dec 2023 10:10:49 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id F1A4D9C27A2; Fri, 29 Dec 2023 10:10:48 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com F1A4D9C27A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1703862648; bh=cfRHpMo0k4RFgs4sMaYVSct7WqcJtTig6qWeGlsX5U0=; h=From:To:Date:Message-Id:MIME-Version; b=qeKAo4n7+JfVuAnokY0OJyKR5KFoZOUKTV4EGnFbl/23rUYG19NHDMUFIVEyPbnnG i5Pb9hVj0JkIQfgho9I2hwgaouhwFxUewfWCIxSWCDqNfRhiqk1sYOsOxkQpX9dy0l vLovTFVuGWkWR6GhmYZNN0zZ7zd2ijEBh6QVS8LdnqmBefXbpgHCUakIIJRJTmE1/X A+IHJ8vsVNNiN8wf4NbpBu9tqmOOYpT0MD5NGsTpu6qMEG2qWgdNvOfjIOXYZYg6du Q9lbzb6wByDvvJylUTUCHuH+Vsm0/aaShtfgamGiHMEat5n2sfTfeFbi9PjRbGzwcm AK2C2IcMyd3rg== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id z6QNaCV7qQjD; Fri, 29 Dec 2023 10:10:48 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 33FF59C2794; Fri, 29 Dec 2023 10:10:48 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH 3/4] toaster/test: Skip to show more then 100 item in ToasterTable Date: Fri, 29 Dec 2023 16:10:23 +0100 Message-Id: <20231229151024.43476-3-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231229151024.43476-1-alassane.yattara@savoirfairelinux.com> References: <20231229151024.43476-1-alassane.yattara@savoirfairelinux.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 29 Dec 2023 15:10:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15722 Signed-off-by: Alassane Yattara --- .../tests/functional/test_project_page.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/toaster/tests/functional/test_project_page.py b/lib/toaster/tests/functional/test_project_page.py index 82dca442..31177cc1 100644 --- a/lib/toaster/tests/functional/test_project_page.py +++ b/lib/toaster/tests/functional/test_project_page.py @@ -494,7 +494,10 @@ class TestProjectPage(SeleniumFunctionalTestCase): ) self._navigate_to_config_nav('softwarerecipestable', 4) # check show rows(pagination) - self._mixin_test_table_show_rows(table_selector='softwarerecipestable') + self._mixin_test_table_show_rows( + table_selector='softwarerecipestable', + to_skip=[150], + ) def test_machines_page(self): """ Test Machine page @@ -561,7 +564,10 @@ class TestProjectPage(SeleniumFunctionalTestCase): ) self._navigate_to_config_nav('machinestable', 5) # check show rows(pagination) - self._mixin_test_table_show_rows(table_selector='machinestable') + self._mixin_test_table_show_rows( + table_selector='machinestable', + to_skip=[150], + ) def test_layers_page(self): """ Test layers page @@ -635,7 +641,10 @@ class TestProjectPage(SeleniumFunctionalTestCase): ) self._navigate_to_config_nav('layerstable', 6) # check show rows(pagination) - self._mixin_test_table_show_rows(table_selector='layerstable') + self._mixin_test_table_show_rows( + table_selector='layerstable', + to_skip=[150], + ) def test_distro_page(self): """ Test distros page @@ -685,7 +694,7 @@ class TestProjectPage(SeleniumFunctionalTestCase): # check show rows(pagination) self._mixin_test_table_show_rows( table_selector='distrostable', - to_skip=[150] + to_skip=[150], ) def test_single_layer_page(self): From patchwork Fri Dec 29 15:10:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 37025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AD4CC47077 for ; Fri, 29 Dec 2023 15:10:57 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web10.150609.1703862651248127095 for ; Fri, 29 Dec 2023 07:10:51 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=I2YQzrZC; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 746089C354C for ; Fri, 29 Dec 2023 10:10:50 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id mbPQXA7v2rfT; Fri, 29 Dec 2023 10:10:50 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 3533E9C14F4; Fri, 29 Dec 2023 10:10:50 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 3533E9C14F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1703862650; bh=Da4MFoe7vd+BTMJ1kjy5jagz4edPKUMS0oWTBlizi7A=; h=From:To:Date:Message-Id:MIME-Version; b=I2YQzrZC7PaVDmpzGl6O6okFmxCY50NlSEl6hYVSe9M2gNXCoNyVR8nfe/dHu0cSV Jm+qAEDVWbUSH/vJepf8s8ZTmVswfkBSirOgmpRZiYPHFAhuyvP/2TzclDwFWysRvQ wAfubNJ6nRyzxPnde5VtbkG16WTh0uzDte6AS1m6xJL1VgPs5Kvc58RRGhzsA4FMz0 lo/Va9HvuNcO/NQGbKvs3ko/DVFM7x+GLl3PjNcFnnyggI+EWO5EVMoftj8EOkS+ae Z6ZSwm/okrA92O+IqQee/DEzhesDIFI+LTRkl0Zg5zcF6XNBzMBXTr3WsHuqxzwTZM SK0nc/5miZF5A== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id KTprohvF5BwS; Fri, 29 Dec 2023 10:10:50 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 5323E9C27A2; Fri, 29 Dec 2023 10:10:49 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH 4/4] toaster/test: Bug-fix "#project-created-notification" should be visible Date: Fri, 29 Dec 2023 16:10:24 +0100 Message-Id: <20231229151024.43476-4-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231229151024.43476-1-alassane.yattara@savoirfairelinux.com> References: <20231229151024.43476-1-alassane.yattara@savoirfairelinux.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 29 Dec 2023 15:10:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15723 Added more delay between click on create project but and when notification is displayed Signed-off-by: Alassane Yattara --- lib/toaster/tests/functional/test_create_new_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/toaster/tests/functional/test_create_new_project.py b/lib/toaster/tests/functional/test_create_new_project.py index bbda0cf4..9f880107 100644 --- a/lib/toaster/tests/functional/test_create_new_project.py +++ b/lib/toaster/tests/functional/test_create_new_project.py @@ -49,7 +49,7 @@ class TestCreateNewProject(SeleniumFunctionalTestCase): self.driver.find_element(By.ID, "create-project-button").click() - element = self.wait_until_visible('#project-created-notification') + element = self.wait_until_visible('#project-created-notification', poll=3) self.assertTrue( self.element_exists('#project-created-notification'), f"Project:{project_name} creation notification not shown"