diff options
Diffstat (limited to 'src/test/java/com/mavlushechka')
-rw-r--r-- | src/test/java/com/mavlushechka/a1qa/project/TestCase1.java | 7 |
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); |