diff --git a/lib/services/paywall_service.dart b/lib/services/paywall_service.dart index 93c0ba0..0eadb8e 100644 --- a/lib/services/paywall_service.dart +++ b/lib/services/paywall_service.dart @@ -9,7 +9,7 @@ import 'storage.dart'; /// Recognizes paid and sponsored articles so the feed can hide them. /// /// Most paid articles are marked in the title (heise+, Golem's "(g+)"). -/// Substack newsletters cut paid posts short in the feed and end them with a +/// Substack cuts paid posts short in the feed and ends them with a /// "Read more" link to the post itself, so those are recognized from the feed. /// SPIEGEL and t3n only mark them in the page's schema.org data /// (`"isAccessibleForFree": false`), so for those sources each new article is diff --git a/test/learn_tab_test.dart b/test/learn_tab_test.dart index 0a78b90..690cf4a 100644 --- a/test/learn_tab_test.dart +++ b/test/learn_tab_test.dart @@ -73,7 +73,7 @@ void main() { expect(find.byType(SettingsScreen), findsOneWidget); }); - testWidgets('leaving the Sources tab after a change refreshes the feeds', (tester) async { + testWidgets('leaving the Sources tab after a change refreshes all Sources', (tester) async { final feedService = FakeFeeds(feeds); final state = await launch(tester, feedService); await tester.pumpWidget(MaterialApp(home: HomeShell(state: state))); diff --git a/test/paid_newsletter_posts_test.dart b/test/paid_substack_posts_test.dart similarity index 93% rename from test/paid_newsletter_posts_test.dart rename to test/paid_substack_posts_test.dart index 66c5e55..b6f6923 100644 --- a/test/paid_newsletter_posts_test.dart +++ b/test/paid_substack_posts_test.dart @@ -47,7 +47,7 @@ void main() { substackNews.feedUrl: 'test/fixtures/ahead_of_ai_feed.xml', }); - test('paid newsletter posts are hidden in the Learn tab and Today and counted as hidden', + test('paid Substack posts are hidden in the Learn tab and Today and counted as hidden', () async { final state = await launchApp([interconnects, substackNews], feedService: savedFeeds()); @@ -61,7 +61,7 @@ void main() { expect(state.hiddenCountOf(SourceKind.news), 1); }); - test('with "hide paid articles" off, paid newsletter posts show as before', () async { + test('with "hide paid articles" off, paid Substack posts show as before', () async { final state = await launchApp([interconnects, substackNews], feedService: savedFeeds()); await state.updateSettings(state.settings.copyWith(hidePaid: false)); diff --git a/test/sources_tab_test.dart b/test/sources_tab_test.dart index 67dbf36..0c0c1da 100644 --- a/test/sources_tab_test.dart +++ b/test/sources_tab_test.dart @@ -80,7 +80,7 @@ void main() { expect(find.text(german), findsNothing); }); - Future addFeed(WidgetTester tester, String name, {String? kind}) async { + Future addSource(WidgetTester tester, String name, {String? kind}) async { await tester.tap(find.text('Add feed')); await tester.pumpAndSettle(); final dialog = find.byType(AlertDialog); @@ -97,29 +97,29 @@ void main() { await tester.pumpAndSettle(); } - testWidgets('a feed added without picking a kind is a News source', (tester) async { + testWidgets('a Source added without picking a kind is a News source', (tester) async { final state = await launch(tester, [verge, bytebytego]); await showSources(tester, state); - await addFeed(tester, 'myfeed'); + await addSource(tester, 'myfeed'); expectInOrder(tester, [find.text('News'), find.text('myfeed'), find.text('Learning')]); }); - testWidgets('a feed added as Learning shows up in the Learning section', (tester) async { + testWidgets('a Source added as Learning shows up in the Learning section', (tester) async { final state = await launch(tester, [verge, bytebytego]); await showSources(tester, state); - await addFeed(tester, 'myblog', kind: 'Learning'); + await addSource(tester, 'myblog', kind: 'Learning'); expectInOrder(tester, [find.text('Learning'), find.text('myblog')]); }); - testWidgets('a feed added as Fun gets a Fun section', (tester) async { + testWidgets('a Source added as Fun gets a Fun section', (tester) async { final state = await launch(tester, [verge]); await showSources(tester, state); - await addFeed(tester, 'mycomic', kind: 'Fun'); + await addSource(tester, 'mycomic', kind: 'Fun'); expectInOrder(tester, [find.text('News'), find.text('Fun'), find.text('mycomic')]); }); @@ -140,7 +140,7 @@ void main() { await tester.tap(tab('Sources')); await tester.pump(); - await addFeed(tester, 'myblog', kind: 'Learning'); + await addSource(tester, 'myblog', kind: 'Learning'); await tester.tap(tab('Learn')); await tester.pumpAndSettle(); @@ -170,7 +170,7 @@ void main() { await tester.tap(tab('Sources')); await tester.pump(); - await addFeed(tester, 'mycomic', kind: 'Fun'); + await addSource(tester, 'mycomic', kind: 'Fun'); await tester.tap(tab('Learn')); await tester.pumpAndSettle(); diff --git a/test/support/fake_app.dart b/test/support/fake_app.dart index 6fe0d65..daad923 100644 --- a/test/support/fake_app.dart +++ b/test/support/fake_app.dart @@ -14,7 +14,7 @@ class FakeFeeds extends FeedService { /// Feed URL -> (title, age) of each article in the feed. final Map> byFeedUrl; - /// How often the app refreshed its feeds. + /// How often the app refreshed all Sources. int refreshes = 0; @override