import 'package:flutter_test/flutter_test.dart'; import 'arb_test_helpers.dart'; /// Play "Deceptive Behavior" guard over the purchase sheet's copy. /// /// The free Android Auto root is NOT a paywall: `ConstructorArbolAuto.raiz` /// hands free users a real, browsable `idDestacadas` folder whose rows are /// playable (`hijosDestacadas`), precisely because Google Play cited the old /// "Premium feature" dead-end rows against the Android for Cars App Quality /// Guidelines (see the comment at `navegacion_auto.dart`). What PRO adds in /// the car is the rest of the tree: the full catalogue, favourites, my /// stations and local music. /// /// So a bullet reading just "Android Auto" claims the free tier has no /// Android Auto at all, which is false in every locale. void main() { test('premiumBeneficioAndroidAuto no es el nombre pelado del producto en ' 'ninguna de las 13 locales', () { final ofensores = []; for (final locale in supportedArbLocales) { final valor = readArb(locale)['premiumBeneficioAndroidAuto'] as String?; if (valor == null) continue; if (valor.trim() == 'Android Auto') ofensores.add(locale); } expect( ofensores, isEmpty, reason: 'Free users already get a playable Android Auto folder, so a ' 'bullet whose whole text is the product name sells them ' 'something they have. Describe what PRO actually adds in the ' 'car instead. Offending locales: $ofensores', ); }); test('premiumBeneficioAndroidAuto nombra lo que PRO anade de verdad en el ' 'coche (plantilla es)', () { final es = readArb('es')['premiumBeneficioAndroidAuto'] as String; final minusculas = es.toLowerCase(); expect(minusculas, contains('android auto')); expect( minusculas, contains('catálogo'), reason: 'the full catalogue (idTodas) is the headline PRO folder', ); expect(minusculas, contains('favoritos')); expect(minusculas, contains('mis emisoras')); expect(minusculas, contains('música local')); }); }