-
Notifications
You must be signed in to change notification settings - Fork 35
Pin unpin chat #2597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Pin unpin chat #2597
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
aafe415
add method to watchMessageInfo
thuyenh1081 fec86a4
add script watchMessageInfo
thuyenh1081 dec7d62
remove await due to getCheckBox is not future method
thuyenh1081 fa84cdf
define pin and uppin icon
thuyenh1081 e8dea45
move Future when declare getCheckBox()
thuyenh1081 a59f7d3
add script for Pin/unpin a chat
thuyenh1081 847392c
add method to pin, unpin and verify a chat is pined or unpined
thuyenh1081 70c08b7
add class to manage element and action on ChatSearchView
thuyenh1081 245a76a
add class to manage actions on a detail of a chat
thuyenh1081 68b3075
add script Search for messages inside a chat
thuyenh1081 e2ea197
Merge branch 'main' into PinUnpinChat
thuyenh1081 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import 'package:fluffychat/pages/chat_search/chat_search_view.dart'; | ||
| import 'package:fluffychat/widgets/twake_components/twake_icon_button.dart'; | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:flutter_test/flutter_test.dart'; | ||
| import 'package:linagora_design_flutter/list_item/twake_list_item.dart'; | ||
| import 'package:patrol/patrol.dart'; | ||
| import '../base/core_robot.dart'; | ||
| import 'twake_list_item_robot.dart'; | ||
|
|
||
| class ChatSearchViewRobot extends CoreRobot { | ||
| ChatSearchViewRobot(super.$); | ||
|
|
||
| PatrolFinder getBackIcon() { | ||
| return $(ChatSearchView).$(TwakeIconButton).containing(find.byTooltip('Back')); | ||
| } | ||
|
|
||
| PatrolFinder getTextField() { | ||
| return $(ChatSearchView).$(AppBar).$(TextField); | ||
| } | ||
|
|
||
| PatrolFinder getSearchIcon() { | ||
| return getTextField().$(Icon).at(0); | ||
| } | ||
|
|
||
| PatrolFinder getCloseIcon() { | ||
| return getTextField().$(IconButton); | ||
| } | ||
|
|
||
| Future<List<TwakeListItemRobot>> getListOfChatSeach() async { | ||
| final List<TwakeListItemRobot> groupList = []; | ||
|
|
||
| // Evaluate once to find how many TwakeListItem widgets exist | ||
| final matches = $(TwakeListItem).evaluate(); | ||
| for (final element in matches) { | ||
| final finder = $(element.widget.runtimeType); | ||
| groupList.add(TwakeListItemRobot($, finder)); | ||
| } | ||
| return groupList; | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import 'package:flutter_test/flutter_test.dart'; | ||
| import 'package:linagora_design_flutter/list_item/twake_list_item.dart'; | ||
| import '../base/base_scenario.dart'; | ||
| import '../robots/chat_group_detail_robot.dart'; | ||
| import 'package:flutter/material.dart'; | ||
|
|
||
| class ChatDetailScenario extends BaseScenario { | ||
| ChatDetailScenario(super.$); | ||
|
|
||
| Future<void> makeASearch(String searchText) async { | ||
| await ChatGroupDetailRobot($).getSearchIcon().tap(); | ||
| await $.waitUntilVisible($(AppBar).$(TextField)); | ||
| await $(AppBar).$(TextField).enterText(searchText); | ||
| // await SearchRobot($).enterSearchText(searchText); | ||
| await ChatGroupDetailRobot($).waitForEitherVisible($: $, first: $(TwakeListItem), second: $("No Results"), timeout: const Duration(seconds: 10)); | ||
| await Future.delayed(const Duration(seconds: 2)); | ||
| } | ||
|
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't want to add the click on a search result and see if it display / scroll to the right message? (We know that today, it doesn't work, maybe that's why you didn't add it here?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for your suggestion @Crash-- .In the next PRs, I’ll try simulating the user’s scroll actions to figure out the item they want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please create another test case for searching a message in the past, then open it, then verify the highlight of the message, and the content. please do it in other PR @thuyenh1081