todo-app/test/text_free_localizations_test.dart
Krzysztof kuhy Rudnicki 203e61d6ac
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
file-length / file length <= 250 lines (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
release-apk / release (APK) (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Text-free sync settings via ssui 0.7.0
Bump sync_settings_ui 0.7.0 and github_device_auth 0.4.0 (glyph +
spoken label). Guard covers the Sync settings screen; degraded sync
gets its own warning glyph; tooltip delegate and copy button tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 01:32:02 +01:00

31 lines
1019 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:todo/ui/text_free_localizations.dart';
void main() {
test('every button tooltip is blank', () {
const l = TextFreeMaterialLocalizations();
expect([
l.backButtonTooltip,
l.closeButtonTooltip,
l.openAppDrawerTooltip,
l.showMenuTooltip,
l.moreButtonTooltip,
l.deleteButtonTooltip,
], everyElement(isEmpty));
// Everything else is still the default English.
expect(l.okButtonLabel, const DefaultMaterialLocalizations().okButtonLabel);
});
test('the delegate loads them for English only, once', () async {
final delegate = kTextFreeLocalizations.single;
expect(delegate.isSupported(const Locale('en')), isTrue);
expect(delegate.isSupported(const Locale('pl')), isFalse);
expect(
await delegate.load(const Locale('en')),
isA<TextFreeMaterialLocalizations>(),
);
expect(delegate.shouldReload(delegate), isFalse);
});
}