Skip to content
代码片段 群组 项目
提交 ef8885fe 编辑于 作者: Raymond Liao's avatar Raymond Liao :nerd:
浏览文件

feat: #500 Should display edit button when user tapped operate button

上级 5787bc73
分支
未找到相关标签
无相关合并请求
......@@ -275,5 +275,6 @@
"commits": "Commits",
"noCommits": "There are no commits yet.",
"authored": "authored",
"communityMaintenanceNotice": "The community is under maintenance, only browse."
"communityMaintenanceNotice": "The community is under maintenance, only browse.",
"edit": "Edit"
}
......@@ -275,5 +275,6 @@
"commits": "提交",
"noCommits": "目前还没有提交。",
"authored": "创作于",
"communityMaintenanceNotice": "社区维护中,仅限浏览。"
"communityMaintenanceNotice": "社区维护中,仅限浏览。",
"edit": "编辑"
}
......@@ -263,9 +263,7 @@ class _CommunityPostDetailsPageState extends State<CommunityPostDetailsPage> {
renderBottomSheet(Container(
width: MediaQuery.of(context).size.width,
padding: const EdgeInsets.symmetric(vertical: 12),
child: Center(
child: Text(JiHuLocalizations.dictionary().edit_issue),
),
child: Center(child: Text(JiHuLocalizations.dictionary().edit)),
));
})
]),
......
......@@ -412,6 +412,10 @@ void main() {
expect(find.text(JiHuLocalizations.dictionary().commentPlaceholder), findsOneWidget);
expect(SvgFinder("assets/images/comment.svg"), findsOneWidget);
expect(SvgFinder("assets/images/operate.svg"), findsOneWidget);
await tester.tap(SvgFinder("assets/images/operate.svg"));
await tester.pumpAndSettle();
expect(find.text('Edit'), findsOneWidget);
});
testWidgets('Should not display edit button when user has no edit permission', (WidgetTester tester) async {
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
想要评论请 注册