Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
elchananarb committed Jan 7, 2025
1 parent 9af754f commit 857373e
Show file tree
Hide file tree
Showing 32 changed files with 32 additions and 31 deletions.
1 change: 1 addition & 0 deletions containers-resolution.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
60 changes: 30 additions & 30 deletions src/test/java/com/checkmarx/intellij/ui/BaseUITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,36 @@ public abstract class BaseUITest {

@BeforeAll
public static void init() {
if (!initialized) {
log("Initializing the tests");
log("Wait duration set for " + waitDuration.getSeconds());
StepWorker.registerProcessor(new StepLogger());
if (hasAnyComponent(FLAT_WELCOME_FRAME)) {
find(FROM_VCS_TAB).click();
find(JTextFieldFixture.class, BORDERLESS_TEXT_FIELD, Duration.ofSeconds(10)).setText(Environment.REPO);
waitFor(() -> hasAnyComponent(CLONE_BUTTON) && find(JButtonFixture.class, CLONE_BUTTON).isEnabled());
find(CLONE_BUTTON).click();
trustClonedProject();
try {
waitFor(() -> hasAnyComponent("//div[@class='ContentTabLabel']"));
} catch (WaitForConditionTimeoutException e) {
// if exception is thrown, sync was successful, so we can keep going
}
}
// Open Checkmarx One plugin
openCxToolWindow();

// Resize Checkmarx One plugin so that all toolbar icons are visible
resizeToolBar();

// Connect to AST
testASTConnection(true);

initialized = true;
log("Initialization finished");
} else {
log("Tests already initialized, skipping");
}
// if (!initialized) {
// log("Initializing the tests");
// log("Wait duration set for " + waitDuration.getSeconds());
// StepWorker.registerProcessor(new StepLogger());
// if (hasAnyComponent(FLAT_WELCOME_FRAME)) {
// find(FROM_VCS_TAB).click();
// find(JTextFieldFixture.class, BORDERLESS_TEXT_FIELD, Duration.ofSeconds(10)).setText(Environment.REPO);
// waitFor(() -> hasAnyComponent(CLONE_BUTTON) && find(JButtonFixture.class, CLONE_BUTTON).isEnabled());
// find(CLONE_BUTTON).click();
// trustClonedProject();
// try {
// waitFor(() -> hasAnyComponent("//div[@class='ContentTabLabel']"));
// } catch (WaitForConditionTimeoutException e) {
// // if exception is thrown, sync was successful, so we can keep going
// }
// }
// // Open Checkmarx One plugin
// openCxToolWindow();
//
// // Resize Checkmarx One plugin so that all toolbar icons are visible
// resizeToolBar();
//
// // Connect to AST
// testASTConnection(true);
//
// initialized = true;
// log("Initialization finished");
// } else {
// log("Tests already initialized, skipping");
// }
}

private static void resizeToolBar() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void testTriggerScanProjectAndBranchDontMatch() {
public void testTriggerScanProjectWithDifferentOrganizationsDontMatch() {
waitFor(() -> findSelection("Scan").isEnabled() && findSelection("Project").isEnabled() && findSelection("Branch").isEnabled() && findSelection("Scan").isEnabled());
testSelectionAction(findSelection("Project"), "Project", "DiffOrg/WebGoat");
testSelectionAction(findSelection("Branch"), "Branch", Environment.NOT_MATCH_BRANCH_NAME);
testSelectionAction(findSelection("Branch"), "Branch", Environment. BRANCH_NAME);
testSelectionAction(findSelection("Scan"), "Scan", Environment.SCAN_ID_NOT_MATCH_PROJECT);
waitFor(() -> findSelection("Scan").isEnabled() && findSelection("Project").isEnabled() && findSelection("Branch").isEnabled());
findRunScanButtonAndClick();
Expand Down
Binary file added video/ScreenRecording 2025-01-01 at 14.20.20.avi
Binary file not shown.
Empty file.
Binary file added video/ScreenRecording 2025-01-01 at 14.24.43.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-01 at 15.13.37.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-01 at 15.18.54.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-01 at 15.19.49.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-02 at 10.19.53.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-02 at 13.07.31.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-02 at 13.13.43.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-07 at 11.52.57.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-07 at 12.38.33.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-07 at 12.56.06.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-07 at 14.48.07.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-07 at 14.55.57.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-07 at 14.56.35.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-07 at 15.19.33.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-07 at 15.27.01.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-07 at 15.29.36.avi
Binary file not shown.
Binary file added video/ScreenRecording 2025-01-07 at 15.32.10.avi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 857373e

Please sign in to comment.