($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Alassane Yattara <alassane.yattara@savoirfairelinux.com>,
	 toaster@lists.yoctoproject.org,
	bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: Re: [Toaster] [PATCH 1/3] Toaster: Toaster: Write UI TestCase -> Visualize all projects
Date: Thu, 23 Nov 2023 12:10:37 +0000	[thread overview]
Message-ID: <33255f18bffaaf54ff6337c0d3917e34929cc5d0.camel@linuxfoundation.org> (raw)
In-Reply-To: <20231121134729.95095-1-alassane.yattara@savoirfairelinux.com>

Hi Alassane,

On Tue, 2023-11-21 at 14:47 +0100, Alassane Yattara wrote:
> 
> @@ -205,3 +218,24 @@ class TestAllProjectsPage(SeleniumTestCase):
>          expected_url = reverse('project', args=(self.project.id,))
>          msg = 'link on project name should point to configuration but was %s' % link_url
>          self.assertTrue(link_url.endswith(expected_url), msg)
> +
> +    def test_allProject_table_search_box(self):
> +        """ Test the search box in the all project table on the all projects page """
> +        self._create_projects()
> +
> +        url = reverse('all-projects')
> +        self.get(url)
> +
> +        # Chseck search box is present and works
> +        self.wait_until_present('#projectstable tbody tr')
> +        search_box = self.find('#search-input-projectstable')
> +        self.assertTrue(search_box.is_displayed())
> +
> +        # Check that we can search for a project by project name
> +        search_box.send_keys('test project 10')
> +        search_btn = self.find('#search-submit-projectstable')
> +        search_btn.click()
> +        self.wait_until_present('#projectstable tbody tr')
> +        time.sleep(1)
> +        rows = self.find_all('#projectstable tbody tr')
> +        self.assertTrue(len(rows) == 1)


I've merged these with some tweaks to the commit messages, basically
changing "Toaster:" to "toaster/tests:" and "->" to "-" to make things
more consistent with our other commits. 

The time.sleep() calls in these tests worry me a bit as the values are
a little arbitrary. I noticed one does have to increase the timeout
depending on how much work is being done. Does the test framework not
have a better way to handle this such as a settle function or something
similar? I'm thinking this could be fixed in a follow up commit.

Cheers,

Richard




      parent reply	other threads:[~2023-11-23 12:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 13:47 [PATCH 1/3] Toaster: Toaster: Write UI TestCase -> Visualize all projects Alassane Yattara
2023-11-21 13:47 ` [PATCH 2/3] " Alassane Yattara
2023-11-21 13:47 ` [PATCH 3/3] " Alassane Yattara
2023-11-23 12:10 ` Richard Purdie [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=33255f18bffaaf54ff6337c0d3917e34929cc5d0.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=alassane.yattara@savoirfairelinux.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --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).