Expand Lumen stories and add island postcards
This commit is contained in:
@@ -12,7 +12,7 @@ import 'package:lumen/services/progress.dart';
|
||||
|
||||
void main() {
|
||||
final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||
testWidgets('extended readings decode and mix with bridge atmosphere', (
|
||||
testWidgets('Qwen readings decode and mix with bridge atmosphere', (
|
||||
tester,
|
||||
) async {
|
||||
expect(const bool.fromEnvironment('QA_TEST'), true);
|
||||
@@ -20,10 +20,8 @@ void main() {
|
||||
final session = await AudioSession.instance;
|
||||
await session.configure(const AudioSessionConfiguration.speech());
|
||||
final probe = AudioPlayer();
|
||||
// Exercise the newly added audio, beyond the old recording's endpoint.
|
||||
for (final track in book.tracks.values.where(
|
||||
(t) => t['continuation'] != null,
|
||||
)) {
|
||||
// Exercise the end of every fully regenerated recording.
|
||||
for (final track in book.tracks.values) {
|
||||
await probe.setAsset('assets/audio/${track['file']}');
|
||||
expect(probe.duration!.inMilliseconds, closeTo(track['durationMs'], 5));
|
||||
final start = Duration(milliseconds: track['cues'].last['startMs']);
|
||||
@@ -62,18 +60,17 @@ void main() {
|
||||
await tester.tap(find.text('Stop'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// A single Play control carries Mara's unchanged diary into the narrator's
|
||||
// new continuation and updates the speaker label at the voice boundary.
|
||||
// One Play control carries Mara's letter into the present-day narrator.
|
||||
g.showStory(1);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.ensureVisible(find.text('Play this reading'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Play this reading'));
|
||||
final originalMs =
|
||||
(book.tracks['cottage.window']['originalFrames'] as int) *
|
||||
1000 ~/
|
||||
24000;
|
||||
await Future<void>.delayed(Duration(milliseconds: originalMs + 1800));
|
||||
final narratorCue = (book.tracks['cottage.window']['cues'] as List)
|
||||
.firstWhere((cue) => cue['speaker'] == 'Narrator');
|
||||
await Future<void>.delayed(
|
||||
Duration(milliseconds: (narratorCue['startMs'] as int) + 1800),
|
||||
);
|
||||
await tester.pump();
|
||||
expect(find.text('Narrator · recorded story'), findsOneWidget);
|
||||
await tester.tap(find.text('Pause recording'));
|
||||
|
||||
Reference in New Issue
Block a user