Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import pytest
from controls import Accordion
from playwright.sync_api import Page
from utils.deploy_utils import create_deploys_app_url_fixture, skip_if_not_chrome
from utils.deploy_utils import (
create_deploys_app_url_fixture,
reruns,
reruns_delay,
skip_if_not_chrome,
)

app_url = create_deploys_app_url_fixture("shiny_express_accordion")


@skip_if_not_chrome
@pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay)
def test_express_accordion(page: Page, app_url: str) -> None:
page.goto(app_url)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import pytest
from controls import OutputDataFrame
from playwright.sync_api import Page
from utils.deploy_utils import create_deploys_app_url_fixture, skip_if_not_chrome
from utils.deploy_utils import (
create_deploys_app_url_fixture,
reruns,
reruns_delay,
skip_if_not_chrome,
)

app_url = create_deploys_app_url_fixture("shiny-express-dataframe")


@skip_if_not_chrome
@pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay)
def test_express_dataframe_deploys(page: Page, app_url: str) -> None:
page.goto(app_url)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import pytest
from playwright.sync_api import Page, expect
from utils.deploy_utils import create_deploys_app_url_fixture, skip_if_not_chrome
from utils.deploy_utils import (
create_deploys_app_url_fixture,
reruns,
reruns_delay,
skip_if_not_chrome,
)

app_url = create_deploys_app_url_fixture("shiny-express-folium")


@skip_if_not_chrome
@pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay)
def test_folium_map(page: Page, app_url: str) -> None:
page.goto(app_url)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import pytest
from controls import LayoutNavsetTab
from playwright.sync_api import Page, expect
from utils.deploy_utils import create_deploys_app_url_fixture, skip_if_not_chrome
from utils.deploy_utils import (
create_deploys_app_url_fixture,
reruns,
reruns_delay,
skip_if_not_chrome,
)

TIMEOUT = 2 * 60 * 1000

app_url = create_deploys_app_url_fixture("shiny_express_page_default")


@skip_if_not_chrome
@pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay)
def test_page_default(page: Page, app_url: str) -> None:
page.goto(app_url)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import pytest
from controls import Card, OutputTextVerbatim
from playwright.sync_api import Page
from utils.deploy_utils import create_deploys_app_url_fixture, skip_if_not_chrome
from utils.deploy_utils import (
create_deploys_app_url_fixture,
reruns,
reruns_delay,
skip_if_not_chrome,
)

app_url = create_deploys_app_url_fixture("express_page_fillable")


@skip_if_not_chrome
@pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay)
def test_express_page_fillable(page: Page, app_url: str) -> None:
page.goto(app_url)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import pytest
from controls import Card, OutputTextVerbatim
from playwright.sync_api import Page
from utils.deploy_utils import create_deploys_app_url_fixture, skip_if_not_chrome
from utils.deploy_utils import (
create_deploys_app_url_fixture,
reruns,
reruns_delay,
skip_if_not_chrome,
)

app_url = create_deploys_app_url_fixture("express_page_fluid")


@skip_if_not_chrome
@pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay)
def test_express_page_fluid(page: Page, app_url: str) -> None:
page.goto(app_url)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import pytest
from controls import OutputTextVerbatim, Sidebar
from playwright.sync_api import Page
from utils.deploy_utils import create_deploys_app_url_fixture, skip_if_not_chrome
from utils.deploy_utils import (
create_deploys_app_url_fixture,
reruns,
reruns_delay,
skip_if_not_chrome,
)

app_url = create_deploys_app_url_fixture("express_page_sidebar")


@skip_if_not_chrome
@pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay)
def test_express_page_sidebar(page: Page, app_url: str) -> None:
page.goto(app_url)

Expand Down
9 changes: 8 additions & 1 deletion tests/playwright/deploys/plotly/test_plotly_app.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import pytest
from playwright.sync_api import Page, expect
from utils.deploy_utils import create_deploys_app_url_fixture, skip_if_not_chrome
from utils.deploy_utils import (
create_deploys_app_url_fixture,
reruns,
reruns_delay,
skip_if_not_chrome,
)

TIMEOUT = 2 * 60 * 1000
app_url = create_deploys_app_url_fixture("example_deploy_app_A")


@skip_if_not_chrome
@pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay)
def test_deploys(page: Page, app_url: str) -> None:
page.goto(app_url)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import pytest
from playwright.sync_api import Page, expect
from utils.deploy_utils import create_deploys_app_url_fixture, skip_if_not_chrome
from utils.deploy_utils import (
create_deploys_app_url_fixture,
reruns,
reruns_delay,
skip_if_not_chrome,
)

app_url = create_deploys_app_url_fixture("shiny_client_console_error")


@skip_if_not_chrome
@pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay)
def test_shiny_client_console_error(page: Page, app_url: str) -> None:
page.goto(app_url)

Expand Down
5 changes: 5 additions & 0 deletions tests/playwright/utils/deploy_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import shutil
import subprocess
import sys
import tempfile
import time
from typing import Any, Callable, TypeVar
Expand All @@ -12,6 +13,10 @@
import requests
from conftest import ScopeName, local_app_fixture_gen

is_interactive = hasattr(sys, "ps1")
reruns = 1 if is_interactive else 3
reruns_delay = 1

LOCAL_LOCATION = "local"

__all__ = (
Expand Down