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 9/9] toaster/test: Test single recipe page
Date: Wed, 29 Nov 2023 23:53:40 +0100	[thread overview]
Message-ID: <20231129225340.477401-9-alassane.yattara@savoirfairelinux.com> (raw)
In-Reply-To: <20231129225340.477401-1-alassane.yattara@savoirfairelinux.com>

Test recipe page
    - Check if title is displayed
    - Check add recipe layer displayed
    - Check left section is displayed
        - Check recipe: name, summary, description, Version, Section,
        License, Approx. packages included, Approx. size, Recipe file

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
 .../tests/functional/test_project_page.py     | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/lib/toaster/tests/functional/test_project_page.py b/lib/toaster/tests/functional/test_project_page.py
index 771a8484..03f64f8f 100644
--- a/lib/toaster/tests/functional/test_project_page.py
+++ b/lib/toaster/tests/functional/test_project_page.py
@@ -756,3 +756,35 @@ class TestProjectPage(SeleniumFunctionalTestCase):
         self.assertTrue("Summary" in section.text)
         # Check layer description
         self.assertTrue("Description" in section.text)
+
+    def test_single_recipe_page(self):
+        """ Test recipe page
+            - Check if title is displayed
+            - Check add recipe layer displayed
+            - Check left section is displayed
+                - Check recipe: name, summary, description, Version, Section,
+                License, Approx. packages included, Approx. size, Recipe file
+        """
+        url = reverse("recipedetails", args=(1, 53428))
+        self.get(url)
+        self.wait_until_visible('.page-header')
+        # check title is displayed
+        self.assertTrue(self.find('.page-header h1').is_displayed())
+        # check add recipe layer displayed
+        add_recipe_layer_btn = self.find('#add-layer-btn')
+        self.assertTrue(add_recipe_layer_btn.is_displayed())
+        # check left section is displayed
+        section = self.find('.well')
+        # Check recipe name
+        self.assertTrue(
+            section.find_element(By.XPATH, '//h2[1]').is_displayed()
+        )
+        # Check recipe sections details info are displayed
+        self.assertTrue("Summary" in section.text)
+        self.assertTrue("Description" in section.text)
+        self.assertTrue("Version" in section.text)
+        self.assertTrue("Section" in section.text)
+        self.assertTrue("License" in section.text)
+        self.assertTrue("Approx. packages included" in section.text)
+        self.assertTrue("Approx. package size" in section.text)
+        self.assertTrue("Recipe file" in section.text)
-- 
2.34.1



      parent reply	other threads:[~2023-11-29 22:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 22:53 [PATCH 1/9] toaster/tests: Update methods wait_until_~ to skip using time.sleep Alassane Yattara
2023-11-29 22:53 ` [PATCH 2/9] toaster/test: Override table edit columns TestCase from image recipe page Alassane Yattara
2023-11-29 22:53 ` [PATCH 3/9] toaster/test: Test software " Alassane Yattara
2023-11-29 22:53 ` [PATCH 4/9] toaster/test: Added Machine page TestCase Alassane Yattara
2023-11-29 22:53 ` [PATCH 5/9] toaster/test: Added Layers " Alassane Yattara
2023-11-29 22:53 ` [PATCH 6/9] toaster/test: Added distro " Alassane Yattara
2023-11-30 17:28   ` [Toaster] " Richard Purdie
2023-11-30 18:29     ` Alassane Yattara
2023-11-30 22:24       ` Richard Purdie
2023-11-30 22:43         ` Alassane Yattara
2023-11-29 22:53 ` [PATCH 7/9] toaster/test: Bug-fix on tests/functional/test_project_page Alassane Yattara
2023-11-29 22:53 ` [PATCH 8/9] toaster/test: Test single layer page Alassane Yattara
2023-11-29 22:53 ` Alassane Yattara [this message]

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=20231129225340.477401-9-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).