Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,14 @@ After making changes:

**Before every commit**: Run both analyze and test!

### Running tests efficiently

Run tests **once**, capture the output, then grep the captured file — do NOT re-run tests repeatedly just to grep results:

```bash
./bin/mise run test > /tmp/test_output.txt 2>&1; echo "Exit: $?"; grep -E "\[E\]|ERROR" /tmp/test_output.txt | head -10
```

## Do Not Change Without Request

- GitHub Actions workflows (`.github/workflows/`)
Expand Down
59 changes: 30 additions & 29 deletions assets/style_descriptions.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
{
"ipa": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"pale ale": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
"bitter": "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
"best bitter": "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"golden ale": "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.",
"blonde ale": "Totam rem aperiam eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.",
"porter": "Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores.",
"stout": "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet consectetur adipisci velit.",
"mild": "Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.",
"old ale": "Ut enim ad minima veniam quis nostrum exercitationem ullam corporis suscipit laboriosam nisi ut aliquid ex ea commodi.",
"saison": "At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti.",
"tripel": "Et harum quidem rerum facilis est et expedita distinctio nam libero tempore cum soluta nobis est eligendi optio.",
"dubbel": "Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae.",
"witbier": "Itaque earum rerum hic tenetur a sapiente delectus ut aut reiciendis voluptatibus maiores alias consequatur.",
"belgian ale": "Nam libero tempore cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat.",
"lager": "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium totam rem aperiam.",
"pilsner": "Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur.",
"dunkel": "Vel illum qui dolorem eum fugiat quo voluptas nulla pariatur at vero eos et accusamus et iusto odio dignissimos.",
"weissbier": "On the other hand we denounce with righteous indignation and dislike men who are so beguiled and demoralized.",
"hefeweizen": "These cases are perfectly simple and easy to distinguish in a free hour when our power of choice is untrammelled.",
"bock": "But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur.",
"barley wine": "Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"scotch ale": "Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat duis aute irure dolor.",
"brown ale": "In reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur excepteur sint occaecat cupidatat.",
"amber ale": "Sunt in culpa qui officia deserunt mollit anim id est laborum sed ut perspiciatis unde omnis iste natus error.",
"red ale": "Accusantium doloremque laudantium totam rem aperiam eaque ipsa quae ab illo inventore veritatis et quasi architecto.",
"wheat beer": "Beatae vitae dicta sunt explicabo nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit.",
"sour": "Sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt neque porro quisquam est.",
"fruit beer": "Qui dolorem ipsum quia dolor sit amet consectetur adipisci velit sed quia non numquam eius modi tempora incidunt."
"ipa": "A stronger, heavily hopped version of Pale Ale developed for export. Real ale versions deliver a punchy hop aroma and a lingering, dry bitterness, with floral, citrus, or resinous notes depending on the hops used.",
"pale ale": "Often considered the bottled or slightly more premium cousin of Bitter. Generally clearer and crisper, it showcases earthy or floral British hops with a clean, refreshing finish.",
"bitter": "The quintessential British pub staple. Typically amber to copper in colour, it balances a malty base with a distinct hop bitterness. Varieties range from Ordinary (lower ABV) to Best and Strong.",
"best bitter": "A step up from Ordinary Bitter in strength, typically 3.8–4.6% ABV. Fuller-bodied with a more pronounced hop character, yet retaining the balanced malt-hop harmony that defines British session ales.",
"golden ale": "A modern style developed to compete with lager. Pale and refreshing, these ales are often served cool and feature citrusy or floral hop notes with a clean, biscuity malt profile.",
"blonde ale": "A pale, light-bodied ale with a crisp, clean finish. Similar to Golden Ale but often even paler in colour, with delicate hop aromas and a subtle sweetness. Approachable and easy-drinking.",
"porter": "A dark, complex style that originated in 18th-century London. Rich in flavour with notes of chocolate, coffee, and roasted malt — typically lighter in body than a modern Stout, though historically Stout was simply a stronger Porter.",
"stout": "The darker, heavier relative of the Porter. Expect a deep black colour, a creamy head, and intense roasted flavours — sometimes with a dry, burnt finish (Dry Stout) or a silky sweetness (Oatmeal or Milk Stout).",
"mild": "A traditional British style focused on malt rather than hops. Usually dark, low in bitterness, and featuring flavours of caramel, roasted grain, and occasionally dark fruit — though pale Mild versions also exist.",
"old ale": "A strong, malt-forward beer often aged for extended periods. Typically dark and rich with vinous (wine-like) qualities and complex notes of dried fruit, toffee, and warming alcohol.",
"saison": "A Belgian farmhouse ale, traditionally brewed in winter for summer farm workers at very low ABV. Modern commercial versions are much stronger (typically 6–8%), but retain the characteristic dryness, fruity and spicy yeast notes, and refreshing effervescence.",
"tripel": "A strong Belgian golden ale (typically 8–10% ABV) with a deceptively smooth drinkability. Brewed with pale malt and candy sugar, it develops complex fruity and spicy notes from Belgian yeast.",
"dubbel": "A Belgian abbey-style ale with a rich amber to dark brown colour. Moderately strong (6–8% ABV) with malty sweetness and notes of dark fruit, chocolate, and caramel.",
"witbier": "A Belgian wheat beer brewed with unmalted wheat and traditionally spiced with coriander and dried orange peel. Hazy, pale, light-bodied, and refreshingly tart with citrus and spice.",
"belgian ale": "A broad family of top-fermented ales from Belgium, characterised by the complex fruity and spicy flavours produced by distinctive Belgian yeast strains. Ranges from golden and light to amber and strong.",
"lager": "Bottom-fermented and cold-conditioned for an extended period, Real Lager retains live yeast and greater depth than mass-produced equivalents. Light, effervescent, and crisp with a clean, rounded finish.",
"pilsner": "A pale lager originating in Bohemia (now the Czech Republic). Known for its brilliant clarity, assertive hop bitterness from Saaz hops, and clean, refreshing finish. Czech versions tend to be fuller and more bitter than German interpretations.",
"dunkel": "A traditional dark Bavarian lager with a deep brown colour and smooth, malt-forward character. Features notes of freshly baked bread, chocolate, and caramel with minimal hop presence.",
"weissbier": "The Bavarian name for unfiltered German wheat beer — known as Hefeweizen outside Bavaria. Characterised by banana and clove aromas from a specialised yeast strain, a hazy appearance, and refreshing carbonation. The filtered version is called Kristallweizen.",
"hefeweizen": "The name used outside Bavaria for unfiltered German wheat beer — the same style as Bavarian Weissbier. Hazy with a creamy head and the classic banana and clove flavours derived from a specialised wheat beer yeast. 'Hefe' simply means yeast.",
"bock": "A strong German lager (from around 6.3% ABV) with a rich, malty character. Traditional Bock is dark amber to brown with hints of toast, chocolate, and warming sweetness. The pale Maibock (or Helles Bock) variant is golden and slightly more hop-forward, brewed for spring.",
"barley wine": "An exceptionally strong English ale (8–12% ABV) with a rich, warming character. Deep amber to brown in colour, with complex notes of dried fruit, toffee, caramel, and a residual sweetness balanced by a firm bitterness.",
"scotch ale": "A malt-forward, full-bodied Scottish ale with a rich sweetness and low hop character. Ranges from amber to dark brown with a smooth, warming finish. Any hint of smokiness comes from roasted malts rather than peat — a common misconception borrowed from Scotch whisky.",
"brown ale": "A British ale with a malt-forward profile. Southern English versions are darker, sweeter, and lower in alcohol. Northern English versions such as Newcastle Brown Ale are actually paler, stronger, drier, and nuttier — a common source of confusion.",
"amber ale": "A versatile style bridging pale and dark ales, with a warm amber to red-brown colour. Balanced malt and hop character, often featuring caramel, biscuit, and light toasty notes.",
"red ale": "Often used interchangeably with Amber Ale, particularly in Irish and American brewing. The distinctive reddish-brown colour comes from caramel malts, with a smooth, balanced flavour profile and gentle bitterness.",
"wheat beer": "A broad category of beers brewed with a substantial proportion of wheat alongside barley malt. Typically lighter in body with a hazy appearance and a soft, bread-like character — the base for Weissbier, Witbier, and Hefeweizen.",
"sour": "A broad category of intentionally acidic beers produced through wild fermentation or the addition of souring bacteria such as Lactobacillus or Pediococcus. Flavours range from refreshingly tart and fruity to complex and funky.",
"fruit beer": "Traditional ales infused with natural fruits during primary or secondary fermentation. The result ranges from subtle tartness to bold, sweet fruit expressions — common examples include raspberry, cherry, and blackberry.",
"speciality": "The catch-all category for beers that break the mould. This includes ales brewed with non-traditional ingredients such as honey, spices, herbs, smoked malts, or unusual fermentables — united by creativity rather than convention."
}
Binary file modified test/goldens/style_screen_with_description_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/goldens/style_screen_with_description_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions test/style_description_helper_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ void main() {

testWidgets('loads and returns description from JSON file', (tester) async {
await tester.pumpWidget(const MaterialApp(home: SizedBox()));

// Test that IPA description is actually loaded from the JSON file
final result = await StyleDescriptionHelper.getStyleDescription('IPA');
expect(result, isNotNull);
expect(result, contains('Lorem ipsum')); // Verify it's the lorem ipsum placeholder
expect(result, contains('Pale Ale'));
});

testWidgets('handles case-insensitive lookup', (tester) async {
Expand All @@ -40,10 +40,10 @@ void main() {

testWidgets('trims whitespace from style name', (tester) async {
await tester.pumpWidget(const MaterialApp(home: SizedBox()));

final result = await StyleDescriptionHelper.getStyleDescription(' IPA ');
expect(result, isNotNull);
expect(result, contains('Lorem ipsum'));
expect(result, isNotEmpty);
});

testWidgets('filters out empty string descriptions', (tester) async {
Expand Down
12 changes: 9 additions & 3 deletions test/style_screen_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ void main() {
.thenAnswer((_) async => [drink1, drink2]);
await provider.loadDrinks();

await tester.binding.setSurfaceSize(const Size(400, 1200));
addTearDown(() => tester.binding.setSurfaceSize(null));
await tester.pumpWidget(createTestWidget('IPA'));
await tester.pumpAndSettle();

Expand Down Expand Up @@ -214,6 +216,8 @@ void main() {
.thenAnswer((_) async => [drink1, drink2, drink3]);
await provider.loadDrinks();

await tester.binding.setSurfaceSize(const Size(400, 1200));
addTearDown(() => tester.binding.setSurfaceSize(null));
await tester.pumpWidget(createTestWidget('IPA'));
await tester.pumpAndSettle();

Expand All @@ -230,6 +234,8 @@ void main() {
.thenAnswer((_) async => [drink1, drink2]);
await provider.loadDrinks();

await tester.binding.setSurfaceSize(const Size(400, 1200));
addTearDown(() => tester.binding.setSurfaceSize(null));
await tester.pumpWidget(createTestWidget('IPA'));
await tester.pumpAndSettle();

Expand All @@ -252,9 +258,9 @@ void main() {
// Wait for FutureBuilder to complete
await tester.pumpAndSettle();

// Should display the lorem ipsum description for IPA
// Should display the IPA description
expect(
find.textContaining('Lorem ipsum dolor sit amet'),
find.textContaining('heavily hopped'),
findsOneWidget,
);

Expand Down Expand Up @@ -321,7 +327,7 @@ void main() {

// Verify description is visible when expanded
expect(
find.textContaining('Lorem ipsum'),
find.textContaining('heavily hopped'),
findsOneWidget,
);

Expand Down
Loading