Skip to content

Commit

Permalink
Delete pin item widget
Browse files Browse the repository at this point in the history
  • Loading branch information
kumarpalsinh25 committed Aug 15, 2024
1 parent 9cd7e14 commit 10ab06d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 170 deletions.
24 changes: 0 additions & 24 deletions app/integration_test/tests/pins.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:acter/common/widgets/spaces/select_space_form_field.dart';
import 'package:acter/features/home/data/keys.dart';
import 'package:acter/features/pins/pages/create_pin_page.dart';
import 'package:acter/features/pins/pages/pin_details_page.dart';
import 'package:acter/features/pins/widgets/pin_item.dart';
import 'package:acter/features/search/model/keys.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:convenient_test_dev/convenient_test_dev.dart';
Expand Down Expand Up @@ -86,29 +85,6 @@ extension ActerNews on ConvenientTest {
await titleField.should(findsOneWidget);
await titleField.replaceText(title);

final linkField = find.byKey(PinItem.linkFieldKey);
await linkField.should(findsOneWidget);
await linkField.replaceText(url);

final descriptionField = find.byKey(PinItem.descriptionFieldKey);
await descriptionField.should(findsOneWidget);
final textEditorState =
(tester.firstState(descriptionField) as HtmlEditorState).editorState;
final lastSelectable = textEditorState.getLastSelectable()!;
final transaction = textEditorState.transaction;
transaction.insertText(
lastSelectable.$1,
35,
content,
);
await textEditorState.apply(transaction);
textEditorState.service.keyboardService!.closeKeyboard();

final saveBtnKey = find.byKey(PinItem.saveBtnKey);
await saveBtnKey.should(findsOneWidget);
await tester.ensureVisible(saveBtnKey);
await saveBtnKey.tap();

final pinPage = find.byKey(PinDetailsPage.pinPageKey);
await pinPage.should(findsOneWidget);
final page = pinPage.evaluate().first.widget as PinDetailsPage;
Expand Down
1 change: 1 addition & 0 deletions app/lib/features/pins/pages/pin_details_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class PinDetailsPage extends ConsumerStatefulWidget {
static const actionMenuKey = Key('pin-action-menu');
static const editBtnKey = Key('pin-edit-btn');
static const titleFieldKey = Key('edit-pin-title-field');
static const descriptionFieldKey = Key('edit-pin-description-field');

final String pinId;

Expand Down
146 changes: 0 additions & 146 deletions app/lib/features/pins/widgets/pin_item.dart

This file was deleted.

0 comments on commit 10ab06d

Please sign in to comment.