summaryrefslogtreecommitdiff
path: root/src/test/java/com/mavlushechka
diff options
context:
space:
mode:
authorMavlushechka <mavlushechka@gmail.com>2022-11-02 22:53:55 +0500
committerMavlushechka <mavlushechka@gmail.com>2022-11-03 21:22:40 +0500
commit2d9aab8b54f46e560e9de8904118625ac0c9aa84 (patch)
treea37863119f5c6b25fd2b0adcd41e97cb336f6dea /src/test/java/com/mavlushechka
parent39a79a154282e893ae0ed0296d39f95f9be4430a (diff)
Add an assert to the 1st step
Diffstat (limited to 'src/test/java/com/mavlushechka')
-rw-r--r--src/test/java/com/mavlushechka/a1qa/project/TestCase1.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/java/com/mavlushechka/a1qa/project/TestCase1.java b/src/test/java/com/mavlushechka/a1qa/project/TestCase1.java
index 80b67b9..8b7afdf 100644
--- a/src/test/java/com/mavlushechka/a1qa/project/TestCase1.java
+++ b/src/test/java/com/mavlushechka/a1qa/project/TestCase1.java
@@ -9,6 +9,7 @@ import com.mavlushechka.a1qa.project.models.User;
import com.mavlushechka.a1qa.project.pages.ProjectsPage;
import com.mavlushechka.a1qa.project.utils.SiteApiUtils;
import org.openqa.selenium.Cookie;
+import org.testng.Assert;
import org.testng.annotations.Test;
import java.io.IOException;
@@ -17,8 +18,10 @@ public class TestCase1 extends BaseTest {
@Test
public void test1() throws IOException {
- LoggerUtils.step("Query the api to retrieve the token according to the option number.");
- String token = SiteApiUtils.generateToken(Integer.parseInt(JsonParser.parseData("testData", "variant")));
+ LoggerUtils.step("Query the api to retrieve the token according to the variant number.");
+ int variant = Integer.parseInt(JsonParser.parseData("testData", "variant"));
+ String token = SiteApiUtils.generateToken(variant);
+ Assert.assertNotEquals(token, null, "The token is null.");
ProjectsPage projectsPage = new ProjectsPage();
User user = JsonParser.convertToObject(JsonParser.parseObject("testData", "user"), User.class);