feat(market): one-time community-rules gate before joining the market, publishing or messaging
This commit is contained in:
parent
a7e10eba7a
commit
5d25f65f76
7 changed files with 311 additions and 1 deletions
22
apps/app_seeds/test/services/onboarding_store_test.dart
Normal file
22
apps/app_seeds/test/services/onboarding_store_test.dart
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:tane/services/onboarding_store.dart';
|
||||
|
||||
import '../support/test_support.dart';
|
||||
|
||||
void main() {
|
||||
test('market rules start unaccepted and stay accepted once marked', () async {
|
||||
final store = OnboardingStore(InMemorySecretStore());
|
||||
|
||||
expect(await store.marketRulesAccepted(), isFalse);
|
||||
await store.markMarketRulesAccepted();
|
||||
expect(await store.marketRulesAccepted(), isTrue);
|
||||
});
|
||||
|
||||
test('market-rules flag is independent of the intro flag', () async {
|
||||
final store = OnboardingStore(InMemorySecretStore());
|
||||
|
||||
await store.markIntroSeen();
|
||||
expect(await store.introSeen(), isTrue);
|
||||
expect(await store.marketRulesAccepted(), isFalse);
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue