toaster.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
To: toaster@lists.yoctoproject.org
Cc: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Subject: [PATCH 5/7] Toaster: Write UI TestCase -> Test project page section images
Date: Tue, 21 Nov 2023 14:50:41 +0100	[thread overview]
Message-ID: <20231121135043.105385-5-alassane.yattara@savoirfairelinux.com> (raw)
In-Reply-To: <20231121135043.105385-1-alassane.yattara@savoirfairelinux.com>

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 <alassane.yattara@savoirfairelinux.com>
---
 .../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)
-- 
2.34.1



  parent reply	other threads:[~2023-11-21 13:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 13:50 [PATCH 1/7] Toaster: Write UI TestCase -> Test project config tab navigation: Alassane Yattara
2023-11-21 13:50 ` [PATCH 2/7] Toaster: Write UI TestCase -> Test project config tab Alassane Yattara
2023-11-21 13:50 ` [PATCH 3/7] Toaster: Write UI TestCase -> Test project page tab import layer Alassane Yattara
2023-11-21 13:50 ` [PATCH 4/7] Toaster: Write UI TestCase -> Test project page tab "New custom image" Alassane Yattara
2023-11-21 13:50 ` Alassane Yattara [this message]
2023-11-21 13:50 ` [PATCH 6/7] Toaster: Write UI TestCase -> the edit column feature in image recipe Alassane Yattara
2023-11-21 13:50 ` [PATCH 7/7] Toaster: Write UI TestCase -> Test the show rows " Alassane Yattara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231121135043.105385-5-alassane.yattara@savoirfairelinux.com \
    --to=alassane.yattara@savoirfairelinux.com \
    --cc=toaster@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).