Switch the clickable() calls to use the new element_clickable() function
which accepts a finder labmda function. This means if the element doesn't
yet exist, the code can rebuild the query and try again once a small
amount of time has elapsed.
There were a ton of timing related races around these element interactions
and this seemed to be the most robust way to address the issues.
The change also makes some of the elements slightly more specific so
the code can work effectively.
(Bitbake rev: 38643aadbb5a960004b886cf7709beaf2fc96652)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
These changes:
* Drop the poll parameters
* Add waits where needed or make them more specific
* Add calls to close notification boxes since they can obscure
other page elements
* In one case wait for a "Loading" message to be replaced
(Bitbake rev: 2bde969486a4761fa0e6f9590c9fa08d385666b1)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The project creation test is well covered in another module so just
drop this one as there isn't any extra value added here.
(Bitbake rev: d26414f191c73fb5330d10d97e240150a3fa1ee8)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Switch this test module to use the common project creation code which contains
race fixes. That code requires the database access wrapper be dropped and
we no longer have ordering constraints.
There are two tests that do require database access. Move these to a separate class
and allow database access there. Use ordering constraints to allow them to run
after the main code. They depend on the project creation from the other class which
isn't ideal but good enough for now.
(Bitbake rev: e441bfe98ac41d48692ffbaeec90a9c780337fa4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
assetTrue is a poor choice for "x in y" since assertIn gives much more
useful output upon failure.
Change such inserts to assertIn or assertEqual to make errors easier
to debug.
(Bitbake rev: dde78e0ff8af872fdc5cdf5354174fc713141102)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Using a hardcoded database ID for a recipe is a bad idea and causes tests
to fail when we change data/versions.
Remove magic numbers.
(Bitbake rev: 6e3a958666ae4821cfa1d43c064a2294e6881638)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Consistently use meta-poky as the test target, instead of a magic number
ID which can vary.
Fix incorrect comments.
Also ensure the viewport is scrolled to the top when changing tabs.
This breaks if other layers are selected like openembedded-core due
to the number of recipes.
(Bitbake rev: 0bcb7b4a8d8e89647aa6179cc61e5eb55d433585)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
"False is not True" is not a helpful error messgae. "XXX not in YYY" is
much more helpful. Tweak the test to give more meaninful failure messages
using assertIn rather than assertTrue.
(Bitbake rev: 6292b5a81ce1f3cf35980d0f669a1b52f3c56695)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The test_single_layer_page test case consistently fails. It is not obvious why
but if we change the argument in the following from 8 to 7 it passes.
url = reverse("layerdetails", args=(TestProjectPage.project_id, 8))
E selenium.common.exceptions.TimeoutException: Message: An element matching "#change-notification" should be visible
=========================== short test summary info ============================
FAILED ../bitbake/lib/toaster/tests/functional/test_project_page.py::TestProjectPage::test_single_layer_page
(Bitbake rev: c7e12145d8ea641925e3c06ba4f11c2dae66288a)
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
All issues and failures stemmed from a specific test case:
test_project_config_tab_right_section in the file
bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py.
This test was designed to verify whether the "Most built recipes"
section on the project page correctly displays the latest and oldest
recipes built by the user, irrespective of the build outcome (failed,
cancelled, succeeded, or errored).
The errors and failures arose because the build process did not
terminate as expected, particularly when attempting to build recipe
images such as "core-image-minimal" or "bash." It was discovered that
building a real recipe/image was unnecessary for the test's purpose.
Instead, building a fake recipe like "foo" provided a reliable way to
ensure the build would fail or be interrupted.
(Bitbake rev: 5162db5305826235c09d9fcd38b5fb48ded31622)
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
- Generate a random name for create project while test
- Set timeout on method _wait_until_build
- update test_machines_page, test_softwareRecipe_page and
test_single_layer_page to fix exception "element not interactable"
(Bitbake rev: 51c051da61a0396bdaa965065796476de7340727)
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>