From: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
To: toaster@lists.yoctoproject.org
Cc: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Subject: [PATCH 3/7] Toaster: Write UI TestCase -> Test project page tab import layer
Date: Tue, 21 Nov 2023 14:50:39 +0100 [thread overview]
Message-ID: <20231121135043.105385-3-alassane.yattara@savoirfairelinux.com> (raw)
In-Reply-To: <20231121135043.105385-1-alassane.yattara@savoirfairelinux.com>
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
.../test_project_page_tab_config.py | 43 +++++++++++++++++++
1 file changed, 43 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 ca3b88d2..14a859a1 100644
--- a/lib/toaster/tests/functional/test_project_page_tab_config.py
+++ b/lib/toaster/tests/functional/test_project_page_tab_config.py
@@ -306,3 +306,46 @@ class TestProjectConfigTab(SeleniumFunctionalTestCase):
)
cancel_button.click()
self.assertTrue(len(lastest_builds) == 2)
+
+ def test_project_page_tab_importlayer(self):
+ """ Test project page tab import layer """
+ # navigate to the project page
+ url = reverse("project", args=(1,))
+ self.get(url)
+
+ # navigate to "Import layers" tab
+ import_layers_tab = self._get_tabs()[2]
+ import_layers_tab.find_element(By.TAG_NAME, 'a').click()
+ self.wait_until_visible('#layer-git-repo-url')
+
+ # Check git repo radio button
+ git_repo_radio = self.find('#git-repo-radio')
+ git_repo_radio.click()
+
+ # Set git repo url
+ input_repo_url = self.find('#layer-git-repo-url')
+ input_repo_url.send_keys('git://git.yoctoproject.org/meta-fake')
+ # Blur the input to trigger the validation
+ input_repo_url.send_keys(Keys.TAB)
+
+ # Check name is set
+ input_layer_name = self.find('#import-layer-name')
+ self.assertTrue(input_layer_name.get_attribute('value') == 'meta-fake')
+
+ # Set branch
+ input_branch = self.find('#layer-git-ref')
+ input_branch.send_keys('master')
+
+ # Import layer
+ self.find('#import-and-add-btn').click()
+
+ # Check layer is added
+ self.wait_until_visible('#layer-container')
+ block_l = self.driver.find_element(
+ By.XPATH, '//*[@id="project-page"]/div[2]')
+ layers = block_l.find_element(By.ID, 'layer-container')
+ layers_list = layers.find_element(By.ID, 'layers-in-project-list')
+ layers_list_items = layers_list.find_elements(By.TAG_NAME, 'li')
+ self.assertTrue(
+ 'meta-fake' in str(layers_list_items[-1].text)
+ )
--
2.34.1
next prev 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 ` Alassane Yattara [this message]
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 ` [PATCH 5/7] Toaster: Write UI TestCase -> Test project page section images Alassane Yattara
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-3-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).