Skip to content

Commit

Permalink
Change pointing to repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Rylan-cgi committed Nov 26, 2024
1 parent d8f9993 commit bd82053
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 22 deletions.
6 changes: 3 additions & 3 deletions selenium-testing/cicd/cicd-script.bat
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ set "$assigneeUser=%accountId%"
set "$mandatoryFields={\"reporter\":{\"id\":\"%accountId%\",\"label\":\"%jiraAccountName%\",\"name\":\"%jiraAccountName%\"}}"

:: File path for results file
set "$resultPath=@\"%WORKSPACE%/target/surefire-reports/testng-results.xml\"
set "$resultPath=@\"%WORKSPACE%/selenium-testing/target/surefire-reports/testng-results.xml\"

:: =========================================
:: Create an automation task, run it, send test results to Zephyr.
Expand Down Expand Up @@ -84,9 +84,9 @@ set "$issueSelf=%issueSelf%"
:: Attach test result screenshots to the Jira test case
:: =========================================

set "$imageDir=%WORKSPACE%/TestExecutionScreenshots"
set "$imageDir=%WORKSPACE%/selenium-testing/TestExecutionScreenshots"

for %%F in (%$imageDir%\*.png) do (
for %%F in ("%$imageDir%\*.png") do (
echo Sending: %%F
curl --location --request POST "%$issueSelf%/attachments" ^
--user "%$jiraRestAPIAuth%" ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static void cleanTestExecutionScreenshots() {
});
}
catch(Exception e) {
e.printStackTrace();
System.out.println("[INFO] There is no folder for screenshots created yet, one will be created");
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
package ca.bc.gov.ecc.ofm.selenium.v1.tests.scripting;

import ca.bc.gov.ecc.ofm.selenium.v1.PageFactory_Portal.*;
import ca.bc.gov.ecc.ofm.selenium.v1.PageFactory_CRM.*;
import ca.bc.gov.ecc.ofm.selenium.v1.tests.BaseTest;
import ca.bc.gov.ecc.ofm.selenium.v1.tests.CustomReporter;
import io.github.bonigarcia.wdm.WebDriverManager;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;

import org.openqa.selenium.*;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.logging.LogEntries;
import org.openqa.selenium.logging.LogEntry;
import org.openqa.selenium.logging.LogType;
import org.testng.Assert;
import org.testng.TestNG;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;
import org.openqa.selenium.logging.LogEntries;
import org.openqa.selenium.logging.LogEntry;
import org.openqa.selenium.logging.LogType;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.logging.Level;
import ca.bc.gov.ecc.ofm.selenium.v1.PageFactory_CRM.CRMHomePage;
import ca.bc.gov.ecc.ofm.selenium.v1.PageFactory_CRM.CRMSignInCredentialPage;
import ca.bc.gov.ecc.ofm.selenium.v1.PageFactory_Portal.InternalPortalImpersonatePage;
import ca.bc.gov.ecc.ofm.selenium.v1.PageFactory_Portal.InternalPortalSignInFirstPage;
import ca.bc.gov.ecc.ofm.selenium.v1.PageFactory_Portal.PortalHomePage;
import ca.bc.gov.ecc.ofm.selenium.v1.PageFactory_Portal.PortalMessagesAndNotificationsPage;
import ca.bc.gov.ecc.ofm.selenium.v1.PageFactory_Portal.PortalSignInCredentialPage;
import ca.bc.gov.ecc.ofm.selenium.v1.PageFactory_Portal.PortalSignInFirstPage;
import ca.bc.gov.ecc.ofm.selenium.v1.tests.BaseTest;
import ca.bc.gov.ecc.ofm.selenium.v1.tests.CustomReporter;
import io.github.bonigarcia.wdm.WebDriverManager;

@Listeners(CustomReporter.class)
public class SmokeTestScript extends BaseTest {
Expand Down Expand Up @@ -240,7 +245,7 @@ public void SmokeTest() throws Exception {
portalHomePage.clickImpersonate();

Thread.sleep(3000);
portalImpersonatePage.setImpersonateField("UAT_SECONDARY_PORTAL_USERNAME");
portalImpersonatePage.setImpersonateField(UAT_SECONDARY_PORTAL_USERNAME);
portalImpersonatePage.clickSearchButton();

test.info("Test #7 - Using impersonate, login to another user - Complete");
Expand Down

0 comments on commit bd82053

Please sign in to comment.