<commit_before>package insynctive.tests;

import static org.junit.Assert.assertTrue;

import java.util.Map;

import org.testng.annotations.BeforeClass;
import org.testng.annotations.Optional;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

import insynctive.annotation.ParametersFront;
import insynctive.model.EmergencyContact;
import insynctive.model.USAddress;
import insynctive.pages.Page;
import insynctive.pages.insynctive.LoginPage;
import insynctive.pages.insynctive.PersonFilePage;
import insynctive.pages.insynctive.ResetPasswordPage;
import insynctive.pages.insynctive.TwoFAPage;
import insynctive.pages.insynctive.agent.hr.HomeForAgentsPage;
import insynctive.pages.insynctive.agent.settings.PeoplePage;
import insynctive.pages.insynctive.employee.EmployeeDashboardPage;
import insynctive.utils.CheckInApp;
import insynctive.utils.Debugger;
import insynctive.utils.MailManager;
import insynctive.utils.ParamObjectField;
import insynctive.utils.Sleeper;
import insynctive.utils.Wait;
import insynctive.utils.data.TestEnvironment;
 
public class PersonFileTest extends TestMachine {
	
	private USAddress usaddress = null;
	
	public Integer runID;
	public String environment;
	public TestEnvironment testEnvironment;
	public boolean isRemote;
	public boolean isNotification;
	public Integer testSuiteID;
	
	@BeforeClass
	@Parameters({"environment", "browser", "isRemote", "isNotification", "testSuiteID", "testName"})
	public void tearUp(String environment, String browser, String isRemote, String isNotification, String testSuiteID, String testName) throws Exception {
		tearUp(browser, environment, isRemote, isNotification, testSuiteID);
		this.sessionName = testName;
	}

	@Test
	@Parameters({"TestID"})
	@ParametersFront(attrs={ParamObjectField.LOGIN_USERNAME, ParamObjectField.LOGIN_PASSWORD}, 
	labels={"Login Username", "Login Password"})
	public void loginTest(@Optional("TestID") Integer testID)
			throws Exception {
		changeParamObject(testID);
		startTest();
		try{ 
			LoginPage loginPage = login();
			Sleeper.sleep(1500, driver);
			boolean result = loginPage.isLoggedIn(1000);
			Debugger.log("loginTest => "+result, isRemote);
			setResult(result, "Login Test");
			assertTrue(result);
		} catch(Exception ex){
			failTest("Login Test", ex, isRemote);
			assertTrue(false);
		}
	}
	
	@Test
	@Parameters({"TestID"})
	@ParametersFront(attrs={ParamObjectField.LOGIN_USERNAME, ParamObjectField.LOGIN_PASSWORD}, 
	labels={"Login Username", "Login Password"})
	public void longTimeLogin(@Optional("TestID") Integer testID)
			throws Exception {
		changeParamObject(testID);
		
		startTest();
		try{ 
			LoginPage loginPage = login();
			Sleeper.sleep(1500, driver);
			boolean result = loginPage.isLoggedIn(1000);
			Debugger.log("loginTest => "+result, isRemote);
			setResult(result, "Login Test");
			assertTrue(result);
		} catch(Exception ex){
			failTest("Login Test", ex, isRemote);
			assertTrue(false);
		}
	}
	
	//TODO DUPLICATED CODE
	@Test
	@Parameters({"TestID"})
	@ParametersFront(attrs={ParamObjectField.LOGIN_USERNAME, ParamObjectField.LOGIN_PASSWORD}, 
	labels={"Login Username", "Login Password"})
	public void loginAsAgentTest(@Optional("TestID") Integer testID)
			throws Exception {
		changeParamObject(testID);

		try{ 
			LoginPage loginPage = login();
			Sleeper.sleep(1500, driver);
			boolean result = loginPage.isLoggedIn();
			Debugger.log("loginTest => "+result, isRemote);
			setResult(result, "Login Test");
			assertTrue(result);
		} catch(Exception ex){
			failTest("Login Test", ex, isRemote);
			assertTrue(false);
		}
	}
	
	@Test<commit_msg>resolved bug in personfiletest<commit_after>package insynctive.tests;

import static org.junit.Assert.assertTrue;

import java.util.Map;

import org.testng.annotations.BeforeClass;
import org.testng.annotations.Optional;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

import insynctive.annotation.ParametersFront;
import insynctive.model.EmergencyContact;
import insynctive.model.USAddress;
import insynctive.pages.Page;
import insynctive.pages.insynctive.LoginPage;
import insynctive.pages.insynctive.PersonFilePage;
import insynctive.pages.insynctive.ResetPasswordPage;
import insynctive.pages.insynctive.TwoFAPage;
import insynctive.pages.insynctive.agent.hr.HomeForAgentsPage;
import insynctive.pages.insynctive.agent.settings.PeoplePage;
import insynctive.pages.insynctive.employee.EmployeeDashboardPage;
import insynctive.utils.CheckInApp;
import insynctive.utils.Debugger;
import insynctive.utils.MailManager;
import insynctive.utils.ParamObjectField;
import insynctive.utils.Sleeper;
import insynctive.utils.Wait;
import insynctive.utils.data.TestEnvironment;
 
public class PersonFileTest extends TestMachine {
	
	private USAddress usaddress = null;
	
	@BeforeClass
	@Parameters({"environment", "browser", "isRemote", "isNotification", "testSuiteID", "testName"})
	public void tearUp(String environment, String browser, String isRemote, String isNotification, String testSuiteID, String testName) throws Exception {
		tearUp(browser, environment, isRemote, isNotification, testSuiteID);
		this.sessionName = testName;
	}

	@Test
	@Parameters({"TestID"})
	@ParametersFront(attrs={ParamObjectField.LOGIN_USERNAME, ParamObjectField.LOGIN_PASSWORD}, 
	labels={"Login Username", "Login Password"})
	public void loginTest(@Optional("TestID") Integer testID)
			throws Exception {
		changeParamObject(testID);
		startTest();
		try{ 
			LoginPage loginPage = login();
			Sleeper.sleep(1500, driver);
			boolean result = loginPage.isLoggedIn(1000);
			Debugger.log("loginTest => "+result, isRemote);
			setResult(result, "Login Test");
			assertTrue(result);
		} catch(Exception ex){
			failTest("Login Test", ex, isRemote);
			assertTrue(false);
		}
	}
	
	@Test
	@Parameters({"TestID"})
	@ParametersFront(attrs={ParamObjectField.LOGIN_USERNAME, ParamObjectField.LOGIN_PASSWORD}, 
	labels={"Login Username", "Login Password"})
	public void longTimeLogin(@Optional("TestID") Integer testID)
			throws Exception {
		changeParamObject(testID);
		
		startTest();
		try{ 
			LoginPage loginPage = login();
			Sleeper.sleep(1500, driver);
			boolean result = loginPage.isLoggedIn(1000);
			Debugger.log("loginTest => "+result, isRemote);
			setResult(result, "Login Test");
			assertTrue(result);
		} catch(Exception ex){
			failTest("Login Test", ex, isRemote);
			assertTrue(false);
		}
	}
	
	@Test
	@Parameters({"TestID"})
	@ParametersFront(attrs={ParamObjectField.LOGIN_USERNAME, ParamObjectField.LOGIN_PASSWORD}, 
	labels={"Login Username", "Login Password"})
	public void loginAsAgentTest(@Optional("TestID") Integer testID)
			throws Exception {
		changeParamObject(testID);

		try{ 
			LoginPage loginPage = login();
			Sleeper.sleep(1500, driver);
			boolean result = loginPage.isLoggedIn();
			Debugger.log("loginTest => "+result, isRemote);
			setResult(result, "Login Test");
			assertTrue(result);
		} catch(Exception ex){
			failTest("Login Test", ex, isRemote);
			assertTrue(false);
		}
	}
	
	@Test
{'fraction_non_alphanumeric': 0.11658177702320317, 'fraction_numerical': 0.005659309564233163, 'mean_word_length': 6.069, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '973329', 'n_tokens_mistral': 2420, 'n_tokens_neox': 2160, 'n_words': 443}