|
@@ -123,11 +123,30 @@ public class NavigatorTest extends BaseTest {
|
123
|
123
|
stack1.push(child1);
|
124
|
124
|
stack2.push(child2);
|
125
|
125
|
stack2.push(child3);
|
|
126
|
+ stack2.push(new SimpleViewController(activity, "child4"));
|
126
|
127
|
bottomTabsController.setTabs(Arrays.<ViewController>asList(stack1, stack2));
|
127
|
128
|
uut.setRoot(bottomTabsController);
|
128
|
129
|
|
129
|
130
|
uut.pop(child2.getId());
|
130
|
131
|
|
|
132
|
+ assertThat(stack2.getChildControllers()).containsOnly(child2, child3);
|
|
133
|
+ }
|
|
134
|
+
|
|
135
|
+ @Test
|
|
136
|
+ public void popTo_FromCorrectStackUpToChild() throws Exception {
|
|
137
|
+ BottomTabsController bottomTabsController = new BottomTabsController(activity, "tabsController");
|
|
138
|
+ StackController stack1 = new StackController(activity, "stack1");
|
|
139
|
+ StackController stack2 = new StackController(activity, "stack2");
|
|
140
|
+ stack1.push(child1);
|
|
141
|
+ stack2.push(child2);
|
|
142
|
+ stack2.push(child3);
|
|
143
|
+ stack2.push(new SimpleViewController(activity, "child4"));
|
|
144
|
+ stack2.push(new SimpleViewController(activity, "child5"));
|
|
145
|
+ bottomTabsController.setTabs(Arrays.<ViewController>asList(stack1, stack2));
|
|
146
|
+ uut.setRoot(bottomTabsController);
|
|
147
|
+
|
|
148
|
+ uut.popTo(child2.getId(), child2.getId());
|
|
149
|
+
|
131
|
150
|
assertThat(stack2.getChildControllers()).containsOnly(child2);
|
132
|
151
|
}
|
133
|
152
|
|