Skip to content

Commit

Permalink
Merge pull request #301 from Checkmarx/feature/elchanan/add_org_misma…
Browse files Browse the repository at this point in the history
…tch_project_dont_match_test

Add test for organization mismatch should be project doesn't match (AST-79785)
  • Loading branch information
elchananarb authored Jan 7, 2025
2 parents 5128be6 + d3dff4f commit f301a76
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/test/java/com/checkmarx/intellij/ui/TestTriggerScan.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInfo;

import static com.checkmarx.intellij.ui.utils.RemoteRobotUtils.*;
import static com.checkmarx.intellij.ui.utils.Xpath.*;

Expand Down Expand Up @@ -68,6 +67,19 @@ public void testTriggerScanProjectAndBranchDontMatch() {
Assertions.assertTrue(hasAnyComponent(BRANCH_DOES_NOT_MATCH));
}

@Test
@Video
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.BRANCH_NAME);
testSelectionAction(findSelection("Scan"), "Scan", Environment.SCAN_ID_NOT_MATCH_PROJECT);
waitFor(() -> findSelection("Scan").isEnabled() && findSelection("Project").isEnabled() && findSelection("Branch").isEnabled());
findRunScanButtonAndClick();
Assertions.assertTrue(hasAnyComponent(PROJECT_DOES_NOT_MATCH));
}


@Test
@Video
public void testTriggerScanAndLoadResults() {
Expand Down

0 comments on commit f301a76

Please sign in to comment.