Skip to content

Commit e3e335a

Browse files
author
elchananarb
committed
Update ProjectSelectionTest.java
1 parent eb8819d commit e3e335a

1 file changed

Lines changed: 7 additions & 27 deletions

File tree

checkmarx-ast-eclipse-plugin-tests/src/test/java/checkmarx/ast/eclipse/plugin/tests/ui/ProjectSelectionTest.java

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,40 +27,20 @@ public void testProjectSelectionFlow() throws TimeoutException {
2727

2828
System.out.println("\n=== Starting Project Selection Flow Test ===");
2929

30-
// Clear previous results
31-
_bot.viewByTitle(VIEW_CHECKMARX_AST_SCAN).viewMenu()
32-
.menu(PluginConstants.TOOLBAR_ACTION_CLEAR_RESULTS).click();
33-
sleep(1000);
34-
35-
// Get combo boxes
36-
SWTBotCombo projectCombo = _bot.comboBox(0);
37-
SWTBotCombo branchCombo = _bot.comboBox(1);
38-
SWTBotCombo scanIdCombo = _bot.comboBox(2);
39-
40-
// Verify initial state - all empty
41-
assertTrue("Project combo should start empty",
42-
projectCombo.getText().isEmpty() ||
43-
projectCombo.getText().equals("Select a project"));
44-
45-
assertTrue("Branch combo should start empty",
46-
branchCombo.getText().isEmpty());
47-
48-
assertTrue("Scan ID combo should start empty",
49-
scanIdCombo.getText().isEmpty() ||
50-
scanIdCombo.getText().equals(PluginConstants.COMBOBOX_SCAND_ID_PLACEHOLDER));
51-
30+
5231
// Select project
53-
projectCombo.setText(TEST_PROJECT);
32+
_bot.comboBox(0).setText(TEST_PROJECT);
5433
sleep(2000);
34+
System.out.println("Project selected: '" + _bot.comboBox(0).getText() + "'");
5535

5636
// Verify branch combo is enabled and select branch
57-
assertTrue("Branch combo should be enabled", branchCombo.isEnabled());
58-
branchCombo.setText(TEST_BRANCH);
37+
assertTrue("Branch combo should be enabled", _bot.comboBox(1).isEnabled());
38+
_bot.comboBox(1).setText(TEST_BRANCH);
5939
sleep(2000);
6040

6141
// Verify scan ID combo is enabled and select scan
62-
assertTrue("Scan ID combo should be enabled", scanIdCombo.isEnabled());
63-
scanIdCombo.setText(Environment.SCAN_ID); // CX_TEST_SCAN
42+
assertTrue("Scan ID combo should be enabled", _bot.comboBox(2).isEnabled());
43+
_bot.comboBox(2).setText(Environment.SCAN_ID);
6444
sleep(2000);
6545

6646
// Cleanup

0 commit comments

Comments
 (0)