Compare commits

...

16 Commits

Author SHA1 Message Date
Barbara Borges Ribeiro
f66e9d5913 update commit pointer to most recent commit in shiny-test-apps 2017-09-07 21:32:00 -05:00
Winston Chang
f1ff17ea94 Remove shinybootstrap2 note 2017-09-07 21:32:00 -05:00
Winston Chang
397a6bfce4 Update README 2017-09-07 21:32:00 -05:00
Winston Chang
cc25e95cb2 Fix package caching 2017-09-07 21:32:00 -05:00
Winston Chang
72adf0ab57 Update app tests 2017-09-07 21:32:00 -05:00
Winston Chang
c5f04d276a Use updated apps 2017-09-07 21:32:00 -05:00
Winston Chang
29fc5bf720 Use correct version of Phantom on Travis 2017-09-07 21:32:00 -05:00
Winston Chang
d8887c20ca Add DT to suggested packages 2017-09-07 21:32:00 -05:00
Winston Chang
31f13b4846 Update test apps 2017-09-07 21:32:00 -05:00
Winston Chang
6d46a942c9 Use new compareImages option 2017-09-07 21:32:00 -05:00
Winston Chang
43b571fbab Use master branch from shinytest 2017-09-07 21:32:00 -05:00
Winston Chang
30076b7975 Try excluding screenshots from testing 2017-09-07 21:32:00 -05:00
Winston Chang
855525e17b Add shinytest to Suggests 2017-09-07 21:32:00 -05:00
Winston Chang
79480a63ae Update .Rbuildignore 2017-09-07 21:32:00 -05:00
Winston Chang
3782e515e8 Update Travis for submodule 2017-09-07 21:32:00 -05:00
Winston Chang
4a2e1b65cb Add shiny-test-apps submodule 2017-09-07 21:32:00 -05:00
7 changed files with 63 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
^\.Rproj\.user$
^\.git$
^examples$
^shiny\.Rproj$
^.*\.Rproj$
^shiny\.sh$
^shiny\.cmd$
^run\.R$
@@ -18,3 +18,5 @@
^.*\.o$
^appveyor\.yml$
^revdep$
^tests/testthat/apps/\.git$
^travis_phantomjs$

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "tests/testthat/apps"]
path = tests/testthat/apps
url = git@github.com:rstudio/shiny-test-apps.git

View File

@@ -1,10 +1,39 @@
dist: trusty
language: r
r:
- oldrel
- release
- devel
sudo: false
cache: packages
cache:
packages: true
# Use newer version of PhantomJS than is installed by default on basic R image.
# Code referenced from:
# https://github.com/travis-ci/travis-ci/issues/3225#issuecomment-255500144
directories:
- "travis_phantomjs"
# Need to replace the git: URL with https: so that Travis can check out the
# submodule.
git:
submodules: false
before_install:
# For updated version of PhantomJS
- "export PHANTOMJS_VERSION=2.1.1"
- "phantomjs --version"
- "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH"
- "hash -r"
- "phantomjs --version"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then hash -r; fi"
- "phantomjs --version"
# For git submodule
- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
notifications:
email:

View File

@@ -81,7 +81,12 @@ Suggests:
markdown,
rmarkdown,
ggplot2,
magrittr
magrittr,
DT,
shinytest
Remotes:
rstudio/shinytest,
rstudio/DT
URL: http://shiny.rstudio.com
BugReports: https://github.com/rstudio/shiny/issues
Collate:

View File

@@ -43,22 +43,19 @@ To learn more we highly recommend you check out the [Shiny Tutorial](http://shin
We hope you enjoy using Shiny. If you have general questions about using Shiny, please use the Shiny [mailing list](https://groups.google.com/forum/#!forum/shiny-discuss). For bug reports, please use the [issue tracker](https://github.com/rstudio/shiny/issues).
## Bootstrap 3 migration
Shiny versions 0.10.2.2 and below used the Bootstrap 2 web framework. After 0.10.2.2, Shiny switched to Bootstrap 3. For most users, the upgrade should be seamless. However, if you have have customized your HTML-generating code to use features specific to Bootstrap 2, you may need to update your code to work with Bootstrap 3.
If you do not wish to update your code at this time, you can use the [shinybootstrap2](https://github.com/rstudio/shinybootstrap2) package for backward compatibility.
If you prefer to install an older version of Shiny, you can do it using the devtools package:
```R
devtools::install_version("shiny", version = "0.10.2.2")
```
## Development notes
The Javascript code in Shiny is minified using tools that run on Node.js. See the tools/ directory for more information.
A set of application-level tests reside in the [shiny-test-apps](https://github.com/rstudio/shiny-test-apps) repository, which is set up as a git submodule of this repository. To use the full-application tests, simply update the submodule:
```
git submodule update --init
```
This will clone the shiny-test-apps repository into the directory tests/testthat/apps. When you run tests for shiny, it will also test the applications.
## Guidelines for contributing
We welcome contributions to the **shiny** package. Please see our [CONTRIBUTING.md](CONTRIBUTING.md) file for detailed guidelines of how to contribute.

1
tests/testthat/apps Submodule

Submodule tests/testthat/apps added at c471e6449e

View File

@@ -0,0 +1,12 @@
context("apps")
if (dir.exists("apps")) {
app_dirs <- Filter(dir.exists, dir("apps", full.names = TRUE))
if (length(app_dirs) > 0) {
for (app_dir in app_dirs) {
test_that(basename(app_dir), {
shinytest::expect_pass(shinytest::testApp(app_dir, compareImages = FALSE))
})
}
}
}