fix: issue-942, issue-967, fixed images positioning for blog posts

This commit is contained in:
misha
2026-08-28 10:05:40 +03:00
parent 8f933118a3
commit 10af279d87
22 changed files with 484 additions and 84 deletions

View File

@@ -24,6 +24,7 @@ void main() {
String? slug,
int? id,
bool? disableActions,
bool isAuthorAdmin = false,
}) {
return MaterialApp(
theme: ThemeHelper().themeData(),
@@ -42,6 +43,7 @@ void main() {
slug: slug,
id: id,
disableActions: disableActions,
isAuthorAdmin: isAuthorAdmin,
),
),
);
@@ -71,7 +73,23 @@ void main() {
);
await tester.pumpAndSettle();
expect(find.byType(MoreOptions), findsOneWidget);
expect(find.text('Пожаловаться'), findsOneWidget);
});
testWidgets('hides complain option when author is admin', (tester) async {
await tester.pumpWidget(
createTestWidget(
complainedContentType: ComplainedContent.diet,
id: 1,
slug: 'test-slug',
isAuthorAdmin: true,
),
);
await tester.pumpAndSettle();
expect(find.text('Пожаловаться'), findsNothing);
expect(find.text('Скопировать ссылку'), findsOneWidget);
expect(find.text('Поделиться'), findsOneWidget);
});
testWidgets('disables actions when disableActions is true', (tester) async {