Skip to content

Commit

Permalink
Merge pull request #4855 from velezd/fix_end2end
Browse files Browse the repository at this point in the history
webui: Fix WebUI end2end tests after recent renaming and introducing of screenshot limit
  • Loading branch information
KKoukiou authored Jun 26, 2023
2 parents daed9df + 25f59a2 commit 631b2b9
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/webui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ======================================
# The template is located in: webui-tests.yml.j2

# Run webui integration tests in a PR
# Run webui end2end tests in a PR
# Triggered by a "/webui-test <LAUNCH ARGS>" comment from an organization member.
# Currently the only <LAUNCH ARG> is supported - "os" URL for InstallationSource
name: webui-tests
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
hypervisor_vm_limit=${{ env.TEST_JOBS }}
test_timeout=${{ env.LAUNCHER_TIMEOUT_MINUTES }}
[library]
directPath=${{ github.workspace }}/anaconda/ui/webui/test/integration
directPath=${{ github.workspace }}/anaconda/ui/webui/test/end2end
EOF
- name: Post status running tests
Expand All @@ -178,7 +178,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run webui integration tests
- name: Run webui end2end tests
working-directory: ./permian
run: |
PYTHONPATH=${PYTHONPATH:-}:${{ github.workspace }}/tplib \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/webui-tests.yml.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if distro_release == "rawhide" %}
# Run webui integration tests in a PR
# Run webui end2end tests in a PR
# Triggered by a "/webui-test <LAUNCH ARGS>" comment from an organization member.
# Currently the only <LAUNCH ARG> is supported - "os" URL for InstallationSource
name: webui-tests
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
hypervisor_vm_limit=${{ env.TEST_JOBS }}
test_timeout=${{ env.LAUNCHER_TIMEOUT_MINUTES }}
[library]
directPath=${{ github.workspace }}/anaconda/ui/webui/test/integration
directPath=${{ github.workspace }}/anaconda/ui/webui/test/end2end
EOF

- name: Post status running tests
Expand All @@ -172,7 +172,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run webui integration tests
- name: Run webui end2end tests
working-directory: ./permian
run: |
PYTHONPATH=${PYTHONPATH:-}:${{ github.workspace }}/tplib \
Expand Down
2 changes: 1 addition & 1 deletion ui/webui/test/end2end/default.tc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ priority: 9
execution:
type: anaconda-webui
automation_data:
script_file: ./ui/webui/test/integration/default.py
script_file: ./ui/webui/test/end2end/default.py
test_case: DefaultInstallation
instructions:
setup:
Expand Down
2 changes: 1 addition & 1 deletion ui/webui/test/end2end/storage_encryption.tc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ priority: 5
execution:
type: anaconda-webui
automation_data:
script_file: ./ui/webui/test/integration/storage_encryption.py
script_file: ./ui/webui/test/end2end/storage_encryption.py
test_case: StorageEncryption
instructions:
setup:
Expand Down
2 changes: 1 addition & 1 deletion ui/webui/test/end2end/wizard_navigation.tc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ priority: 5
execution:
type: anaconda-webui
automation_data:
script_file: ./ui/webui/test/integration/wizard_navigation.py
script_file: ./ui/webui/test/end2end/wizard_navigation.py
test_case: WizardNavigation
instructions:
setup:
Expand Down
2 changes: 1 addition & 1 deletion ui/webui/test/helpers/end2end.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def setUp(self):
self.logs_dir = os.path.join('./test_logs', self.__class__.__name__)
if not os.path.isdir(self.logs_dir):
os.makedirs(self.logs_dir)
os.environ["END2END"] = True # pylint: disable=environment-modify
os.environ["END2END"] = '1' # pylint: disable=environment-modify

def __add_public_key(self):
with open(self.machine.identity_file + '.pub', 'r') as pub:
Expand Down
2 changes: 1 addition & 1 deletion ui/webui/test/helpers/step_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def wrapper(*args, **kwargs):
if docstring:
print(f'[DOC] {function.__doc__}')

end2end = os.environ.get('END2END', False)
end2end = bool(int(os.environ.get('END2END', '0')))

if end2end and (snapshots or snapshot_before):
BrowserSnapshot.new(args[0].browser)
Expand Down

0 comments on commit 631b2b9

Please sign in to comment.