Skip to content

Commit

Permalink
Merge pull request #264 from player-ui/update-iosStageRevertPluginTests
Browse files Browse the repository at this point in the history
update iOS StageRevertDataPluginTests
  • Loading branch information
nancywu1 authored Jan 8, 2024
2 parents 7c2605c + d4b66a2 commit fc98b1c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
paths:
- ~/android-tools

- run: gem install bundler
- run: gem install bundler -v 2.4.22

- restore_cache:
keys:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@ class StageRevertDataPluginTests: XCTestCase {

player.hooks?.viewController.tap { viewController in
viewController.hooks.view.tap { view in
guard view.id == "view-3" else {
(player.state as? InProgressState)?.controllers?.data.set(transaction: ["name": "Test"])
(player.state as? InProgressState)?.controllers?.flow.transition(with: "clear")
return
}
view.hooks.onUpdate.tap { value in
guard view.id == "view-3" else {
(player.state as? InProgressState)?.controllers?.data.set(transaction: ["name": "Test"])
(player.state as? InProgressState)?.controllers?.flow.transition(with: "clear")
return
}

let labelValue = value.objectForKeyedSubscript("value").toString()

XCTAssertEqual(labelValue, "default")
Expand All @@ -91,12 +92,13 @@ class StageRevertDataPluginTests: XCTestCase {

player.hooks?.viewController.tap { viewController in
viewController.hooks.view.tap { view in
guard view.id == "view-2" else {
(player.state as? InProgressState)?.controllers?.data.set(transaction: ["name": "Test"])
(player.state as? InProgressState)?.controllers?.flow.transition(with: "commit")
return
}
view.hooks.onUpdate.tap { value in
guard view.id == "view-2" else {
(player.state as? InProgressState)?.controllers?.data.set(transaction: ["name": "Test"])
(player.state as? InProgressState)?.controllers?.flow.transition(with: "commit")
return
}

let labelValue = value.objectForKeyedSubscript("value").toString()

XCTAssertEqual(labelValue, "Test")
Expand Down

0 comments on commit fc98b1c

Please sign in to comment.