Skip to content

Commit 45d2dc0

Browse files
committed
fix: apply minor fixes across multiple classes
- Driver Factory - GetItemApiTest - PutItemApiTest
1 parent 03c9a04 commit 45d2dc0

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/main/java/com/omarelsheikh/todo/drivers/DriverFactory.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,9 @@ public WebDriver initializeDriver() {
4141
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(5));
4242
return driver;
4343
}
44+
45+
public WebDriver openUrl(String url) {
46+
driver.get("https://todo.qacart.com");
47+
return driver;
48+
}
4449
}

src/test/java/com/omarelsheikh/todo/api/testcases/GetItemsApiTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.omarelsheikh.todo.api.config.EndPoints;
44
import com.omarelsheikh.todo.api.requests.RegisterApi;
55
import com.omarelsheikh.todo.api.requests.TasksApi;
6-
import com.omarelsheikh.todo.utils.ConfigUtil;
76
import io.restassured.response.Response;
87
import org.testng.Assert;
98
import org.testng.annotations.Test;

src/test/java/com/omarelsheikh/todo/api/testcases/PutItemApiTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public void shouldFailToUpdateItemWhenUnauthorized() throws IOException {
115115
// Prepare updated todo
116116
Todo updatedTodo = new Todo("Should fail", true);
117117

118-
// Attempt to update WITHOUT token
118+
// Attempt to update WITHOUT a token
119119
Response updateResponse = given()
120120
.baseUri(ConfigUtil.getInstance().getBaseUrl())
121121
.header("Content-Type", "application/json")

0 commit comments

Comments
 (0)