]*>)(.*?)(
'${m.group(1)}
${m.group(3)}',
+ );
+ final left = HomepageBloc.parsePinnedThreadGroups(parseHtmlDocument(html));
+ expect(left.map((e) => e.title), isNot(contains('动漫新闻')));
+ expect(left, hasLength(6));
+ expect(left.last.isRank, isTrue, reason: 'the rank is still known after the empty tab is left out');
+ expect(left.where((e) => e.isRank), hasLength(1));
+ });
+
+ test('a page without the block has no tabs', () {
+ expect(HomepageBloc.parsePinnedThreadGroups(parseHtmlDocument('')), isEmpty);
+ });
+ });
+}