Skip to content

Commit

Permalink
refactor: test cases titles
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Sobolewski committed Sep 12, 2023
1 parent ce0a740 commit 3dd96ea
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions tests/testthat/test-CommandBar.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ far_items <- function() {
}

describe("CommandBar", {
it("should set input of `key` of clicked CommandBarItem", {
it("should set input after clicking on a CommandBarItem", {
skip_on_cran()

# Arrange
Expand Down Expand Up @@ -98,7 +98,7 @@ describe("CommandBar.shinyInput", {
expect_null(value)
})

it("should set input on id of CommandBar with `key` value of clicked CommandBarItem", {
it("should set input after clicking on CommandBarItem with with `key` value of clicked item", {
skip_on_cran()

# Arrange
Expand All @@ -113,7 +113,7 @@ describe("CommandBar.shinyInput", {
expect_equal(value, "download_value")
})

it("should set input on id of CommandBar with `key` value of clicked nested CommandBarItem", {
it("should set input after clicking on nested CommandBarItem with `key` value of clicked item", {
skip_on_cran()

# Arrange
Expand All @@ -130,22 +130,7 @@ describe("CommandBar.shinyInput", {
expect_equal(value, "email_message_value")
})

it("should set input on id of CommandBar with `key` value of a clicked farItem", {
skip_on_cran()

# Arrange
app <- init_driver(test_app())
withr::defer(app$stop())

# Act
app$click(selector = "#tile")
value <- app$get_value(input = "commandBar")

# Assert
expect_equal(value, "tile_value")
})

it("should work with unset `farItems`", {
it("should work with only `items` added to CommandBar", {
skip_on_cran()

# Arrange
Expand All @@ -168,7 +153,7 @@ describe("CommandBar.shinyInput", {
expect_equal(value, "download_value")
})

it("should work with unset `items`", {
it("should work with only `farItems` added to CommandBar", {
skip_on_cran()

# Arrange
Expand Down

0 comments on commit 3dd96ea

Please sign in to comment.