From e1862aa0cb2d39f4c78e7503b93515b3a72c4109 Mon Sep 17 00:00:00 2001 From: xqq879988 Date: Tue, 25 Jun 2024 16:40:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9ERichEditorPattern=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B-=E7=94=A8=E4=BE=8B=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=A4=B1=E8=B4=A5=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xqq879988 --- .../rich_editor_pattern_test_ng.cpp | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/test/unittest/core/pattern/rich_editor/rich_editor_pattern_test_ng.cpp b/test/unittest/core/pattern/rich_editor/rich_editor_pattern_test_ng.cpp index de6f01a1dda..051796d8134 100644 --- a/test/unittest/core/pattern/rich_editor/rich_editor_pattern_test_ng.cpp +++ b/test/unittest/core/pattern/rich_editor/rich_editor_pattern_test_ng.cpp @@ -1096,44 +1096,6 @@ HWTEST_F(RichEditorPatternTestNg, UpdateScrollBarOffset001, TestSize.Level1) EXPECT_FALSE(tmpHost->isPropertyDiffMarked_); } -/** - * @tc.name: OnSelectionMenuOptionsUpdate001 - * @tc.desc: test OnSelectionMenuOptionsUpdate - * @tc.type: FUNC - */ -HWTEST_F(RichEditorPatternTestNg, OnSelectionMenuOptionsUpdate001, TestSize.Level1) -{ - /** - * @tc.steps: step1. init and call function. - */ - ASSERT_NE(richEditorNode_, nullptr); - auto richEditorPattern = richEditorNode_->GetPattern(); - ASSERT_NE(richEditorPattern, nullptr); - richEditorPattern->CreateNodePaintMethod(); - EXPECT_NE(richEditorPattern->contentMod_, nullptr); - EXPECT_NE(richEditorPattern->overlayMod_, nullptr); - /** - * @tc.steps: step2. change parameter and call function. - */ - std::vector menuOptionsItems; - MenuOptionsParam menuOptionItem1; - menuOptionItem1.content = "test1"; - menuOptionItem1.actionRange = [](int32_t, int32_t) {}; - menuOptionsItems.emplace_back(menuOptionItem1); - MenuOptionsParam menuOptionItem2; - menuOptionItem2.content = "test2"; - menuOptionItem2.actionRange = [](int32_t, int32_t) {}; - menuOptionsItems.emplace_back(menuOptionItem2); - richEditorPattern->OnSelectionMenuOptionsUpdate(std::move(menuOptionsItems)); - for (auto& menuOption : richEditorPattern->menuOptionItems_) { - std::function actionRange = menuOption.actionRange; - auto weak = AceType::WeakClaim(&(*richEditorPattern)); - std::string selectInfo = "test123"; - menuOption.action(selectInfo); - } - EXPECT_NE(richEditorPattern->menuOptionItems_.size(), 0); -} - /** * @tc.name: GetChangeSpanStyle002 * @tc.desc: test GetChangeSpanStyle