Commit Graph
98 Commits
Author SHA1 Message Date
John Chilton 5d31aedcc4 Likely fix for transiently failing published histories test.
The failing error:

```
self = <galaxy_test.selenium.test_histories_published.TestPublishedHistories object at 0x7f4ae3449e80>

    @selenium_test
    def test_published_histories_username_filter(self):
        self._login()
        self.navigate_to_published_histories()
        username = self.user2_email.split("@")[0]
        self.components.published_histories.search_input.wait_for_and_send_keys(f"user:{username}")
>       self.assert_histories_present([self.history2_name])
```
2025-09-10 09:49:34 -04:00
Nicola Soranzo 7f89e0eab9 Code cleanups from pyupgrade
Found by running:

```
make pyupgrade
ruff check --fix .
ruff check --preview --unsafe-fixes --select=F401 --fix .
make format
make update-client-api-schema
```

The bulk of the changes are replacements of typing deprecated aliases
such as `Dict` and `List` with the standard library classes. These
aliases became redundant in Python 3.9 when the corresponding
pre-existing classes were enhanced to support `[]`, see
https://docs.python.org/3/library/typing.html#deprecated-aliases

Also:
- Update the `pyupgrade` Makefile target to use `--py38-plus` for the
  packages needed by Pulsar, including the new galaxy-tool-util-models
  package.
2025-07-31 11:17:22 +01:00
Nicola Soranzo 9bd2a328f1 Type annotation fixes for mypy 1.16.0 2025-06-10 02:22:18 +01:00
mvdbeek db51322b18 Inject hid only when needed (in selenium) 2025-04-22 14:18:51 +02:00
mvdbeek eb1709fcbb Merge branch 'release_24.2' into dev 2025-03-08 11:20:03 +01:00
davelopez 28feab5313 Adapt selenium tests for workflow editor
Do not expect the save button to disappear when the workflow is saved
2025-03-07 17:06:14 +01:00
Laila Los 21ceb30ebc wait for save to complete 2024-12-03 10:25:16 -05:00
Dannon ff7025d4c0 Merge pull request #18729 from ElectronicBlueberry/workflow-editor-activity-bar
Workflow Editor Activity Bar
2024-11-26 09:28:29 -05:00
Laila Los 4f7dd00599 wait for save to complete 2024-11-25 11:08:45 +01:00
Nicola Soranzo 26a4e146e0 Fix UP031 errors
reported by ruff 0.8.0 .
2024-11-24 21:35:23 +00:00
John Chilton 660f78fe37 Implement workflow landings.
Includes a lot of plumbing for tools but not the APIs - they are not ready to go yet.
2024-09-30 13:25:02 -04:00
Nicola Soranzo 8cdca0f343 Revert some requests import changes
introduced in https://github.com/galaxyproject/galaxy/pull/18003 .
In particular, when using requests in the tests to connect to Galaxy
or the ToolShed it's not needed to use the modified headers.

Also:
- Move some imports after conditional imports.
- Fix type annotations in `lib/tool_shed/test/base/populators.py`
- Fix typo bug in `test/unit/util/test_get_url.py`
2024-05-23 15:55:56 +01:00
mvdbeek e8a3b8c0cd Create wrapper for requests with default user agent 2024-04-16 17:54:29 +02:00
Nicola Soranzo 053ca5198e Enable `warn_unused_ignores` mypy option 2024-04-16 01:12:58 +01:00
John Davis 28fd6ad99b Fix package mypy errors 2024-04-02 10:08:53 -04:00
Nicola Soranzo 4588a27c0f Code cleanups from pyupgrade
Found by running:

```
make pyupgrade
```
2024-03-10 03:32:47 +00:00
Alireza Heidari 362fe07467 fix some workflow selenium tests 2024-02-16 12:02:49 +01:00
Alireza Heidari dca644aedc fix some workflow tests 2024-02-16 12:02:47 +01:00
Nicola Soranzo e975ca3754 Update to black 2024 stable style 2024-01-30 18:09:51 +00:00
Michael R. Crusoe df807e6d17 Use the walrus := operator!
Fixed by running:

```
ack --type=python -f | grep -v '^lib/galaxy/schema/bco/\|^lib/galaxy/schema/drs/\|^tools/\|^.venv/\|^.tox/' | grep -v '^lib/galaxy/files/sources/\|^lib/galaxy/job_metrics/\|^lib/galaxy/objectstore/\|^lib/galaxy/tool_util/\|^lib/galaxy/util/' | xargs auto-walrus
make format
```

Note that the directories for the packages listed in
`packages/packages_for_pulsar_by_dep_dag.txt`
were explictly excluded.
2023-11-26 18:34:10 +00:00
John Chilton e592070420 Test decorator improvements.
- Add some basic typing to them.
- Include more information in assertion errors thrown when they target an incorrectly configured server.
- Allow for explicit anonymous interactor creation so we can cleanly apply these decorators to Selenium tests (Selenium test interactors use API keys that can be created from the UI - so they don't have complete user information available upfront).
- Add decorator skip_without_visualization_plugin.
- Add some decorators to the visualization tests and implement a second test.
- Use managed_history decorator to ensure existing test has an hid of 1 as assumed.
2023-06-18 12:34:21 -04:00
Björn Grüning 6ff2397a91 Merge pull request #16122 from jmchilton/axe-selenium
Integrate accessibility testing into Selenium testing
2023-05-26 22:53:31 +02:00
John Chilton de6fc52721 When writing test error debug directories, create a latest symlink to ease navigation. 2023-05-24 15:46:09 -04:00
John Chilton f9e00f597a axe testing 2023-05-24 12:54:25 -04:00
Assunta DeSanto 66289a4cf4 adding error for assertion in assert_item_peek_includes 2023-05-03 14:23:28 -04:00
Dannon Baker 575afab8fa Update selenium hid text assertion 2023-03-03 07:58:44 -05:00
John Chilton 5fb47ac23f WIP: selenium test decorators... 2022-11-26 11:31:13 -05:00
John Chilton aeac8c6060 Restore test framework features... 2022-11-26 11:28:36 -05:00
mvdbeek 304b12c143 Move things around 2022-11-16 17:01:28 +01:00
Nicola Soranzo 10802d35a9 Mark non-slow unit tests with more relevant `@skip_if_github_down` decorator 2022-11-03 18:47:31 +00:00
Nicola Soranzo 5ca0aea54a Drop nose
It's deprecated and unmaintained, and is broken under Python 3.10 .
2022-11-01 18:45:07 +00:00
Dannon 0298ee36f3 Merge pull request #14679 from nsoranzo/replace_unittest.TestCase
Replace ``unittest.TestCase`` with pytest-based partial re-implementation
2022-09-27 09:10:59 -04:00
Nicola Soranzo c35d8f2a06 Replace `unittest.TestCase` with pytest-based partial re-implementation
Also:
- Rename `FooBarTestCase` test classes as `TestFooBar`. These were collected
  by pytest only because they were `unittest.TestCase` derived, but normally
  pytest collects only test classes whose name starts with `Test`, see
  https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-python_classes
2022-09-27 03:34:58 +01:00
guerler d676345678 Clear out beta navigation selectors 2022-09-22 22:21:31 -04:00
guerler 399c6e9194 Remove is_beta_history flag from selenium tests 2022-09-22 20:20:52 -04:00
John Chilton 65c4edac6a Rename has_yaml to yaml_content per PR review request. 2022-09-20 11:24:48 -04:00
Nicola Soranzo 36178dcd71 Drop GitHub workflow for legacy history Selenium tests
and `GALAXY_TEST_SELENIUM_BETA_HISTORY` environment variable.

Any way I think we were not testing the legacy history any more since
https://github.com/galaxyproject/galaxy/pull/11748 was merged, see
https://github.com/galaxyproject/galaxy/pull/11748#discussion_r850401243 .
2022-09-04 13:29:33 +01:00
Nicola Soranzo 23afbb64e2 Updates for stuff removed in Selenium 4.3.0 2022-07-13 10:06:33 -04:00
mvdbeek c14d6164e9 Enable celery in API, Selenium, Integration tests 2022-05-25 19:46:47 +02:00
John Chilton 4e92f96d68 Selenium workflow management tests - improved assertion. 2022-05-09 18:41:21 -04:00
John Chilton f8e34572f8 Improvements to workflow and invocation grid testing. 2022-04-28 10:32:46 -04:00
Dannon 6c58ecacbc Merge pull request #13802 from guerler/history_hidden_deleted
Adjustments to hidden/deleted history links
2022-04-26 05:51:42 -07:00
Marius van den Beek 2b3486bb25 Merge pull request #13793 from mvdbeek/fetch_data_almost_everywhere
Port api/tools/fetch to FastAPI, add schema, and use `__FETCH_DATA__` in most tests
2022-04-26 13:36:51 +02:00
guerler 336bbd257d Remove new size, empty not shown anymore 2022-04-25 14:19:09 -04:00
John Chilton 1042519c4f Initial UI testing for workflow sharing. 2022-04-25 13:30:21 -04:00
mvdbeek 9abbac0180 Switch most tests to use `__DATA_FETCH__ instead of upload1` 2022-04-23 12:05:54 +02:00
John Chilton 2bf9366730 Workflow test cases for run target. 2022-03-31 17:22:46 -04:00
John Chilton ff1d7760a5 Reduce duplication around waiting for workflow results in test_workflow_run. 2022-03-31 17:22:46 -04:00
John Chilton f49d0da143 Workflow testing improvements.
- More typing.
- Use mixin to allow greater reuse of a couple things around running workflows and setting up test data.
2022-03-31 17:22:46 -04:00
John Chilton 4dae7c6f21 Disable implicit re-imports across the projects.
Exclude galaxy.util for now, but the exclusion is tracked in setup.cfg. Elimiantes a bunch of flake exception markers.
2022-03-15 19:58:42 -04:00