Skip to content

Commit ad09daa

Browse files
Merge branch 'main' into philimon/suite_refactor
2 parents ffd983d + 29f9596 commit ad09daa

File tree

66 files changed

+1382
-490
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1382
-490
lines changed

.github/pull_request_template.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,37 @@
1-
### Description
1+
### Relevant Links
22

3-
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
3+
Bugzilla: _
4+
TestRail: _
45

5-
### Bugzilla bug ID
6+
### Description of Code / Doc Changes
67

7-
**Testrail:**
8-
**Link:**
8+
_Leave a bullet-pointed list of changes you made._
99

10-
### Type of change
10+
### Process Changes Required
1111

12-
Please delete options that are not relevant.
12+
_Mark the relevant boxes:_
1313

14-
- [ ] New Test
15-
- [ ] New POM
16-
- [ ] Other Changes (Please specify)
14+
- [ ] Adds a dependency (rerun `pipenv install`)
15+
- [ ] Changes the BasePage
16+
- [ ] Changes or creates a BOM/POM (name the object model): _
17+
- [ ] Changes CI flow
18+
- [ ] Changes scheduled Beta or DevEdition
19+
- [ ] Changes Git hooks or Github settings
20+
- [ ] Changes L10n harness
1721

18-
### How does this resolve / make progress on that bug?
22+
### Screenshots or Explanations
1923

20-
Please describe the progress or significance with respect to the bug listed above.
24+
_If you need to explain your code, do it here._
2125

22-
### Screenshots / Explanations
26+
### Comments or Future Work
2327

24-
Please upload any relevant media or add a relevant description with respect to the bug listed above.
28+
_Do we need to start another PR soon to address something you saw while working on this?_
2529

26-
### Comments / Concerns
30+
### Workflow Checklist
2731

28-
Please add a short blurb about any comments or concerns that this change might cause.
32+
- [ ] Please request reviewers
33+
- [ ] If this is an unblocker, please post in Slack.
34+
- [ ] If asked to address comments, please resolve conversations.
35+
- [ ] If asked to change code, please re-request review from the person who wanted changes.
36+
37+
Thank you!

.github/workflows/check-beta.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: Check new beta version
22

33
on:
44
schedule:
5-
- cron: "49 */1 * * *"
5+
- cron: "12 */1 * * *"
66
env:
77
LATEST: ""
88
permissions:
9-
contents: 'write'
9+
contents: "write"
1010

1111
jobs:
1212
Check-Beta-Version:
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@v4
2020
- name: Check if the run is reportable
2121
id: reportable
22-
env:
22+
env:
2323
TESTRAIL_REPORT: true
2424
TESTRAIL_BASE_URL: ${{ secrets.TESTRAIL_BASE_URL }}
2525
TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}
@@ -29,19 +29,18 @@ jobs:
2929
pipenv install
3030
echo win=$(pipenv run python -c 'from modules import testrail_integration as tri; print(tri.reportable("Windows"))') >> "$GITHUB_OUTPUT"
3131
echo mac=$(pipenv run python -c 'from modules import testrail_integration as tri; print(tri.reportable("Darwin"))') >> "$GITHUB_OUTPUT"
32-
Run-Win-Smoke:
32+
Run-Win-Smoke:
3333
needs: Check-Beta-Version
3434
if: ${{ needs.Check-Beta-Version.outputs.win_reportable == 'True' }}
3535
uses: ./.github/workflows/smoke.yml
3636
with:
3737
job_to_run: Smoke-Windows
3838
secrets: inherit
3939

40-
Run-Mac-Smoke:
40+
Run-Mac-Smoke:
4141
needs: Check-Beta-Version
4242
if: ${{ needs.Check-Beta-Version.outputs.mac_reportable == 'True' }}
4343
uses: ./.github/workflows/smoke.yml
4444
with:
4545
job_to_run: Smoke-MacOS
4646
secrets: inherit
47-
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Check new devedition version
2+
3+
on:
4+
schedule:
5+
- cron: "38 */12 * * *"
6+
env:
7+
LATEST: ""
8+
permissions:
9+
contents: "write"
10+
11+
jobs:
12+
Check-DevEdition-Version:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
win_reportable: ${{ steps.reportable.outputs.win }}
16+
mac_reportable: ${{ steps.reportable.outputs.mac }}
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
- name: Check if the run is reportable
21+
id: reportable
22+
env:
23+
TESTRAIL_REPORT: true
24+
TESTRAIL_BASE_URL: ${{ secrets.TESTRAIL_BASE_URL }}
25+
TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}
26+
TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
27+
FX_CHANNEL: "devedition"
28+
run: |
29+
pip3 install 'pipenv==2023.11.15';
30+
pipenv install
31+
echo win=$(pipenv run python -c 'from modules import testrail_integration as tri; print(tri.reportable("Windows"))') >> "$GITHUB_OUTPUT"
32+
echo mac=$(pipenv run python -c 'from modules import testrail_integration as tri; print(tri.reportable("Darwin"))') >> "$GITHUB_OUTPUT"
33+
Run-Win-Smoke:
34+
needs: Check-DevEdition-Version
35+
if: ${{ needs.Check-DevEdition-Version.outputs.win_reportable == 'True' }}
36+
uses: ./.github/workflows/smoke.yml
37+
with:
38+
channel: "devedition"
39+
job_to_run: Smoke-Windows
40+
secrets: inherit
41+
42+
Run-Mac-Smoke:
43+
needs: Check-DevEdition-Version
44+
if: ${{ needs.Check-DevEdition-Version.outputs.mac_reportable == 'True' }}
45+
uses: ./.github/workflows/smoke.yml
46+
with:
47+
channel: "devedition"
48+
job_to_run: Smoke-MacOS
49+
secrets: inherit

.github/workflows/smoke.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,24 @@ on:
66
pull_request:
77
workflow_call:
88
inputs:
9-
job_to_run:
9+
channel:
10+
description: "Channel to run tests against"
11+
default: "beta"
12+
type: string
13+
required: false
14+
job_to_run:
1015
required: true
1116
type: string
1217
env:
18+
FX_CHANNEL: ${{ inputs.channel }}
1319
TESTRAIL_BASE_URL: ${{ secrets.TESTRAIL_BASE_URL }}
1420
TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}
1521
TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
1622
SVC_ACCT_DECRYPT: ${{ secrets.SVC_ACCT_DECRYPT }}
1723

1824
jobs:
1925
Smoke-Windows:
26+
if: ${{ inputs.job_to_run == 'Smoke-Windows' || github.event_name == 'pull_request' }}
2027
runs-on: windows-latest
2128
steps:
2229
- name: Create app token
@@ -110,6 +117,7 @@ jobs:
110117
name: artifacts-win
111118
path: artifacts-win
112119
Smoke-MacOS:
120+
if: ${{ inputs.job_to_run == 'Smoke-MacOS' || github.event_name == 'pull_request' }}
113121
runs-on: macos-latest
114122
steps:
115123
- name: Create app token
@@ -137,19 +145,19 @@ jobs:
137145
echo "TESTRAIL_REPORT='true'" >> "$GITHUB_ENV";
138146
echo "Running report for most recent Beta on MacOS";
139147
- name: Install dependencies
140-
id: setup
148+
id: setup
141149
run: |
142150
mkdir -p artifacts;
143151
pip3 install 'pipenv==2023.11.15';
144152
pip3 install 'ruff>=0.4.8,<0.5';
145153
rm ./pyproject.toml;
146154
mv ./ci_pyproject.toml ./pyproject.toml;
147155
pipenv install;
148-
bash ./collect_executables.sh;
156+
echo app_name=$(bash ./collect_executables.sh | xargs -0 ./parse_executables.sh) >> "$GITHUB_OUTPUT"
149157
- name: Run Smoke Tests in MacOS
150158
if: steps.setup.conclusion == 'success'
151159
env:
152-
FX_EXECUTABLE: /Volumes/Firefox/Firefox.app/Contents/MacOS/firefox
160+
FX_EXECUTABLE: /Volumes/${{ steps.setup.outputs.app_name }}/${{ steps.setup.outputs.app_name }}.app/Contents/MacOS/firefox
153161
run: |
154162
/Volumes/Firefox/Firefox.app/Contents/MacOS/firefox --version
155163
pipenv run python choose_ci_set.py

SELECTOR_INFO.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,6 +1403,13 @@ Location: Appears as part of the dropdown under the autofill panel, within any e
14031403
Path to .json: modules/data/autofill_popup.components.json
14041404
```
14051405
```
1406+
Selector Name: select-form-option-by-index
1407+
Selector Data: ".autocomplete-richlistbox .autocomplete-richlistitem:nth:child({index})"
1408+
Description: Select n individual entry within the autofill dropdown, using the index of the child.
1409+
Location: Appears as part of the dropdown under the autofill panel, within any eligible form field when suggestions are available.
1410+
Path to .json: modules/data/autofill_popup.components.json
1411+
```
1412+
```
14061413
Selector Name: clear-form-option
14071414
Selector Data: ".autocomplete-richlistbox .autocomplete-richlistitem[ac-value='Clear Autofill Form']"
14081415
Description: The "Clear Autofill Form" option in the dropdown that appears when interacting with an autofill-enabled input field
@@ -2997,7 +3004,7 @@ Path to .json: modules/data/navigation.components.json
29973004
```
29983005
```
29993006
Selector Name: search-mode-switcher-option
3000-
Selector Data: toolbarbutton[label*='{title}']
3007+
Selector Data: menuitem[label*='{title}']
30013008
Description: Option by label in search mode list
30023009
Location: Search mode of awesomebar
30033010
Path to .json: modules/data/navigation.components.json

choose_ci_set.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def dedupe(run_list: list, slash: str) -> list:
139139
.splitlines()
140140
)
141141

142-
main_conftest = os.path.join(SCRIPT_DIR, "conftest.py")
143-
base_page = os.path.join(SCRIPT_DIR, "modules", "page_base.py")
142+
main_conftest = "conftest.py"
143+
base_page = os.path.join("modules", "page_base.py")
144144

145145
if main_conftest in committed_files or base_page in committed_files:
146146
# Run all the tests (no files as arguments) if main conftest or basepage changed

collect_executables.py

Lines changed: 75 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -102,54 +102,81 @@ def get_gd_platform():
102102
if not language:
103103
language = "en-US"
104104

105-
candidate_exists = True
106-
this_beta = BACKSTOP
107-
while candidate_exists:
108-
(major, minor_beta) = this_beta.split(".")
109-
(minor, beta) = minor_beta.split("b")
110-
major = int(major)
111-
minor = int(minor)
112-
beta = int(beta)
113-
114-
next_major = f"{major + 1}.0b1"
115-
fx_download_dir_url = f"https://archive.mozilla.org/pub/firefox/candidates/{next_major}-candidates/build1/"
116-
rs = requests.get(fx_download_dir_url)
117-
if rs.status_code < 300:
118-
latest_beta_ver = next_major
119-
this_beta = next_major
120-
continue
105+
if channel == "-devedition":
106+
# Devedition has special requirements as it's testing a release
121107

122-
next_minor = f"{major}.{minor + 1}b1"
123-
fx_download_dir_url = f"https://archive.mozilla.org/pub/firefox/candidates/{next_minor}-candidates/build1/"
124-
rs = requests.get(fx_download_dir_url)
125-
if rs.status_code < 300:
126-
latest_beta_ver = next_minor
127-
this_beta = next_minor
128-
continue
108+
this_devedition = BACKSTOP
109+
fx_download_dir_url = (
110+
"https://archive.mozilla.org/pub/devedition/releases/135.0b5/"
111+
)
129112

130-
next_beta = f"{major}.{minor}b{beta + 1}"
131-
fx_download_dir_url = f"https://archive.mozilla.org/pub/firefox/candidates/{next_beta}-candidates/build1/"
132-
rs = requests.get(fx_download_dir_url)
133-
if rs.status_code < 300:
134-
latest_beta_ver = next_beta
135-
this_beta = next_beta
136-
continue
113+
while True:
114+
(major, _) = this_devedition.split(".")
115+
major = int(major)
116+
this_devedition = f"{major + 1}.0b5"
117+
next_candidate = f"https://archive.mozilla.org/pub/devedition/releases/{this_devedition}/"
118+
119+
rs = requests.get(next_candidate)
120+
if rs.status_code > 399:
121+
break
137122

138-
candidate_exists = False
123+
fx_download_dir_url = next_candidate
139124

140-
status = 200
141-
build = 0
142-
while status < 400 and build < 20:
143-
build += 1
144-
fx_download_dir_url = f"https://archive.mozilla.org/pub/firefox/candidates/{latest_beta_ver}-candidates/build{build}/"
125+
devedition_version = fx_download_dir_url.split("/")[-2]
126+
fx_download_dir_url = f"{fx_download_dir_url}{get_fx_platform()}/{language}/"
145127

146-
# Fetch the page
147-
response = requests.get(fx_download_dir_url)
148-
status = response.status_code
128+
else:
129+
# Anything but devedition
130+
131+
candidate_exists = True
132+
this_beta = BACKSTOP
133+
while candidate_exists:
134+
(major, minor_beta) = this_beta.split(".")
135+
(minor, beta) = minor_beta.split("b")
136+
major = int(major)
137+
minor = int(minor)
138+
beta = int(beta)
139+
140+
next_major = f"{major + 1}.0b1"
141+
fx_download_dir_url = f"https://archive.mozilla.org/pub/firefox/candidates/{next_major}-candidates/build1/"
142+
rs = requests.get(fx_download_dir_url)
143+
if rs.status_code < 300:
144+
latest_beta_ver = next_major
145+
this_beta = next_major
146+
continue
147+
148+
next_minor = f"{major}.{minor + 1}b1"
149+
fx_download_dir_url = f"https://archive.mozilla.org/pub/firefox/candidates/{next_minor}-candidates/build1/"
150+
rs = requests.get(fx_download_dir_url)
151+
if rs.status_code < 300:
152+
latest_beta_ver = next_minor
153+
this_beta = next_minor
154+
continue
155+
156+
next_beta = f"{major}.{minor}b{beta + 1}"
157+
fx_download_dir_url = f"https://archive.mozilla.org/pub/firefox/candidates/{next_beta}-candidates/build1/"
158+
rs = requests.get(fx_download_dir_url)
159+
if rs.status_code < 300:
160+
latest_beta_ver = next_beta
161+
this_beta = next_beta
162+
continue
163+
164+
candidate_exists = False
165+
166+
status = 200
167+
build = 0
168+
while status < 400 and build < 20:
169+
build += 1
170+
fx_download_dir_url = f"https://archive.mozilla.org/pub/firefox/candidates/{latest_beta_ver}-candidates/build{build}/"
171+
172+
# Fetch the page
173+
response = requests.get(fx_download_dir_url)
174+
status = response.status_code
175+
176+
# Correct build is the last one that didn't 404
177+
build -= 1
178+
fx_download_dir_url = f"https://archive.mozilla.org/pub/firefox/candidates/{latest_beta_ver}-candidates/build{build}/{get_fx_platform()}/{language}/"
149179

150-
# Correct build is the last one that didn't 404
151-
build -= 1
152-
fx_download_dir_url = f"https://archive.mozilla.org/pub/firefox/candidates/{latest_beta_ver}-candidates/build{build}/{get_fx_platform()}/{language}/"
153180
response = requests.get(fx_download_dir_url)
154181
status = response.status_code
155182
response_text = None
@@ -179,8 +206,11 @@ def get_gd_platform():
179206

180207
fx_download_executable_url = rf"{fx_download_dir_url}{executable_name}"
181208
if NUMBER_ONLY:
182-
number_cand = fx_download_dir_url.split("/")[6]
183-
number = number_cand.split("-")[0]
184-
print(f"{number}-build{build}")
209+
if channel == "-devedition":
210+
print(devedition_version)
211+
else:
212+
number_cand = fx_download_dir_url.split("/")[6]
213+
number = number_cand.split("-")[0]
214+
print(f"{number}-build{build}")
185215
else:
186216
print(fx_download_executable_url)

collect_executables.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ then
77
curl -o Firefox.dmg -L "$(pipenv run python collect_executables.py)"
88
hdiutil attach Firefox.dmg
99
else
10+
pipenv run python collect_executables.py
1011
curl -o firefox.tar.xz -L "$(pipenv run python collect_executables.py)"
1112
tar xf firefox.tar.xz
1213
fi

l10n_CM/Unified/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
@pytest.fixture()
1313
def region():
14-
return os.environ.get("STARFOX_REGION", "US")
14+
return os.environ.get("FX_REGION", "US")
1515

1616

1717
@pytest.fixture()

0 commit comments

Comments
 (0)