fix: remove duplicate AI test page header
This commit is contained in:
@@ -101,7 +101,6 @@ public class AiTestPane extends BorderPane {
|
|||||||
|
|
||||||
private void buildUi() {
|
private void buildUi() {
|
||||||
setPadding(new Insets(20));
|
setPadding(new Insets(20));
|
||||||
setTop(buildHeader());
|
|
||||||
setCenter(buildContent());
|
setCenter(buildContent());
|
||||||
setBottom(buildStatus());
|
setBottom(buildStatus());
|
||||||
generateButton.setDisable(true);
|
generateButton.setDisable(true);
|
||||||
@@ -115,15 +114,6 @@ public class AiTestPane extends BorderPane {
|
|||||||
projectCombo.setButtonCell(projectCell());
|
projectCombo.setButtonCell(projectCell());
|
||||||
}
|
}
|
||||||
|
|
||||||
private Node buildHeader() {
|
|
||||||
Label title = new Label("AI 单测生成");
|
|
||||||
title.setStyle("-fx-font-size: 22px; -fx-font-weight: bold;");
|
|
||||||
Label subtitle = new Label("CodeFree CLI · JDK 8 · Maven · JUnit 5 · 85% 增量行覆盖率");
|
|
||||||
VBox header = new VBox(5, title, subtitle);
|
|
||||||
header.setPadding(new Insets(0, 0, 16, 0));
|
|
||||||
return header;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Node buildContent() {
|
private Node buildContent() {
|
||||||
GridPane selection = grid();
|
GridPane selection = grid();
|
||||||
addRow(selection, 0, "项目", projectCombo, "生成模块", moduleCombo);
|
addRow(selection, 0, "项目", projectCombo, "生成模块", moduleCombo);
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ class AiTestPaneArchitectureTest {
|
|||||||
void presentsFourMainTabsWithoutAccordionAndStartsIdle() throws Exception {
|
void presentsFourMainTabsWithoutAccordionAndStartsIdle() throws Exception {
|
||||||
AiTestPane pane = createPane();
|
AiTestPane pane = createPane();
|
||||||
|
|
||||||
|
assertEquals(null, FxTestSupport.fx(pane::getTop));
|
||||||
TabPane mainTabs = assertInstanceOf(TabPane.class, FxTestSupport.fx(pane::getCenter));
|
TabPane mainTabs = assertInstanceOf(TabPane.class, FxTestSupport.fx(pane::getCenter));
|
||||||
assertEquals(List.of("项目与增量", "工具链", "质量规范", "结果与合并"),
|
assertEquals(List.of("项目与增量", "工具链", "质量规范", "结果与合并"),
|
||||||
FxTestSupport.fx(() -> mainTabs.getTabs().stream().map(tab -> tab.getText()).toList()));
|
FxTestSupport.fx(() -> mainTabs.getTabs().stream().map(tab -> tab.getText()).toList()));
|
||||||
|
|||||||
Reference in New Issue
Block a user