|
@@ -291,6 +291,18 @@ public class StackControllerTest extends BaseTest {
|
291
|
291
|
});
|
292
|
292
|
}
|
293
|
293
|
|
|
294
|
+ @Test
|
|
295
|
+ public void setRoot_backButtonIsAddedToAllChildren() {
|
|
296
|
+ Robolectric.getForegroundThreadScheduler().pause();
|
|
297
|
+
|
|
298
|
+ activity.setContentView(uut.getView());
|
|
299
|
+ disablePushAnimation(child1, child2);
|
|
300
|
+
|
|
301
|
+ uut.setRoot(Arrays.asList(child1, child2), new CommandListenerAdapter());
|
|
302
|
+ assertThat(child1.options.topBar.buttons.back.visible.get(false)).isFalse();
|
|
303
|
+ assertThat(child2.options.topBar.buttons.back.visible.get(false)).isTrue();
|
|
304
|
+ }
|
|
305
|
+
|
294
|
306
|
@Test
|
295
|
307
|
public void setRoot_doesNotCrashWhenCalledInQuickSuccession() {
|
296
|
308
|
disablePushAnimation(child1);
|