Skip to content

Commit

Permalink
Remove Pocket mode functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgibson committed Sep 19, 2024
1 parent 84357af commit 434bb4a
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 225 deletions.
1 change: 0 additions & 1 deletion bin/integration_tests/functional_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ docker run \
-e "PLATFORM=${PLATFORM:-}" \
-e "MARK_EXPRESSION=${MARK_EXPRESSION:-}" \
-e "BASE_URL=${BASE_URL:-}" \
-e "BASE_POCKET_URL=${BASE_POCKET_URL:-}" \
-e "PYTEST_PROCESSES=${PYTEST_PROCESSES:=4}" \
-e "BOUNCER_URL=${BOUNCER_URL:=https://download.mozilla.org/}" \
-e "SCREEN_WIDTH=1600" \
Expand Down
22 changes: 4 additions & 18 deletions docs/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ to pull in external data such as event/blog feeds etc. These are required for
some of the tests to pass.

To run the full Selenium integration test suite against your local bedrock
instance in Mozorg mode:
instance:

.. code-block:: bash
Expand All @@ -314,25 +314,11 @@ This will run all test suites found in the ``tests/functional`` directory and
assumes you have bedrock running at ``localhost`` on port ``8000``. Results will
be reported in ``tests/functional/results.html``.

To run the full Selenium test suite against your local bedrock instance in
Pocket mode, things are slightly different, because of the way things are set
up in order to allow CI to test both Mozorg Mode and Pocket Mode at the same
time. You need to define a temporary environment variable (needed by the
`pocket_base_url` fixture) and scope pytest to only run Pocket tests:

.. code-block:: bash
$ BASE_POCKET_URL=http://localhost:8000 pytest -m pocket_mode --driver Firefox --html tests/functional/results.html tests/functional/
This will run all test suites found in the ``tests/functional`` directory that have
the pytest "`mark`" of `pocket_mode` and assumes you have bedrock running *in Pocket mode* at
``localhost`` on port ``8000``. Results will be reported in ``tests/functional/results.html``.

.. Note::

If you omit the ``--base-url`` command line option in Mozorg mode (ie, not
in Pocket mode) then a local instance of bedrock will be started, however
the tests are not currently able to run against bedrock in this way.
If you omit the ``--base-url`` command line option then a local instance
of bedrock will be started, however the tests are not currently able to
run against bedrock in this way.

By default, tests will run one at a time. This is the safest way to ensure
predictable results, due to
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ markers =
skip_if_internet_explorer
skip_if_not_firefox
smoke
pocket_mode


[tool:paul-mclendahand]
Expand Down
10 changes: 0 additions & 10 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,7 @@

import pytest

from bedrock.base.config_manager import config


@pytest.fixture(scope="session")
def base_url(base_url, request):
return base_url or request.getfixturevalue("live_server").url


@pytest.fixture(scope="session")
def pocket_base_url(request):
base_url = config("BASE_POCKET_URL", parser=str, default="")
if not base_url:
pytest.skip("No BASE_POCKET_URL detected in env vars")
return base_url
3 changes: 0 additions & 3 deletions tests/functional/pocket/__init__.py

This file was deleted.

44 changes: 0 additions & 44 deletions tests/functional/pocket/test_navigation.py

This file was deleted.

15 changes: 0 additions & 15 deletions tests/functional/pocket/test_navigation_platform.py

This file was deleted.

3 changes: 0 additions & 3 deletions tests/pages/pocket/__init__.py

This file was deleted.

9 changes: 0 additions & 9 deletions tests/pages/pocket/about.py

This file was deleted.

9 changes: 0 additions & 9 deletions tests/pages/pocket/add.py

This file was deleted.

112 changes: 0 additions & 112 deletions tests/pages/pocket/base.py

This file was deleted.

0 comments on commit 434bb4a

Please sign in to comment.