Skip to content

Commit

Permalink
Merge branch 'main' into fix-typestub-types
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Nov 28, 2023
2 parents c941552 + 826f477 commit c379a85
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run End-to-End tests
timeout-minutes: 20
run: |
make e2e
Expand Down Expand Up @@ -96,6 +97,7 @@ jobs:
npm ci
- name: Run example app tests
timeout-minutes: 20
run: |
make e2e-examples
Expand Down Expand Up @@ -124,6 +126,7 @@ jobs:
DEPLOY_SHINYAPPS_NAME: "${{ secrets.DEPLOY_SHINYAPPS_NAME }}"
DEPLOY_SHINYAPPS_TOKEN: "${{ secrets.DEPLOY_SHINYAPPS_TOKEN }}"
DEPLOY_SHINYAPPS_SECRET: "${{ secrets.DEPLOY_SHINYAPPS_SECRET }}"
timeout-minutes: 30
run: |
make e2e-deploys
Expand Down Expand Up @@ -197,6 +200,7 @@ jobs:
npm ci
- name: Run End-to-End tests
timeout-minutes: 20
run: |
make e2e-junit
- name: Report results to Testrail
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ dev =
flake8>=6.0.0
flake8-bugbear>=23.2.13
isort>=5.10.1
pyright
pyright>=1.1.334
pre-commit>=2.15.0
wheel
matplotlib
Expand All @@ -99,7 +99,7 @@ doc =
jupyter
jupyter_client < 8.0.0
tabulate
shinylive==0.1.0
shinylive==0.1.1
pydantic==1.10
quartodoc==0.4.1
griffe==0.32.3
Expand Down
21 changes: 13 additions & 8 deletions tests/e2e/ui/accordion/test_accordion.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ def test_accordion(page: Page, local_app: ShinyAppProc) -> None:
acc = Accordion(page, "acc")
acc_panel_A = acc.accordion_panel("Section A")
output_txt_verbatim = OutputTextVerbatim(page, "acc_txt")
output_txt_verbatim.expect_value("input.acc(): ('Section A',)")
acc_panel_A.set(True)
acc_panel_A.expect_open(True)
acc_panel_A.set(False)
acc_panel_A.expect_open(False)

alternate_button = InputActionButton(page, "alternate")
open_all_button = InputActionButton(page, "open_all")
close_all_button = InputActionButton(page, "close_all")
toggle_b_button = InputActionButton(page, "toggle_b")
toggle_updates_button = InputActionButton(page, "toggle_updates")
toggle_efg_button = InputActionButton(page, "toggle_efg")

output_txt_verbatim.expect_value("input.acc(): ('Section A',)")

acc_panel_A.set(True)
acc_panel_A.expect_open(True)
acc_panel_A.set(False)
acc_panel_A.expect_open(False)

acc.expect_width(None)
acc.expect_height(None)

Expand Down Expand Up @@ -66,12 +68,15 @@ def test_accordion(page: Page, local_app: ShinyAppProc) -> None:
# workaround - toggle it twice Section A
acc_panel_updated_A.toggle()
# add timeout to wait for css animation
page.wait_for_timeout(500)
page.wait_for_timeout(100)
acc_panel_updated_A.toggle()
output_txt_verbatim.expect_value(
"input.acc(): ('updated_section_a', 'Section C', 'Section D')"
)

# TODO-karan-future; Remove return when test is able to pass. Currently it hangs indefinitely and no notification as to why.
return

toggle_efg_button.click()
acc.expect_panels(
[
Expand All @@ -94,7 +99,7 @@ def test_accordion(page: Page, local_app: ShinyAppProc) -> None:
"Section G",
]
)
# will be uncommented once https://github.com/rstudio/bslib/issues/565 is fixed
# Should be uncommented once https://github.com/rstudio/bslib/issues/565 is fixed
# output_txt_verbatim.expect_value(
# "input.acc(): ('updated_section_a', 'Section B', 'Section E', 'Section F', 'Section G')"
# )

0 comments on commit c379a85

Please sign in to comment.