iamleeg / browseoverflow Goto Github PK
View Code? Open in Web Editor NEWFully unit-tested viewer for iOS questions on StackOverflow.
Fully unit-tested viewer for iOS questions on StackOverflow.
Hi,
Great book by the way. When I get the repository and run it on XCODE 6.1 testSelectingTopicPushesNewViewController
fails out of the box. Unless Apple has changed the way NavigationController works, the following code doesn't satisfy the test case any more.
- (void)userDidSelectTopicNotification: (NSNotification *)note {
Topic * selectedTopic = (Topic *)[note object];
BrowseOverflowViewController *nextViewController = [[BrowseOverflowViewController alloc] init];
QuestionListTableDataSource *questionsDataSource = [[QuestionListTableDataSource alloc] init];
questionsDataSource.topic = selectedTopic;
nextViewController.dataSource = questionsDataSource;
nextViewController.objectConfiguration = self.objectConfiguration;
[[self navigationController] pushViewController: nextViewController animated: YES];
}
Summary: As mentioned in the book, there's a bug in the way questions are added to a topic. The same question can appear in a topic's list of questions multiple times, pushing older questions off the list.
Steps to reproduce:
Expected results:
6a. Any new questions in this topic are fetched and added to the list, and remaining spaces are occupied by existing questions.
Actual results:
6b. The newest 25 questions in this topic are fetched and added to the list, even if some of them are already present. For those that were present, there are now two copies of the question in the list.
Regression:
Not applicable, as this is the first release.
Notes:
Readers might like to fork the project and fix this issue using a test-driven approach.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.