Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST PR PLEASE IGNORE #184

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ jobs:
if: steps.setup.conclusion == 'success'
run: |
Start-Process -FilePath "C:\Program Files\Custom Firefox\firefox.exe" -ArgumentList "--version" -Wait -NoNewWindow
pipenv run pytest -n 4 .
python -c "import platform; print(platform.uname())"
pipenv run pytest -n 4 tests/meta
$env:TEST_EXIT_CODE = $LASTEXITCODE
mv artifacts artifacts-win || true
exit $env:TEST_EXIT_CODE
- name: Run Smoke Tests in Win (Headed)
run: |
rm ./pyproject.toml;
mv ./ci_pyproject_headed.toml ./pyproject.toml;
pipenv run pytest -n 4 .
pipenv run pytest -n 4 tests/menus
$env:TEST_EXIT_CODE = $LASTEXITCODE
rm artifacts/assets -r -Force
mv artifacts/* artifacts-win
Expand Down Expand Up @@ -88,14 +89,16 @@ jobs:
if: steps.setup.conclusion == 'success'
run: |
/Volumes/Firefox/Firefox.app/Contents/MacOS/firefox --version
pipenv run pytest --fx-executable=/Volumes/Firefox/Firefox.app/Contents/MacOS/firefox -n 4 . || TEST_EXIT_CODE=$?
python -c "import platform; print(platform.uname())"
python -c "import platform; print(platform.mac_ver())"
pipenv run pytest --fx-executable=/Volumes/Firefox/Firefox.app/Contents/MacOS/firefox -n 4 tests/meta || TEST_EXIT_CODE=$?
mv artifacts artifacts-mac || true
exit $TEST_EXIT_CODE
- name: Run Smoke Tests in MacOS (Headed)
if: steps.setup.conclusion == 'success'
run: |
mv ./ci_pyproject_headed.toml ./pyproject.toml;
pipenv run pytest --fx-executable=/Volumes/Firefox/Firefox.app/Contents/MacOS/firefox -n 4 . || TEST_EXIT_CODE=$?
pipenv run pytest --fx-executable=/Volumes/Firefox/Firefox.app/Contents/MacOS/firefox -n 4 tests/menus || TEST_EXIT_CODE=$?
mv -r artifacts/* artifacts-mac/ || true
exit $TEST_EXIT_CODE
- name: Upload artifacts
Expand Down
13 changes: 13 additions & 0 deletions taskcluster/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,16 @@ workers:
implementation: generic-worker
os: linux
worker-type: 't-linux-2204-wayland'
t-mac:
provisioner: releng-hardware
implementation: generic-worker
os: macosx
worker-type:
by-level:
"3": mozilla-b-3-osx
default: mozilla-b-1-osx
t-win2022:
provisioner: 'mozilla-{level}'
implementation: generic-worker
os: windows
worker-type: b-win2022
12 changes: 7 additions & 5 deletions taskcluster/kinds/run-smoke-tests/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ transforms:
task-defaults:
label: "Smoke Tests"
description: "Runs Smoke Tests and Notifies Slack"
worker-type: t-linux-wayland
worker-type: t-win2022
worker:
max-run-time: 1800
artifacts:
Expand All @@ -25,16 +25,18 @@ tasks:
cwd: "{checkout}"
command: |-
export PATH=$HOME/.local/bin:$PWD:$PATH
echo "windows test"
mkdir -p artifacts;
pip3 install 'pipenv==2023.11.15';
pip3 install 'ruff>=0.4.8,<0.5';
pip install 'pipenv==2023.11.15';
pip install 'ruff>=0.4.8,<0.5';
mv ./ci_pyproject.toml ./pyproject.toml;
pipenv install;
python -c "import platform; print(platform.uname())"
./collect_executables.sh;
./firefox/firefox --version;
pipenv run pytest --fx-executable ./firefox/firefox -n 4 .;
pipenv run pytest --fx-executable ./firefox/firefox -n 4 tests/meta;
mv ./ci_pyproject_headed.toml ./pyproject.toml;
pipenv run pytest --fx-executable ./firefox/firefox -n 4 .
pipenv run pytest --fx-executable ./firefox/firefox -n 4 tests/menus
notify:
recipients:
- type: slack-channel
Expand Down
6 changes: 4 additions & 2 deletions tests/downloads/test_add_zip_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ def test_add_zip_type(driver: Firefox):
about_prefs = AboutPrefs(driver, category="general")

# Click on the available zip
web_page.find_element(By.XPATH, "//td/a[@href='/pub/firefox/releases/0.9rc/Firefox-win32-0.9rc.zip']").click()
web_page.find_element(
By.XPATH, "//td/a[@href='/pub/firefox/releases/0.9rc/Firefox-win32-0.9rc.zip']"
).click()

# In the download panel right-click on the download and click "Always Open Similar Files"
with driver.context(driver.CONTEXT_CHROME):
Expand All @@ -31,4 +33,4 @@ def test_add_zip_type(driver: Firefox):

# Open about:preferences and check that zip mime type is present in the application list
about_prefs.open()
about_prefs.element_exists("mime-type", labels=["application/zip"])
about_prefs.element_exists("mime-type", labels=["application/zip"])