| Index: client/tests/client/samples/swarm/swarm_tests.dart
|
| diff --git a/client/tests/client/samples/swarm/swarm_tests.dart b/client/tests/client/samples/swarm/swarm_tests.dart
|
| index 6c4fe8a7ce5173eda6acae78646db0658cc23b95..1eb16379f2fefdbd7d6e03602decd1cdab877ff9 100644
|
| --- a/client/tests/client/samples/swarm/swarm_tests.dart
|
| +++ b/client/tests/client/samples/swarm/swarm_tests.dart
|
| @@ -20,7 +20,6 @@ void main() {
|
| UIStateProxy state = new UIStateProxy(swarm.sections);
|
| swarm.state = state;
|
| swarm.run();
|
| -
|
| // TODO(jmesserly): should be adding the full stylesheet here
|
| Dom.addStyle('''
|
| .story-content {
|
| @@ -45,26 +44,30 @@ void main() {
|
| };
|
| }
|
|
|
| - test('BackButton', () {
|
| - Expect.equals(null, swarm.frontView.storyView); // verify initial state
|
| -
|
| - // Make sure we've transitioned to the section
|
| - // In the real app, this isn't needed because ConveyorView fires the
|
| - // transition end event before we can click a story.
|
| - SectionView section = getView(swarm.sections[0]);
|
| - section.showSources();
|
| + asyncTest('BackButton', 1, () {
|
| + serialInvokeAsync([() {
|
| + Expect.equals(null, swarm.frontView.storyView); // verify initial state
|
|
|
| - final item = swarm.sections[0].feeds[2].articles[1];
|
| - state.loadFromHistory(getHistory(item));
|
| + // Make sure we've transitioned to the section
|
| + // In the real app, this isn't needed because ConveyorView fires the
|
| + // transition end event before we can click a story.
|
| + SectionView section = getView(swarm.sections[0]);
|
| + section.showSources();
|
| + },
|
| + () {
|
| + final item = swarm.sections[0].feeds[2].articles[1];
|
| + state.loadFromHistory(getHistory(item));
|
|
|
| - Expect.equals(item, state.currentArticle.value);
|
| + Expect.equals(item, state.currentArticle.value);
|
|
|
| - Expect.isFalse(getStoryNode().classes.contains(CSS.HIDDEN_STORY));
|
| + Expect.isFalse(getStoryNode().classes.contains(CSS.HIDDEN_STORY));
|
|
|
| - state.loadFromHistory({});
|
| + state.loadFromHistory({});
|
|
|
| - Expect.equals(null, state.currentArticle.value);
|
| - Expect.isTrue(getStoryNode().classes.contains(CSS.HIDDEN_STORY));
|
| + Expect.equals(null, state.currentArticle.value);
|
| + Expect.isTrue(getStoryNode().classes.contains(CSS.HIDDEN_STORY));
|
| + callbackDone();
|
| + }]);
|
| });
|
|
|
| test('StoryView', () {
|
|
|