Skip to content

Commit c7a2245

Browse files
committed
fixed the test and updated the docker compose file with the fixes provided by Roy
1 parent dee56de commit c7a2245

5 files changed

Lines changed: 36 additions & 71 deletions

File tree

docker-compose-toolshop-new.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

docker-compose-toolshop.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ services:
77
- "DB_PORT=3306"
88
- "DB_HOST=mariadb"
99
- "host=localhost"
10-
- DISABLE_LOGGING=true
10+
- DISABLE_LOGGING=${DISABLE_LOGGING}
11+
volumes:
12+
- laravel-app-code:/var/www
1113

1214
angular-ui:
1315
image: testsmith/practice-software-testing-sprint5-ui
@@ -16,13 +18,33 @@ services:
1618
command: >
1719
bash -c "ng serve --host 0.0.0.0 --port 4200"
1820
21+
# The Web Server
1922
web:
2023
image: testsmith/practice-software-testing-web
2124
ports:
2225
- 8091:80
2326
- 8000:81
2427
depends_on:
2528
- laravel-api
29+
volumes:
30+
- laravel-app-code:/var/www
31+
32+
cron:
33+
image: testsmith/practice-software-testing-cron
34+
restart: always
35+
depends_on:
36+
- mariadb
37+
- laravel-api
38+
volumes:
39+
- laravel-app-code:/var/www
40+
working_dir: /var/www
41+
command: sh -c "crond -f -l 8"
42+
environment:
43+
- "PHP_OPCACHE_VALIDATE_TIMESTAMPS=1"
44+
- "DB_PORT=3306"
45+
- "DB_HOST=mariadb"
46+
- "host=localhost"
47+
- DISABLE_LOGGING=${DISABLE_LOGGING}
2648

2749
mariadb:
2850
image: yobasystems/alpine-mariadb:10.6.11
@@ -35,3 +57,12 @@ services:
3557
MYSQL_USER: user
3658
MYSQL_PASSWORD: root
3759
MYSQL_DATABASE: toolshop
60+
61+
mailcatcher:
62+
image: dockage/mailcatcher:0.9.0
63+
ports:
64+
- 1025:1025 # smtp server
65+
- 1080:1080 # web ui
66+
67+
volumes:
68+
laravel-app-code:

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<surefire-version>3.5.5</surefire-version>
2222
<maven.source.encoding>UTF-8</maven.source.encoding>
2323
<suite-xml>testng.xml</suite-xml>
24-
<argLine>-Dfile.encoding=UTF-8 -Xdebug -Xnoagent</argLine>
24+
<argLine>-Dfile.encoding=UTF-8</argLine>
2525
</properties>
2626
<dependencies>
2727
<dependency>

src/test/java/io/github/mfaisalkhatri/test/BaseTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
public class BaseTest implements WebDriverProvider {
1313

14-
protected WebDriver driver;
14+
protected WebDriver driver;
1515

1616
@Override
1717
public WebDriver getDriver () {
@@ -21,7 +21,7 @@ public WebDriver getDriver () {
2121
@BeforeClass
2222
public void setup () {
2323
ChromeOptions chromeOptions = new ChromeOptions ();
24-
//chromeOptions.addArguments ("--headless=new","--no-sandbox","--window-size=1920,1080");
24+
chromeOptions.addArguments ("--headless=new", "--no-sandbox", "--window-size=1920,1080");
2525

2626
this.driver = new ChromeDriver (chromeOptions);
2727
this.driver.manage ()

src/test/java/io/github/mfaisalkhatri/test/JsonDataProviderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public Iterator<RegistrationData> getValidRegistrationData () {
3232
@Test (dataProvider = "getValidRegistrationData")
3333
public void testRegistrationPasswordAlert (final RegistrationData registrationData) {
3434
this.driver.get ("http://localhost:4200/");
35-
// this.driver.get ("https://practicesoftwaretesting.com/auth/register");
35+
// this.driver.get ("https://practicesoftwaretesting.com/auth/register");
3636

3737
HomePage homePage = new HomePage (driver);
3838
LoginPage loginPage = homePage.navigateToLoginPage ();

0 commit comments

Comments
 (0)