Commit 7295c8b2 authored by ccottier's avatar ccottier

changed app.properties to config.properties; renamed variable of instances to config as well

parent ec5b047b
......@@ -16,7 +16,7 @@ public class Config {
try {
Properties props = new Properties();
String propFileName = "application.properties";
String propFileName = "config.properties";
inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);
if (inputStream != null) {
......
......@@ -24,14 +24,14 @@ public class AccountSettingsTest {
ChromeDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);
Map<String,String> vars = new Config().getProps();
Map<String,String> config = new Config().getProps();
LoginPOM loginPage = new LoginPOM(driver);
AccountSettingsPOF accountSettingsPage = new AccountSettingsPOF(driver);
//Navigate to accounts page and sign in
accountSettingsPage.navigateToUrl(accountSettingsPage.getAccountSettingsUrl());
loginPage.login(vars.get("email"), vars.get("password"));
loginPage.login(config.get("email"), config.get("password"));
// Get accounts page values
Boolean waitInputs = new WebDriverWait(driver, 15)
......@@ -45,10 +45,10 @@ public class AccountSettingsTest {
//Compare to expected and assert
Assert.assertEquals("First name not equal to account details", vars.get("first_name"),firstName);
Assert.assertEquals("Last name not equal to account details", vars.get("last_name"), lastName);
Assert.assertEquals("Email not equal to account details", vars.get("email"), email);
Assert.assertEquals("Phone number not equal to account details", vars.get("phone_number"), phoneNumber);
Assert.assertEquals("First name not equal to account details", config.get("first_name"),firstName);
Assert.assertEquals("Last name not equal to account details", config.get("last_name"), lastName);
Assert.assertEquals("Email not equal to account details", config.get("email"), email);
Assert.assertEquals("Phone number not equal to account details", config.get("phone_number"), phoneNumber);
Assert.assertTrue("Club card number invalid", !clubCardNumber.equals(""));
driver.close();
......
......@@ -23,7 +23,7 @@ public class LoginTest {
System.setProperty("webdriver.chrome.driver", "/Users/ccottier/Desktop/chromedriver");
ChromeDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);
Map<String,String> vars = new Config().getProps();
Map<String,String> config = new Config().getProps();
LoginPOM loginPage = new LoginPOM(driver);
......@@ -37,7 +37,7 @@ public class LoginTest {
loginPage.getSignInModal().click();
//Log in
loginPage.login(vars.get("email"), vars.get("password"));
loginPage.login(config.get("email"), config.get("password"));
//Check that account header can be seen, showing we've logged in
Assert.assertTrue(driver.findElements(By.linkText("Account")).size() > 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment