diff mbox series

[v2,3/3] Toaster: Test jumbotron links visible and clickable

Message ID 20231031184438.743924-1-alassane.yattara@savoirfairelinux.com
State New
Headers show
Series None | expand

Commit Message

Alassane Yattara Oct. 31, 2023, 6:44 p.m. UTC
Test that the followings link are visible and clickable:
 - OpenEmbedded
 - BitBake
 - Yocto Project
 - Read the Toaster manual
 - Contribute to Toaster

 - Fixed typo: using instead of usign line:97
 - Remove whitespace

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
 .../tests/browser/test_landing_page.py        | 89 ++++++++++++++++++-
 1 file changed, 88 insertions(+), 1 deletion(-)

Comments

Alexandre Belloni Nov. 2, 2023, 2:42 p.m. UTC | #1
Hello,

I'm sorry, I have a hard time finding what to apply and in which order.

For example, this patch was sent alone and doesn't apply on master:

Alassane Yattara   31/10/23 15:20 [bitbake-devel] [PATCH 4/4] Toaster: Remove unused sleep import from time

This one was also sent alone:

Alassane Yattara   31/10/23 19:44 [bitbake-devel] [PATCH v2 3/3] Toaster: Test jumbotron links visible and clickable

While I could go and try to find the series it is part of, this imposes
work on the maintainer.

Can you make sure you send full series that apply on master or
master-next every time?


Also if series are depending on each other, then, this should be only
one series or you should probably wait for the first series to be
applied.

Maybe you could provide a bitbake branch so I can know what you expect
to be merged? If you do so, please ensure the content of the branch is
exactly what you sent on the list. Ideally, you would collect review
tags.

Thanks!

On 31/10/2023 19:44:38+0100, Alassane Yattara wrote:
> Test that the followings link are visible and clickable:
>  - OpenEmbedded
>  - BitBake
>  - Yocto Project
>  - Read the Toaster manual
>  - Contribute to Toaster
> 
>  - Fixed typo: using instead of usign line:97
>  - Remove whitespace
> 
> Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
> ---
>  .../tests/browser/test_landing_page.py        | 89 ++++++++++++++++++-
>  1 file changed, 88 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/toaster/tests/browser/test_landing_page.py b/lib/toaster/tests/browser/test_landing_page.py
> index e731af22..756497bd 100644
> --- a/lib/toaster/tests/browser/test_landing_page.py
> +++ b/lib/toaster/tests/browser/test_landing_page.py
> @@ -12,7 +12,7 @@ from django.urls import reverse
>  from django.utils import timezone
>  from tests.browser.selenium_helpers import SeleniumTestCase
>  
> -from orm.models import Project, Build
> +from orm.models import Layer, Layer_Version, Project, Build
>  
>  class TestLandingPage(SeleniumTestCase):
>      """ Tests for redirects on the landing page """
> @@ -61,6 +61,93 @@ class TestLandingPage(SeleniumTestCase):
>              'http://docs.yoctoproject.org/toaster-manual/index.html#toaster-user-manual')
>          self.assertTrue("Documentation" in documentation_link.text)
>  
> +    def test_openembedded_jumbotron_link_visible_and_clickable(self):
> +        """ Test OpenEmbedded link jumbotron is visible and clickable: """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check OpenEmbedded
> +        openembedded = jumbotron.find_element_by_link_text('OpenEmbedded')
> +        self.assertTrue(openembedded.is_displayed())
> +        openembedded.click()
> +        self.assertTrue("openembedded.org" in self.driver.current_url)
> +
> +    def test_bitbake_jumbotron_link_visible_and_clickable(self):
> +        """ Test BitBake link jumbotron is visible and clickable: """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check BitBake
> +        bitbake = jumbotron.find_element_by_link_text('BitBake')
> +        self.assertTrue(bitbake.is_displayed())
> +        bitbake.click()
> +        self.assertTrue("yoctoproject.org/software-item/bitbake" in self.driver.current_url)
> +
> +    def test_yoctoproject_jumbotron_link_visible_and_clickable(self):
> +        """ Test Yocto Project link jumbotron is visible and clickable: """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check Yocto Project
> +        yoctoproject = jumbotron.find_element_by_link_text('Yocto Project')
> +        self.assertTrue(yoctoproject.is_displayed())
> +        yoctoproject.click()
> +        self.assertTrue("yoctoproject.org" in self.driver.current_url)
> +
> +    def test_link_setup_using_toaster_visible_and_clickable(self):
> +        """ Test big magenta button setting up and using toaster link in jumbotron
> +            if visible and clickable
> +        """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check Big magenta button
> +        big_magenta_button = jumbotron.find_element_by_link_text(
> +            'Toaster is ready to capture your command line builds'
> +        )
> +        self.assertTrue(big_magenta_button.is_displayed())
> +        big_magenta_button.click()
> +        self.assertTrue("docs.yoctoproject.org/toaster-manual/setup-and-use.html#setting-up-and-using-toaster" in self.driver.current_url)
> +
> +    def test_link_create_new_project_in_jumbotron_visible_and_clickable(self):
> +        """ Test big blue button create new project jumbotron if visible and clickable """
> +        # Create a layer and a layer version to make visible the big blue button
> +        layer = Layer.objects.create(name='bar')
> +        Layer_Version.objects.create(layer=layer)
> +
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check Big Blue button
> +        big_blue_button = jumbotron.find_element_by_link_text(
> +            'Create your first Toaster project to run manage builds'
> +        )
> +        self.assertTrue(big_blue_button.is_displayed())
> +        big_blue_button.click()
> +        self.assertTrue("toastergui/newproject/" in self.driver.current_url)
> +
> +    def test_toaster_manual_link_visible_and_clickable(self):
> +        """ Test Read the Toaster manual link jumbotron is visible and clickable: """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check Read the Toaster manual
> +        toaster_manual = jumbotron.find_element_by_link_text('Read the Toaster manual')
> +        self.assertTrue(toaster_manual.is_displayed())
> +        toaster_manual.click()
> +        self.assertTrue("https://docs.yoctoproject.org/toaster-manual/index.html#toaster-user-manual" in self.driver.current_url)
> +
> +    def test_contrib_to_toaster_link_visible_and_clickable(self):
> +        """ Test Contribute to Toaster link jumbotron is visible and clickable: """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check Contribute to Toaster
> +        contribute_to_toaster = jumbotron.find_element_by_link_text('Contribute to Toaster')
> +        self.assertTrue(contribute_to_toaster.is_displayed())
> +        contribute_to_toaster.click()
> +        self.assertTrue("wiki.yoctoproject.org/wiki/contribute_to_toaster" in str(self.driver.current_url).lower())
> +
>      def test_only_default_project(self):
>          """
>          No projects except default
> -- 
> 2.34.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#15379): https://lists.openembedded.org/g/bitbake-devel/message/15379
> Mute This Topic: https://lists.openembedded.org/mt/102304202/3617179
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Alassane Yattara Nov. 2, 2023, 2:58 p.m. UTC | #2
Alexander,

You right i sent [PATCH v2 3/3] Toaster: Test jumbotron links visible and clickable,

But not an "v2" for [bitbake-devel] [PATCH 4/4] Toaster: Remove unused sleep import from time,  because it hasn't.

i'll send a full series together.

Thanks,
Alassane
----- Mail original -----
De: "Alexandre Belloni" <alexandre.belloni@bootlin.com>
À: "Alassane Yattara" <alassane.yattara@savoirfairelinux.com>, "Marlon Rodriguez Garcia" <marlon.rodriguez-garcia@savoirfairelinux.com>
Cc: "bitbake-devel" <bitbake-devel@lists.openembedded.org>
Envoyé: Jeudi 2 Novembre 2023 15:42:53
Objet: Re: [bitbake-devel] [PATCH v2 3/3] Toaster: Test jumbotron links visible and clickable

Hello,

I'm sorry, I have a hard time finding what to apply and in which order.

For example, this patch was sent alone and doesn't apply on master:

Alassane Yattara   31/10/23 15:20 [bitbake-devel] [PATCH 4/4] Toaster: Remove unused sleep import from time

This one was also sent alone:

Alassane Yattara   31/10/23 19:44 [bitbake-devel] [PATCH v2 3/3] Toaster: Test jumbotron links visible and clickable

While I could go and try to find the series it is part of, this imposes
work on the maintainer.

Can you make sure you send full series that apply on master or
master-next every time?


Also if series are depending on each other, then, this should be only
one series or you should probably wait for the first series to be
applied.

Maybe you could provide a bitbake branch so I can know what you expect
to be merged? If you do so, please ensure the content of the branch is
exactly what you sent on the list. Ideally, you would collect review
tags.

Thanks!

On 31/10/2023 19:44:38+0100, Alassane Yattara wrote:
> Test that the followings link are visible and clickable:
>  - OpenEmbedded
>  - BitBake
>  - Yocto Project
>  - Read the Toaster manual
>  - Contribute to Toaster
> 
>  - Fixed typo: using instead of usign line:97
>  - Remove whitespace
> 
> Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
> ---
>  .../tests/browser/test_landing_page.py        | 89 ++++++++++++++++++-
>  1 file changed, 88 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/toaster/tests/browser/test_landing_page.py b/lib/toaster/tests/browser/test_landing_page.py
> index e731af22..756497bd 100644
> --- a/lib/toaster/tests/browser/test_landing_page.py
> +++ b/lib/toaster/tests/browser/test_landing_page.py
> @@ -12,7 +12,7 @@ from django.urls import reverse
>  from django.utils import timezone
>  from tests.browser.selenium_helpers import SeleniumTestCase
>  
> -from orm.models import Project, Build
> +from orm.models import Layer, Layer_Version, Project, Build
>  
>  class TestLandingPage(SeleniumTestCase):
>      """ Tests for redirects on the landing page """
> @@ -61,6 +61,93 @@ class TestLandingPage(SeleniumTestCase):
>              'http://docs.yoctoproject.org/toaster-manual/index.html#toaster-user-manual')
>          self.assertTrue("Documentation" in documentation_link.text)
>  
> +    def test_openembedded_jumbotron_link_visible_and_clickable(self):
> +        """ Test OpenEmbedded link jumbotron is visible and clickable: """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check OpenEmbedded
> +        openembedded = jumbotron.find_element_by_link_text('OpenEmbedded')
> +        self.assertTrue(openembedded.is_displayed())
> +        openembedded.click()
> +        self.assertTrue("openembedded.org" in self.driver.current_url)
> +
> +    def test_bitbake_jumbotron_link_visible_and_clickable(self):
> +        """ Test BitBake link jumbotron is visible and clickable: """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check BitBake
> +        bitbake = jumbotron.find_element_by_link_text('BitBake')
> +        self.assertTrue(bitbake.is_displayed())
> +        bitbake.click()
> +        self.assertTrue("yoctoproject.org/software-item/bitbake" in self.driver.current_url)
> +
> +    def test_yoctoproject_jumbotron_link_visible_and_clickable(self):
> +        """ Test Yocto Project link jumbotron is visible and clickable: """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check Yocto Project
> +        yoctoproject = jumbotron.find_element_by_link_text('Yocto Project')
> +        self.assertTrue(yoctoproject.is_displayed())
> +        yoctoproject.click()
> +        self.assertTrue("yoctoproject.org" in self.driver.current_url)
> +
> +    def test_link_setup_using_toaster_visible_and_clickable(self):
> +        """ Test big magenta button setting up and using toaster link in jumbotron
> +            if visible and clickable
> +        """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check Big magenta button
> +        big_magenta_button = jumbotron.find_element_by_link_text(
> +            'Toaster is ready to capture your command line builds'
> +        )
> +        self.assertTrue(big_magenta_button.is_displayed())
> +        big_magenta_button.click()
> +        self.assertTrue("docs.yoctoproject.org/toaster-manual/setup-and-use.html#setting-up-and-using-toaster" in self.driver.current_url)
> +
> +    def test_link_create_new_project_in_jumbotron_visible_and_clickable(self):
> +        """ Test big blue button create new project jumbotron if visible and clickable """
> +        # Create a layer and a layer version to make visible the big blue button
> +        layer = Layer.objects.create(name='bar')
> +        Layer_Version.objects.create(layer=layer)
> +
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check Big Blue button
> +        big_blue_button = jumbotron.find_element_by_link_text(
> +            'Create your first Toaster project to run manage builds'
> +        )
> +        self.assertTrue(big_blue_button.is_displayed())
> +        big_blue_button.click()
> +        self.assertTrue("toastergui/newproject/" in self.driver.current_url)
> +
> +    def test_toaster_manual_link_visible_and_clickable(self):
> +        """ Test Read the Toaster manual link jumbotron is visible and clickable: """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check Read the Toaster manual
> +        toaster_manual = jumbotron.find_element_by_link_text('Read the Toaster manual')
> +        self.assertTrue(toaster_manual.is_displayed())
> +        toaster_manual.click()
> +        self.assertTrue("https://docs.yoctoproject.org/toaster-manual/index.html#toaster-user-manual" in self.driver.current_url)
> +
> +    def test_contrib_to_toaster_link_visible_and_clickable(self):
> +        """ Test Contribute to Toaster link jumbotron is visible and clickable: """
> +        self.get(reverse('landing'))
> +        jumbotron = self.find('.jumbotron')
> +
> +        # check Contribute to Toaster
> +        contribute_to_toaster = jumbotron.find_element_by_link_text('Contribute to Toaster')
> +        self.assertTrue(contribute_to_toaster.is_displayed())
> +        contribute_to_toaster.click()
> +        self.assertTrue("wiki.yoctoproject.org/wiki/contribute_to_toaster" in str(self.driver.current_url).lower())
> +
>      def test_only_default_project(self):
>          """
>          No projects except default
> -- 
> 2.34.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#15379): https://lists.openembedded.org/g/bitbake-devel/message/15379
> Mute This Topic: https://lists.openembedded.org/mt/102304202/3617179
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/lib/toaster/tests/browser/test_landing_page.py b/lib/toaster/tests/browser/test_landing_page.py
index e731af22..756497bd 100644
--- a/lib/toaster/tests/browser/test_landing_page.py
+++ b/lib/toaster/tests/browser/test_landing_page.py
@@ -12,7 +12,7 @@  from django.urls import reverse
 from django.utils import timezone
 from tests.browser.selenium_helpers import SeleniumTestCase
 
-from orm.models import Project, Build
+from orm.models import Layer, Layer_Version, Project, Build
 
 class TestLandingPage(SeleniumTestCase):
     """ Tests for redirects on the landing page """
@@ -61,6 +61,93 @@  class TestLandingPage(SeleniumTestCase):
             'http://docs.yoctoproject.org/toaster-manual/index.html#toaster-user-manual')
         self.assertTrue("Documentation" in documentation_link.text)
 
+    def test_openembedded_jumbotron_link_visible_and_clickable(self):
+        """ Test OpenEmbedded link jumbotron is visible and clickable: """
+        self.get(reverse('landing'))
+        jumbotron = self.find('.jumbotron')
+
+        # check OpenEmbedded
+        openembedded = jumbotron.find_element_by_link_text('OpenEmbedded')
+        self.assertTrue(openembedded.is_displayed())
+        openembedded.click()
+        self.assertTrue("openembedded.org" in self.driver.current_url)
+
+    def test_bitbake_jumbotron_link_visible_and_clickable(self):
+        """ Test BitBake link jumbotron is visible and clickable: """
+        self.get(reverse('landing'))
+        jumbotron = self.find('.jumbotron')
+
+        # check BitBake
+        bitbake = jumbotron.find_element_by_link_text('BitBake')
+        self.assertTrue(bitbake.is_displayed())
+        bitbake.click()
+        self.assertTrue("yoctoproject.org/software-item/bitbake" in self.driver.current_url)
+
+    def test_yoctoproject_jumbotron_link_visible_and_clickable(self):
+        """ Test Yocto Project link jumbotron is visible and clickable: """
+        self.get(reverse('landing'))
+        jumbotron = self.find('.jumbotron')
+
+        # check Yocto Project
+        yoctoproject = jumbotron.find_element_by_link_text('Yocto Project')
+        self.assertTrue(yoctoproject.is_displayed())
+        yoctoproject.click()
+        self.assertTrue("yoctoproject.org" in self.driver.current_url)
+
+    def test_link_setup_using_toaster_visible_and_clickable(self):
+        """ Test big magenta button setting up and using toaster link in jumbotron
+            if visible and clickable
+        """
+        self.get(reverse('landing'))
+        jumbotron = self.find('.jumbotron')
+
+        # check Big magenta button
+        big_magenta_button = jumbotron.find_element_by_link_text(
+            'Toaster is ready to capture your command line builds'
+        )
+        self.assertTrue(big_magenta_button.is_displayed())
+        big_magenta_button.click()
+        self.assertTrue("docs.yoctoproject.org/toaster-manual/setup-and-use.html#setting-up-and-using-toaster" in self.driver.current_url)
+
+    def test_link_create_new_project_in_jumbotron_visible_and_clickable(self):
+        """ Test big blue button create new project jumbotron if visible and clickable """
+        # Create a layer and a layer version to make visible the big blue button
+        layer = Layer.objects.create(name='bar')
+        Layer_Version.objects.create(layer=layer)
+
+        self.get(reverse('landing'))
+        jumbotron = self.find('.jumbotron')
+
+        # check Big Blue button
+        big_blue_button = jumbotron.find_element_by_link_text(
+            'Create your first Toaster project to run manage builds'
+        )
+        self.assertTrue(big_blue_button.is_displayed())
+        big_blue_button.click()
+        self.assertTrue("toastergui/newproject/" in self.driver.current_url)
+
+    def test_toaster_manual_link_visible_and_clickable(self):
+        """ Test Read the Toaster manual link jumbotron is visible and clickable: """
+        self.get(reverse('landing'))
+        jumbotron = self.find('.jumbotron')
+
+        # check Read the Toaster manual
+        toaster_manual = jumbotron.find_element_by_link_text('Read the Toaster manual')
+        self.assertTrue(toaster_manual.is_displayed())
+        toaster_manual.click()
+        self.assertTrue("https://docs.yoctoproject.org/toaster-manual/index.html#toaster-user-manual" in self.driver.current_url)
+
+    def test_contrib_to_toaster_link_visible_and_clickable(self):
+        """ Test Contribute to Toaster link jumbotron is visible and clickable: """
+        self.get(reverse('landing'))
+        jumbotron = self.find('.jumbotron')
+
+        # check Contribute to Toaster
+        contribute_to_toaster = jumbotron.find_element_by_link_text('Contribute to Toaster')
+        self.assertTrue(contribute_to_toaster.is_displayed())
+        contribute_to_toaster.click()
+        self.assertTrue("wiki.yoctoproject.org/wiki/contribute_to_toaster" in str(self.driver.current_url).lower())
+
     def test_only_default_project(self):
         """
         No projects except default