Skip to content

Commit 9f7d33e

Browse files
Merge pull request #191 from plotly/pr1125-dashR-tests
2 parents b03eccd + 406f8ae commit 9f7d33e

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.circleci/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ jobs:
3737
command: |
3838
python -m venv venv
3939
. venv/bin/activate
40-
pip install -e git+https://github.com/plotly/dash.git#egg=dash[testing]
40+
git clone --depth 1 https://github.com/plotly/dash.git dash-main
41+
cd dash-main && pip install -e .[dev,testing] --progress-bar off && cd ..
42+
cd dash-main/\@plotly/dash-generator-test-component-nested && npm ci && npm run build && sudo R CMD INSTALL . && cd ../../..
43+
cd dash-main/\@plotly/dash-generator-test-component-standard && npm ci && npm run build && sudo R CMD INSTALL . && cd ../../..
4144
export PATH=$PATH:/home/circleci/.local/bin/
4245
pytest --nopercyfinalize --junitxml=test-reports/dashr.xml tests/integration/
4346
- store_artifacts:

tests/integration/test_generation.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from selenium.webdriver.support.select import Select
2+
import time, os
3+
4+
5+
app = """
6+
library(dash)
7+
library(dashHtmlComponents)
8+
library(dashGeneratorTestComponentNested)
9+
library(dashGeneratorTestComponentStandard)
10+
11+
app <- Dash$new()
12+
app$layout(htmlDiv(list(
13+
dgtc_standardMyStandardComponent(id="standard", value="Standard"),
14+
dgtc_nestedMyNestedComponent(id="nested", value="Nested")
15+
)))
16+
17+
app$run_server()
18+
"""
19+
20+
21+
def test_gene001_simple_callback(dashr):
22+
dashr.start_server(app)
23+
24+
assert dashr.wait_for_element("#standard").text == "Standard"
25+
assert dashr.wait_for_element("#nested").text == "Nested"

0 commit comments

Comments
 (0)