context("cancelTest")
test_that("canCancelTest", {
WPT <- server()
locs <- getLocations(WPT)
lMax <- which.max(vapply(locs,
function(x) x$PendingTests$Total, integer(1)))
maxLoc <-locs[[lMax]]
test <- runTest(WPT, "r-project.org",
location = paste0(maxLoc$location,
":Chrome"))
cTest <- cancelTest(WPT, test$testId)
cTest <- cancelTest(WPT, test$testId, dryRun = TRUE)
expect_identical(cTest, paste0(WPT$url, "/cancelTest.php?test=",
test$testId, "&k=",
Sys.getenv("WPTKEY"), "&f=json"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.