From: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
To: toaster@lists.yoctoproject.org
Cc: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Subject: [PATCH 3/4] Toaster: Write UI TestCase -> Test edit project name on project page
Date: Tue, 21 Nov 2023 14:48:48 +0100 [thread overview]
Message-ID: <20231121134849.99803-3-alassane.yattara@savoirfairelinux.com> (raw)
In-Reply-To: <20231121134849.99803-1-alassane.yattara@savoirfairelinux.com>
Test edit project name:
- Click on "Edit" icon button
- Change project name
- Click on "Save" button
- Check project name is changed
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
.../tests/functional/test_project_page.py | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/lib/toaster/tests/functional/test_project_page.py b/lib/toaster/tests/functional/test_project_page.py
index f77437f0..a83a994b 100644
--- a/lib/toaster/tests/functional/test_project_page.py
+++ b/lib/toaster/tests/functional/test_project_page.py
@@ -140,3 +140,30 @@ class TestProjectPage(SeleniumFunctionalTestCase):
self.assertTrue(
'/toastergui/newproject/' in str(self.driver.current_url)
)
+
+ def test_edit_project_name(self):
+ """ Test edit project name:
+ - Click on "Edit" icon button
+ - Change project name
+ - Click on "Save" button
+ - Check project name is changed
+ """
+ # navigate to the project page
+ url = reverse("project", args=(1,))
+ self.get(url)
+
+ # click on "Edit" icon button
+ self.wait_until_visible('#project-name-container')
+ edit_button = self.find('#project-change-form-toggle')
+ edit_button.click()
+ project_name_input = self.find('#project-name-change-input')
+ self.assertTrue(project_name_input.is_displayed())
+ project_name_input.clear()
+ project_name_input.send_keys('New Name')
+ self.find('#project-name-change-btn').click()
+
+ # check project name is changed
+ self.wait_until_visible('#project-name-container')
+ self.assertTrue(
+ 'New Name' in str(self.find('#project-name-container').text)
+ )
--
2.34.1
next prev parent reply other threads:[~2023-11-21 13:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 13:48 [PATCH 1/4] Toaster: Bug-fix Alassane Yattara
2023-11-21 13:48 ` [PATCH 2/4] Toaster: Write UI TestCase -> Check project header contains right items Alassane Yattara
2023-11-21 13:48 ` Alassane Yattara [this message]
2023-11-21 13:48 ` [PATCH 4/4] Toaster: Write UI TestCase -> Test project page has right tabs displayed 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=20231121134849.99803-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 read-only IMAP folder(s) and NNTP newsgroup(s).