Skip to content

Commit 4632b0d

Browse files
authored
Merge pull request #2222 from thseiler/code-climate/enable-more-windows-tests
code-climate: re-enable some disabled tests under windows
2 parents 5db1e5b + f383091 commit 4632b0d

File tree

14 files changed

+29
-30
lines changed

14 files changed

+29
-30
lines changed

.github/workflows/ci-windows-powershell.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ jobs:
4444
run: |
4545
pip install -r requirements.check.txt
4646
47+
- name: " Windows specific: Install Tidy via Chocolatey, and add it to $PATH"
48+
shell: pwsh
49+
run: |
50+
choco install html-tidy -y
51+
$tidyPath = (Get-ChildItem "C:\ProgramData\chocolatey\lib\html-tidy" -Recurse -Filter tidy.exe | Select-Object -First 1).DirectoryName
52+
echo "$tidyPath" | Out-File -Append -Encoding ascii $env:GITHUB_PATH
53+
4754
- name: Run tests (Powershell)
4855
run: |
4956
invoke test

.github/workflows/ci-windows.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ jobs:
4444
run: |
4545
pip install -r requirements.check.txt
4646
47+
- name: " Windows specific: Install Tidy via Chocolatey, and add it to $PATH"
48+
shell: pwsh
49+
run: |
50+
choco install html-tidy -y
51+
$tidyPath = (Get-ChildItem "C:\ProgramData\chocolatey\lib\html-tidy" -Recurse -Filter tidy.exe | Select-Object -First 1).DirectoryName
52+
echo "$tidyPath" | Out-File -Append -Encoding ascii $env:GITHUB_PATH
53+
4754
- name: Run Lint tasks
4855
run: |
4956
invoke lint

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ dependencies = [
8888
"WebSockets",
8989

9090
# HTML2PDF dependencies
91-
"html2print >= 0.0.15",
91+
"html2print >= 0.0.16",
9292
]
9393
# @sdoc[/SDOC-SRS-89]
9494

tasks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,9 @@ def test_integration(
422422
# the exists() check works.
423423
assert os.path.exists(chromedriver_path), chromedriver_path
424424
chromedriver_param = f"--param CHROMEDRIVER={os.path.join(chromedriver_path, 'chromedriver')}"
425+
if os.name == "nt":
426+
# On Windows, its chromdriver.exe
427+
chromedriver_param = chromedriver_param + ".exe"
425428
test_folder = f"{cwd}/tests/integration/features/html2pdf"
426429

427430
itest_command = f"""

tests/end2end/screens/deep_traceability/view_document/view_document_go_from_requirement_card_to_requirement_in_document_view_another_document/test_case.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,8 @@
77
Screen_ProjectIndex,
88
)
99
from tests.end2end.server import SDocTestServer
10-
from tests.end2end.test_helpers import available_systems
1110

1211

13-
# FIXME: This test fails on Windows with
14-
# Element {(//sdoc-node[@data-testid='node-requirement'])[2]//*[@data-testid='requirement-find-in-document']} was not present after 10 seconds!
15-
# We don't have a Windows machine to investigate this in detail.
16-
@available_systems(["macos", "linux"])
1712
class Test(E2ECase):
1813
def test(self):
1914
test_setup = End2EndTestSetup(path_to_test_file=__file__)
@@ -47,6 +42,6 @@ def test(self):
4742
requirement.do_go_to_this_requirement_in_document_view()
4843
)
4944
screen_document_.assert_on_screen_document()
50-
screen_document_.assert_target_by_anchor("1-REQ-002")
45+
screen_document_.assert_target_by_anchor("REQ-002")
5146

5247
assert test_setup.compare_sandbox_and_expected_output()

tests/integration/features/html2pdf/01_empty_document/test.itest

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
REQUIRES: TEST_HTML2PDF
22

3-
# FIXME: Getting timeouts on Windows CI all the time. Needs to be checked or tested by users.
4-
REQUIRES: PLATFORM_IS_NOT_WINDOWS
5-
63
RUN: %strictdoc export %S --formats=html2pdf --output-dir Output | filecheck %s --dump-input=fail
74
CHECK: html2print: JS logs from the print session
85

tests/integration/features/html2pdf/02_three_top_level_requirements/test.itest

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
REQUIRES: TEST_HTML2PDF
22

3-
# FIXME: Getting timeouts on Windows CI all the time. Needs to be checked or tested by users.
4-
REQUIRES: PLATFORM_IS_NOT_WINDOWS
5-
63
RUN: %strictdoc export %S --formats=html2pdf --output-dir Output | filecheck %s --dump-input=fail
74
CHECK: html2print: JS logs from the print session
85

tests/integration/features/html2pdf/03_three_documents_with_assets/test.itest

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
REQUIRES: TEST_HTML2PDF
22

3-
# FIXME: Getting timeouts on Windows CI all the time. Needs to be checked or tested by users.
4-
REQUIRES: PLATFORM_IS_NOT_WINDOWS
5-
63
RUN: %strictdoc export %S --formats=html2pdf --output-dir Output | filecheck %s --dump-input=fail
74
CHECK: html2print: JS logs from the print session
85

tests/integration/features/html2pdf/04_composable_document_with_assets/test.itest

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
REQUIRES: TEST_HTML2PDF
22

3-
# FIXME: Getting timeouts on Windows CI all the time. Needs to be checked or tested by users.
4-
REQUIRES: PLATFORM_IS_NOT_WINDOWS
5-
63
RUN: %strictdoc export %S --formats=html2pdf --included-documents --output-dir Output | filecheck %s --dump-input=fail
74
CHECK: html2print: JS logs from the print session
85

tests/integration/features/html2pdf/05_generate_bundle_document/test.itest

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
REQUIRES: TEST_HTML2PDF
22

3-
# FIXME: Getting timeouts on Windows CI all the time. Needs to be checked or tested by users.
4-
REQUIRES: PLATFORM_IS_NOT_WINDOWS
5-
63
RUN: %strictdoc export %S --formats=html2pdf --generate-bundle-document --output-dir Output | filecheck %s --dump-input=fail
74
CHECK: html2print: JS logs from the print session
85

0 commit comments

Comments
 (0)