Skip to content

Commit 7dcdfe8

Browse files
committed
merge main
2 parents a8b31ca + 0c0a07a commit 7dcdfe8

23 files changed

+371
-126
lines changed

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

.github/workflows/smoke.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ 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 }}
@@ -137,7 +143,7 @@ jobs:
137143
echo "TESTRAIL_REPORT='true'" >> "$GITHUB_ENV";
138144
echo "Running report for most recent Beta on MacOS";
139145
- name: Install dependencies
140-
id: setup
146+
id: setup
141147
run: |
142148
mkdir -p artifacts;
143149
pip3 install 'pipenv==2023.11.15';

collect_executables.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,33 @@ def get_gd_platform():
102102
if not language:
103103
language = "en-US"
104104

105+
if channel == "-devedition":
106+
this_devedition = BACKSTOP
107+
fx_download_dir_url = (
108+
"https://archive.mozilla.org/pub/devedition/releases/135.0b5/"
109+
)
110+
111+
while True:
112+
(major, _) = this_devedition.split(".")
113+
major = int(major)
114+
this_devedition = f"{major + 1}.0b5"
115+
next_candidate = f"https://archive.mozilla.org/pub/devedition/releases/{this_devedition}/"
116+
117+
rs = requests.get(next_candidate)
118+
if rs.status_code > 399:
119+
break
120+
121+
fx_download_dir_url = next_candidate
122+
123+
devedition_version = fx_download_dir_url.split("/")[-2]
124+
if NUMBER_ONLY:
125+
print(devedition_version)
126+
else:
127+
print(
128+
f"{fx_download_dir_url}{get_fx_platform()}/{language}/Firefox%20{devedition_version}.{get_fx_executable_extension()}"
129+
)
130+
exit()
131+
105132
candidate_exists = True
106133
this_beta = BACKSTOP
107134
while candidate_exists:

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()
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22
from selenium.webdriver import Firefox
33

4+
from l10n_CM.Unified.conftest import autofill_popup
45
from modules.browser_object_autofill_popup import AutofillPopup
56
from modules.page_object_autofill import AddressFill
67
from modules.util import Utilities
@@ -11,43 +12,44 @@ def test_case():
1112
return "2888558"
1213

1314

14-
def test_demo_ad_autofill_name_org(driver: Firefox, region: str):
15+
def test_demo_ad_autofill_name_org(
16+
driver: Firefox,
17+
region: str,
18+
address_autofill: AddressFill,
19+
autofill_popup: AutofillPopup,
20+
util: Utilities,
21+
):
1522
"""
1623
C2888558 - Verify Autofill functionality when selecting an entry from the dropdown for name/org fields
1724
"""
18-
# Instantiate objects
19-
address_autofill = AddressFill(driver)
20-
address_autofill_popup = AutofillPopup(driver)
21-
util = Utilities()
22-
2325
# Create fake data and fill it in
2426
address_autofill.open()
2527
address_autofill_data = util.fake_autofill_data(region)
2628
address_autofill.save_information_basic(address_autofill_data)
2729

2830
# Click the "Save" button
29-
address_autofill_popup.click_doorhanger_button("save")
31+
autofill_popup.click_doorhanger_button("save")
3032

3133
# Double inside Name field and select a saved address entry from the dropdown
3234
address_autofill.double_click("form-field", labels=["name"])
3335

3436
# Click on the first element from the autocomplete dropdown
35-
first_item = address_autofill_popup.get_nth_element(1)
36-
address_autofill_popup.click_on(first_item)
37+
first_item = autofill_popup.get_nth_element(1)
38+
autofill_popup.click_on(first_item)
3739

3840
# Verify autofill data
3941
address_autofill.verify_autofill_data(address_autofill_data, region, util)
4042

4143
# Double inside Name field and select clear form autofill
4244
address_autofill.double_click("form-field", labels=["name"])
43-
address_autofill_popup.click_clear_form_option()
45+
autofill_popup.click_clear_form_option()
4446

4547
# Double inside Organization field and select a saved address entry from the dropdown
4648
address_autofill.double_click("form-field", labels=["organization"])
4749

4850
# Click on the first element from the autocomplete dropdown
49-
first_item = address_autofill_popup.get_nth_element(1)
50-
address_autofill_popup.click_on(first_item)
51+
first_item = autofill_popup.get_nth_element(1)
52+
autofill_popup.click_on(first_item)
5153

5254
# Verify autofill data
5355
address_autofill.verify_autofill_data(address_autofill_data, region, util)

l10n_CM/Unified/test_demo_ad_autofill_phone_email.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,45 @@ def test_case():
1111
return "2888569"
1212

1313

14-
def test_demo_ad_autofill_phone_email(driver: Firefox, region: str):
14+
def test_demo_ad_autofill_phone_email(
15+
driver: Firefox,
16+
region: str,
17+
address_autofill: AddressFill,
18+
autofill_popup: AutofillPopup,
19+
util: Utilities,
20+
):
1521
"""
1622
C2888569 - Verify Autofill functionality when selecting an entry from the dropdown for tele/email fields
1723
"""
18-
# Instantiate objects
19-
address_autofill = AddressFill(driver)
20-
address_autofill_popup = AutofillPopup(driver)
21-
util = Utilities()
2224

2325
# Create fake data and fill it in
2426
address_autofill.open()
2527
address_autofill_data = util.fake_autofill_data(region)
2628
address_autofill.save_information_basic(address_autofill_data)
2729

2830
# Click the "Save" button
29-
address_autofill_popup.click_doorhanger_button("save")
31+
autofill_popup.click_doorhanger_button("save")
3032

3133
# Double inside phone field and select a saved address entry from the dropdown
3234
address_autofill.double_click("form-field", labels=["tel"])
3335

3436
# Click on the first element from the autocomplete dropdown
35-
first_item = address_autofill_popup.get_nth_element(1)
36-
address_autofill_popup.click_on(first_item)
37+
first_item = autofill_popup.get_nth_element(1)
38+
autofill_popup.click_on(first_item)
3739

3840
# Verify autofill data
3941
address_autofill.verify_autofill_data(address_autofill_data, region, util)
4042

4143
# Double inside phone field and select clear form autofill
4244
address_autofill.double_click("form-field", labels=["tel"])
43-
address_autofill_popup.click_clear_form_option()
45+
autofill_popup.click_clear_form_option()
4446

4547
# Double inside email field and select a saved address entry from the dropdown
4648
address_autofill.double_click("form-field", labels=["email"])
4749

4850
# Click on the first element from the autocomplete dropdown
49-
first_item = address_autofill_popup.get_nth_element(1)
50-
address_autofill_popup.click_on(first_item)
51+
first_item = autofill_popup.get_nth_element(1)
52+
autofill_popup.click_on(first_item)
5153

5254
# Verify autofill data
5355
address_autofill.verify_autofill_data(address_autofill_data, region, util)

l10n_CM/Unified/test_demo_ad_verify_new_address_added.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def region():
2020
@pytest.fixture()
2121
def add_prefs(region: str):
2222
return [
23-
("browser.search.region", region),
2423
("extensions.formautofill.creditCards.supportedCountries", region),
2524
("extensions.formautofill.addresses.supported", "on"),
2625
]

l10n_CM/Unified/test_demo_ad_yellow_highlight.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,30 @@ def test_case():
1212

1313

1414
def test_address_yellow_highlight_on_name_organization_fields(
15-
driver: Firefox, region: str
15+
driver: Firefox,
16+
region: str,
17+
util: Utilities,
18+
address_autofill: AddressFill,
19+
autofill_popup: AutofillPopup,
1620
):
1721
"""
1822
C2888559 - Verify the yellow highlight appears on autofilled fields for name and organization.
1923
"""
2024

21-
# Instantiate objects
22-
address_autofill = AddressFill(driver)
23-
address_autofill_popup = AutofillPopup(driver)
24-
util = Utilities()
25-
2625
# Create fake data and fill it in
2726
address_autofill.open()
2827
address_autofill_data = util.fake_autofill_data(region)
2928
address_autofill.save_information_basic(address_autofill_data)
3029

3130
# Click the "Save" button
32-
address_autofill_popup.click_doorhanger_button("save")
31+
autofill_popup.click_doorhanger_button("save")
3332

3433
# Double click inside phone field and select a saved address entry from the dropdown
3534
address_autofill.double_click("form-field", labels=["name"])
3635

3736
# Click on the first element from the autocomplete dropdown
38-
first_item = address_autofill_popup.get_nth_element(1)
39-
address_autofill_popup.click_on(first_item)
37+
first_item = autofill_popup.get_nth_element(1)
38+
autofill_popup.click_on(first_item)
4039

4140
# Verify the name and organization fields are highlighted
4241
address_autofill.verify_field_yellow_highlights(
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import pytest
2+
from selenium.webdriver import Firefox
3+
4+
from modules.browser_object_autofill_popup import AutofillPopup
5+
from modules.page_object_autofill import AddressFill
6+
from modules.util import Utilities
7+
8+
9+
@pytest.fixture()
10+
def test_case():
11+
return "2888570"
12+
13+
14+
def test_address_yellow_highlight_address_fields(
15+
driver: Firefox,
16+
region: str,
17+
address_autofill: AddressFill,
18+
util: Utilities,
19+
autofill_popup: AutofillPopup,
20+
):
21+
"""
22+
C2888570 - Verify the yellow highlight appears on autofilled fields for the email and phone fields.
23+
"""
24+
25+
# Create fake data and fill it in
26+
address_autofill.open()
27+
address_autofill_data = util.fake_autofill_data(region)
28+
address_autofill.save_information_basic(address_autofill_data)
29+
30+
# Click the "Save" button
31+
autofill_popup.click_doorhanger_button("save")
32+
33+
# Double click inside email field and select a saved address entry from the dropdown
34+
address_autofill.double_click("form-field", labels=["email"])
35+
36+
# Click on the first element from the autocomplete dropdown
37+
first_item = autofill_popup.get_nth_element(1)
38+
autofill_popup.click_on(first_item)
39+
40+
# Verify the email and phone fields are highlighted
41+
address_autofill.verify_field_yellow_highlights(
42+
fields_to_test=["email", "tel"], expected_highlighted_fields=["email", "tel"]
43+
)

0 commit comments

Comments
 (0)