From patchwork Tue Jan 9 13:54:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 37531 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 BB896C47073 for ; Tue, 9 Jan 2024 13:54:20 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web10.17192.1704808454188510805 for ; Tue, 09 Jan 2024 05:54:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=caT2YCwx; 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 68A0E9C2AE2 for ; Tue, 9 Jan 2024 08:54:13 -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 ST5fwYhlzSQM; Tue, 9 Jan 2024 08:54:13 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 066259C0B24; Tue, 9 Jan 2024 08:54:13 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 066259C0B24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1704808453; bh=kpj+6CIInwQFgN8SSYHTGNzQ3CjEKsnTJc/AuKY1yu8=; h=From:To:Date:Message-Id:MIME-Version; b=caT2YCwxqU845IZMHwgyHsf+BhVzSXHqZKLccKIfdMJvq9C4600Io+P/y9/FOsoJV VgXZMjr3ibBw/sr6bJYgzeXXg96WOZu6UPaalgBBpKzw+evADCyBUy55ku9aeuZ1EX cpaJi166fsGeohKXhY9f77ptvce7/y454SoQEwROlLH+ChAhS1yaj/AjJ8KgOyFvQK xkOr//onqUwUhWGg8BgnMv0PwXEkBUjIQtuKsXXMNyGxwxW/l+sl+TVTw7Wj8lYYFS 1LhS49IrzWcjkc2A0+UT5Pa8k7ln375fQ4e3vUqZrRQ8w6a9eBD0cXOW42xzYR/Rqj U2pFQnnRzimnw== 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 uIZ9Q6rfR2XG; Tue, 9 Jan 2024 08:54:12 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 68B939C2AE2; Tue, 9 Jan 2024 08:54:12 -0500 (EST) From: Alassane Yattara To: toaster@lists.yoctoproject.org Cc: Alassane Yattara Subject: [PATCH v2 1/3] toaster/test: Setup delay after drvier action self.get(url) Date: Tue, 9 Jan 2024 14:54:06 +0100 Message-Id: <20240109135408.418479-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 ; Tue, 09 Jan 2024 13:54:20 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/toaster/message/6131 Recurring test failures result from insufficient delays in driver actions. Signed-off-by: Alassane Yattara --- lib/toaster/tests/browser/selenium_helpers_base.py | 7 +++++++ lib/toaster/tests/browser/test_all_builds_page.py | 4 +++- lib/toaster/tests/browser/test_builddashboard_page.py | 1 + lib/toaster/tests/browser/test_new_custom_image_page.py | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/toaster/tests/browser/selenium_helpers_base.py b/lib/toaster/tests/browser/selenium_helpers_base.py index 562fedec..393be754 100644 --- a/lib/toaster/tests/browser/selenium_helpers_base.py +++ b/lib/toaster/tests/browser/selenium_helpers_base.py @@ -182,6 +182,13 @@ class SeleniumTestCaseBase(unittest.TestCase): abs_url = '%s%s' % (self.live_server_url, url) self.driver.get(abs_url) + try: # Ensure page is loaded before proceeding + self.wait_until_visible("#global-nav", poll=3) + except NoSuchElementException: + self.driver.implicitly_wait(3) + except TimeoutException: + self.driver.implicitly_wait(3) + def find(self, selector): """ Find single element by CSS selector """ return self.driver.find_element(By.CSS_SELECTOR, selector) diff --git a/lib/toaster/tests/browser/test_all_builds_page.py b/lib/toaster/tests/browser/test_all_builds_page.py index 7019b3db..ab6da821 100644 --- a/lib/toaster/tests/browser/test_all_builds_page.py +++ b/lib/toaster/tests/browser/test_all_builds_page.py @@ -224,6 +224,7 @@ class TestAllBuildsPage(SeleniumTestCase): url = reverse('all-builds') self.get(url) + self.wait_until_visible('#allbuildstable', poll=3) # get the project name cells from the table cells = self.find_all('#allbuildstable td[class="project"]') @@ -232,7 +233,7 @@ class TestAllBuildsPage(SeleniumTestCase): for cell in cells: content = cell.get_attribute('innerHTML') - help_icons = cell.find_elements_by_css_selector(selector) + help_icons = cell.find_elements(By.CSS_SELECTOR, selector) if re.search(self.PROJECT_NAME, content): # no help icon next to non-cli project name @@ -256,6 +257,7 @@ class TestAllBuildsPage(SeleniumTestCase): url = reverse('all-builds') self.get(url) + self.wait_until_visible('#allbuildstable', poll=3) # test recent builds area for successful build element = self._get_build_time_element(build1) diff --git a/lib/toaster/tests/browser/test_builddashboard_page.py b/lib/toaster/tests/browser/test_builddashboard_page.py index b713f300..d838ce36 100644 --- a/lib/toaster/tests/browser/test_builddashboard_page.py +++ b/lib/toaster/tests/browser/test_builddashboard_page.py @@ -162,6 +162,7 @@ class TestBuildDashboardPage(SeleniumTestCase): """ url = reverse('builddashboard', args=(build.id,)) self.get(url) + self.wait_until_visible('#global-nav', poll=3) def _get_build_dashboard_errors(self, build): """ diff --git a/lib/toaster/tests/browser/test_new_custom_image_page.py b/lib/toaster/tests/browser/test_new_custom_image_page.py index 4ad22c7a..9f0b6397 100644 --- a/lib/toaster/tests/browser/test_new_custom_image_page.py +++ b/lib/toaster/tests/browser/test_new_custom_image_page.py @@ -90,6 +90,7 @@ class TestNewCustomImagePage(SeleniumTestCase): """ url = reverse('newcustomimage', args=(self.project.id,)) self.get(url) + self.wait_until_visible('#global-nav', poll=3) self.click('button[data-recipe="%s"]' % self.recipe.id) From patchwork Tue Jan 9 13:54:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 37530 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 B6928C46CD2 for ; Tue, 9 Jan 2024 13:54:20 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web10.17193.1704808454845698427 for ; Tue, 09 Jan 2024 05:54:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=uQQ9Aji6; 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 3DEA69C37C9 for ; Tue, 9 Jan 2024 08:54:14 -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 GVXNUYKjO0MD; Tue, 9 Jan 2024 08:54:14 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id EC8B09C0B24; Tue, 9 Jan 2024 08:54:13 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com EC8B09C0B24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1704808453; bh=UkLfyjM4OdlRSPJ5BcZXvkIWvhyghgi/K4h0N5TTjBk=; h=From:To:Date:Message-Id:MIME-Version; b=uQQ9Aji6XO79nJfJXL6mTErGySbN+0smiR0koNS67eVyjNBHw0lrI94MoX6EbQc4z YcytZaDXJM+waZhdVMlF7HqD3Q5NjGseDfgTOgIHti5bVhv09ncOXA83Jhbrcy1emb Y9ce5p+tNzpacOVbgq+a4XZ706s15PX4yye1p/vWwctOTrIWyu/Y7PBgoz7JYCJBTr NCTOWz/biv0INuu5ZKv0x2H74qaw6ePZIRF6+ya02RPoZu00xh6jJeC8M/Ldp9DB7t 3Exumbo6x/zUXZxPfc7qFK3K7HrinJMDWGZEdHVDFJi9fOnMDFmrfrZe/jfY06tpSf D5//cw1ZZvbSw== 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 0sqoPi-o_279; Tue, 9 Jan 2024 08:54:13 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 39BB49C160A; Tue, 9 Jan 2024 08:54:13 -0500 (EST) From: Alassane Yattara To: toaster@lists.yoctoproject.org Cc: Alassane Yattara Subject: [PATCH v2 2/3] toaster/test: bug-fix "#hint-error-project-name" should be visible Date: Tue, 9 Jan 2024 14:54:07 +0100 Message-Id: <20240109135408.418479-2-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240109135408.418479-1-alassane.yattara@savoirfairelinux.com> References: <20240109135408.418479-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 ; Tue, 09 Jan 2024 13:54:20 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/toaster/message/6132 Failed: https://autobuilder.yoctoproject.org/typhoon/#/builders/161/builds/142 Signed-off-by: Alassane Yattara --- lib/toaster/tests/browser/test_new_project_page.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/toaster/tests/browser/test_new_project_page.py b/lib/toaster/tests/browser/test_new_project_page.py index 70b55f3c..458bb653 100644 --- a/lib/toaster/tests/browser/test_new_project_page.py +++ b/lib/toaster/tests/browser/test_new_project_page.py @@ -79,6 +79,7 @@ class TestNewProjectPage(SeleniumTestCase): url = reverse('newproject') self.get(url) + self.wait_until_visible('#new-project-name', poll=3) self.enter_text('#new-project-name', project_name) @@ -90,7 +91,8 @@ class TestNewProjectPage(SeleniumTestCase): self.click("#create-project-button") - element = self.wait_until_visible('#hint-error-project-name', poll=3) + self.wait_until_present('#hint-error-project-name', poll=3) + element = self.find('#hint-error-project-name') self.assertTrue(("Project names must be unique" in element.text), "Did not find unique project name error message") From patchwork Tue Jan 9 13:54:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 37532 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 DA4FAC47077 for ; Tue, 9 Jan 2024 13:54:20 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web10.17195.1704808455618264065 for ; Tue, 09 Jan 2024 05:54:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=QMCONQfN; 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 069EF9C160A for ; Tue, 9 Jan 2024 08:54:15 -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 4AdCQSWNT-W7; Tue, 9 Jan 2024 08:54:14 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id B307B9C0B24; Tue, 9 Jan 2024 08:54:14 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com B307B9C0B24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1704808454; bh=Y5b0afQttCY+9gE5JDU0ys2ArvraUmbad6XH03DefoE=; h=From:To:Date:Message-Id:MIME-Version; b=QMCONQfNIRaLtmA8oNsPs0SBi7RXvHXI6YlHOQ+dysSqeF07Ogk+6zB20vtGoIghw l1xQloqdixkcwHXUKEnAmYLdgoxk10uFZ4I4mkHUaaaCijpxUeyjquuMt2r/1JIR4O V1NuXrXDFrm84SJ2CC4ZgyGi3ngdX0BlxNfigBF9WdN4WdgwixWHh0VuNTSiyB+HUT sI+8rab2AOYPaV5fRZ0m0/UoAa/D0N9AarZcBcvCc3UKc1cEGCOaZsQk9sX6CxELlu d4asRGE1MGJtlqWsM3kLVbP25BhDoJIGs6hIZhwUvexkmg8vMhSJ6VW8DwsSPeEpqc /OQ/vPeYyT7pg== 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 wyJ6QcXTbjrr; Tue, 9 Jan 2024 08:54:14 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 2BCA19C160A; Tue, 9 Jan 2024 08:54:14 -0500 (EST) From: Alassane Yattara To: toaster@lists.yoctoproject.org Cc: Alassane Yattara Subject: [PATCH v2 3/3] toaster/test: Bug-fix "element not interactable" in TestLayerDetailsPage::test_edit_layerdetails Date: Tue, 9 Jan 2024 14:54:08 +0100 Message-Id: <20240109135408.418479-3-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240109135408.418479-1-alassane.yattara@savoirfairelinux.com> References: <20240109135408.418479-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 ; Tue, 09 Jan 2024 13:54:20 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/toaster/message/6133 Failed: https://autobuilder.yoctoproject.org/typhoon/#/builders/161/builds/143/steps/12/logs/stdio Signed-off-by: Alassane Yattara --- lib/toaster/tests/browser/test_layerdetails_page.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/toaster/tests/browser/test_layerdetails_page.py b/lib/toaster/tests/browser/test_layerdetails_page.py index 9deef670..5c29548b 100644 --- a/lib/toaster/tests/browser/test_layerdetails_page.py +++ b/lib/toaster/tests/browser/test_layerdetails_page.py @@ -64,7 +64,7 @@ class TestLayerDetailsPage(SeleniumTestCase): args=(self.project.pk, self.imported_layer_version.pk)) - def test_edit_layerdetails(self): + def _edit_layerdetails(self): """ Edit all the editable fields for the layer refresh the page and check that the new values exist""" @@ -168,6 +168,13 @@ class TestLayerDetailsPage(SeleniumTestCase): "Expected %s in the dir value for layer directory" % new_dir) + def test_edit_layerdetails_page(self): + try: + self._edit_layerdetails() + except ElementClickInterceptedException: + self.skipTest( + "ElementClickInterceptedException occured. Element not visible or maybe covered by another element.") + def test_delete_layer(self): """ Delete the layer """