Skip to content
Snippets Groups Projects

Tests

3 unresolved threads
Merged arsenij.ustjanzew requested to merge tests into master
3 unresolved threads

Implementation of "thesthat" tests

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
81 expect_equal(base_component("input-data/sample.jpg")@pages$default$components[[1]], "### Test\n\n![input-data/sample.jpg](input-data/sample.jpg)\n")
82
83 # test signature 'i2dashboard,gg'
84 o1 <- ggplot2::ggplot(mtcars,ggplot2::aes(x=wt,y=mpg)) + ggplot2::geom_point()
85
86 expect_equal(length(base_component(o1)@pages$default$components), 1)
87 expect_match(base_component(o1)@pages$default$components[[1]], "### Test")
88
89 # test signature 'i2dashboard,gt_tbl'
90 o2 <- gt::gt(mtcars)
91
92 expect_equal(length(base_component(o2)@pages$default$components), 1)
93 expect_match(base_component(o2)@pages$default$components[[1]], "### Test")
94
95 # test signature 'i2dashboard,knitr_kable'
96 o3 <- kableExtra::kable(mtcars) %>% kableExtra::kable_styling()
  • 1 context("Internal functions")
    2
    3 #
    4 # add_vis_object
    5 #
    6 test_that("add_vis_object works correctly",{
    7 obj <- plotly::plot_ly(mtcars,x=~wt,y=~mpg)
  • 33 # render_text
    34 #
    35 test_that("render_text works correctly",{
    36 expect_equal(i2dash:::render_text("input-data/sample.txt"), "### \n\nLorem ipsum dolor sit amet\n")
    37 })
    38
    39 #
    40 # .add_component
    41 #
    42 test_that(".add_component works correctly",{
    43 comp <- "### Component\n\nContent\n\n"
    44 i2dashboard() %>% i2dash:::.add_component("default", comp) -> dashboard
    45
    46 expect_equal(length(dashboard@pages$default$components), 1)
    47 expect_match(dashboard@pages$default$components[[1]], "### Component\n\nContent\n\n")
    48 unlink(dashboard@datadir, recursive=TRUE)
  • added 1 commit

    • 2e7968ae - added requireNamespace checks

    Compare with previous version

  • arsenij.ustjanzew added 14 commits

    added 14 commits

    Compare with previous version

  • jens.preussner mentioned in commit 013c9fe5

    mentioned in commit 013c9fe5

  • Please register or sign in to reply
    Loading