Revert "add waterFlow scrollToIndex test"

This reverts commit 10e7aed5b5.

Change-Id: Ie4b3d02ef2270d3132c3a4442a8417a89293503b
Signed-off-by: Tianer Zhou <zhoutianer@huawei.com>
This commit is contained in:
Tianer Zhou 2024-07-10 16:09:38 +08:00
parent b0f57a3c2d
commit 0aa725820b

View File

@ -14,7 +14,6 @@
*/
#include "water_flow_test_ng.h"
#include "core/components_ng/pattern/scrollable/scrollable_properties.h"
namespace OHOS::Ace::NG {
@ -542,27 +541,6 @@ HWTEST_F(WaterFlowScrollerTestNg, ScrollToIndex003, TestSize.Level1)
EXPECT_FLOAT_EQ(pattern_->finalPosition_, 2100.f);
}
/**
* @tc.name: ScrollToIndex004
* @tc.desc: Test ScrollToIndex while updating offset. Offset should be overriden
* @tc.type: FUNC
*/
HWTEST_F(WaterFlowScrollerTestNg, ScrollToIndex004, TestSize.Level1)
{
Create([](WaterFlowModelNG model) {
model.SetColumnsTemplate("1fr 1fr");
CreateRandomItem(100);
});
pattern_->ScrollToIndex(80, false, ScrollAlign::AUTO);
UpdateCurrentOffset(-20.0f);
EXPECT_EQ(GetChildRect(frameNode_, 80).Bottom(), WATERFLOW_HEIGHT);
pattern_->UpdateCurrentOffset(-20.0f, SCROLL_FROM_UPDATE);
pattern_->ScrollToIndex(20, false, ScrollAlign::AUTO);
FlushLayoutTask(frameNode_);
EXPECT_EQ(GetChildRect(frameNode_, 20).GetY(), 0.0f);
}
/**
* @tc.name: Focus001
* @tc.desc: Test WaterFlow scroll during focus change