test_that("Shiny apps - image/iframe creation", {
expect_equal(as.character(launch_shiny("https://www.shinyapps.io/app1",
width = 780, height = 700, createimg = FALSE, alt1 = NULL)),
"[<img onclick=\"launchApp('app1shiny', 'https://www.shinyapps.io/app1');\" src=\"images/shinyapps/shinyapp_default.png\" width=\"780\" height=\"700\" class=\"shiny-img\" id=\"imgapp1shiny\"/>\n<iframe width=\"780\" height=\"700\" frameborder=\"0\" scrolling=\"auto\" style=\"display:none\" class=\"shiny-app\" id=\"app1shiny\"></iframe>]{#app1 }")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.