Move editor UI into the app and release verified Core dependencies (#14)
Gitea CI / Assemble and validate CI artifacts (push) Successful in 1m47s
Gitea CI / Check code and tests (push) Successful in 7m15s
Gitea CI / Build Android APK (push) Successful in 4m6s
Gitea CI / Build Windows x64 app (push) Successful in 3m34s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m29s
Gitea CI / Gitea CI passed (push) Successful in 1s
Gitea Release / Prepare draft Release (push) Failing after 8s
Gitea Release / Upload Android to draft Release (push) Skipped
Gitea Release / Upload Windows to draft Release (push) Skipped
Gitea Release / Verify and publish Release (push) Skipped

This commit was merged in pull request #14.
This commit is contained in:
lingjhf committed 2026-10-11 19:59:40 +00:00
1 parent abc1868550
commit 06f1c26681
452 files changed
+43806 -2329

No files matched your search

+49
View File
@@ -90,6 +90,55 @@ void _testSettings<T>({
required T Function(ProviderContainer) value,
required Future<void> Function(ProviderContainer, T) save,
}) {
test('$name skips an unchanged loaded value', () async {
final store = _Store(initial);
final scope = container(store);
addTearDown(scope.dispose);
await load(scope);
await save(scope, initial);
expect(store.writes, isEmpty);
});
test('$name skips duplicate values queued during a write', () async {
final store = _Store(initial)..writeGate = Completer<void>();
final scope = container(store);
addTearDown(scope.dispose);
await load(scope);
final firstSave = save(scope, first);
await store.started.future;
final duplicates = List.generate(5, (_) => save(scope, first));
store.writeGate!.complete();
await Future.wait([firstSave, ...duplicates]);
expect(store.writes, [first]);
expect(value(scope), first);
});
test('$name preserves changes back to a previously saved value', () async {
final store = _Store(initial);
final scope = container(store);
addTearDown(scope.dispose);
await load(scope);
await Future.wait([
save(scope, first),
save(scope, second),
save(scope, first),
]);
expect(store.writes, [first, second, first]);
expect(store.value, first);
});
test('$name retries the same value after a failed write', () async {
final store = _Store(initial)..failWrites = true;
final scope = container(store);
addTearDown(scope.dispose);
await load(scope);
await expectLater(save(scope, first), throwsStateError);
store.failWrites = false;
await save(scope, first);
expect(store.writes, [first, first]);
expect(store.value, first);
});
test('$name saves in order and publishes only committed values', () async {
final store = _Store(initial)..writeGate = Completer<void>();
final scope = container(store);