From patchwork Tue Nov 21 13:50:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 34957 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 34B0DC61D98 for ; Tue, 21 Nov 2023 13:51:00 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.40858.1700574654495508208 for ; Tue, 21 Nov 2023 05:50:54 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=ttFOcbEY; 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 CD7199C2B49 for ; Tue, 21 Nov 2023 08:50:53 -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 ym909dX0Ao97; Tue, 21 Nov 2023 08:50:53 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 213889C3500; Tue, 21 Nov 2023 08:50:53 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 213889C3500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1700574653; bh=BO8FHi+Vs2rnZMyhZTz1/TT9VaYCIEBWFW+FRXpULF8=; h=From:To:Date:Message-Id:MIME-Version; b=ttFOcbEYofxEOIZOGPn7jw3jizdrZ2cR11R8fzvT3D7jbkLxDZrhGiIDRIVzXC0B/ GugO2Z8+4KPMZBClN2zXn5VXrb67uQhnSODlM8s8AoT5EBS/Y/kr8WMH4vnSclMerw YvkOt8FCAq4xBLkymQoxRquLUrCihKr8t3mS+GTFcw/p5CfrfIhyCq2Gya/LXyjSBv Dz71t79kvtIXTlwBUgIP9BpfPQuzQHr1KuOa+uTpj2psVSRuekTFl3VNRmy5zd1iSr o6ZeYEPtySnICJPvpE27pcTwJFuvmYAnZh4ck8/qPTnyudfkBnmdAnsDdJxNYmIKbS x2jgHee7pYw7w== 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 X-hqFxVfqTl4; Tue, 21 Nov 2023 08:50:53 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 3E6089C3675; Tue, 21 Nov 2023 08:50:52 -0500 (EST) From: Alassane Yattara To: toaster@lists.yoctoproject.org Cc: Alassane Yattara Subject: [PATCH 5/7] Toaster: Write UI TestCase -> Test project page section images Date: Tue, 21 Nov 2023 14:50:41 +0100 Message-Id: <20231121135043.105385-5-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231121135043.105385-1-alassane.yattara@savoirfairelinux.com> References: <20231121135043.105385-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, 21 Nov 2023 13:51:00 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/toaster/message/6016 BUILD IMAGE RECIPES: toastergui/project/{id}/images/ Test project page section images - Check image recipes are displayed - Check search input - Check image recipe build button works - Check image recipe table features(show/hide column, pagination) Signed-off-by: Alassane Yattara --- .../test_project_page_tab_config.py | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) 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 c6d952fd..598a8055 100644 --- a/lib/toaster/tests/functional/test_project_page_tab_config.py +++ b/lib/toaster/tests/functional/test_project_page_tab_config.py @@ -380,3 +380,44 @@ class TestProjectConfigTab(SeleniumFunctionalTestCase): link_create_custom_image.text ) ) + + def test_project_page_image_recipe(self): + """ Test project page section images + - Check image recipes are displayed + - Check search input + - Check image recipe build button works + - Check image recipe table features(show/hide column, pagination) + """ + # navigate to the project page + url = reverse("project", args=(1,)) + self.get(url) + self.wait_until_visible('#config-nav') + + # navigate to "Images section" + images_section = self._get_config_nav_item(3) + images_section.click() + self.wait_until_visible('#imagerecipestable') + rows = self.find_all('#imagerecipestable tbody tr') + self.assertTrue(len(rows) > 0) + + # Test search input + self.wait_until_visible('#search-input-imagerecipestable') + recipe_input = self.find('#search-input-imagerecipestable') + recipe_input.send_keys('core-image-minimal') + self.find('#search-submit-imagerecipestable').click() + rows = self.find_all('#imagerecipestable tbody tr') + self.assertTrue(len(rows) > 0) + + # Test build button + image_to_build = rows[0] + build_btn = image_to_build.find_element( + By.XPATH, + '//td[@class="add-del-layers"]' + ) + build_btn.click() + self._wait_until_build('parsing starting cloning') + lastest_builds = self.driver.find_elements( + By.XPATH, + '//div[@id="latest-builds"]/div' + ) + self.assertTrue(len(lastest_builds) > 0)