Skip to content

Commit b7b7cbe

Browse files
author
Matécsa Dániel
committed
Course creation test changed to use unique short names
1 parent f76111e commit b7b7cbe

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

tests/mytests/src/test/java/tests/DependencyTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public void logoutTest() {
3838
sharedMainPage.clickLogout();
3939
Assert.assertTrue(sharedMainPage.getBodyText().contains("Log in"));
4040
System.out.println("Logout test completed.");
41+
System.out.println("Dependency test completed.");
4142
}
4243

4344

tests/mytests/src/test/java/tests/WebsiteTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.util.List;
55
import java.util.Random;
66
import java.net.MalformedURLException;
7+
import java.util.UUID;
78

89
import org.testng.annotations.*;
910
import org.testng.*;
@@ -30,8 +31,9 @@ public void courseCreation() {
3031

3132
Random rand = new Random();
3233
int randomNum = rand.nextInt(1000);
33-
courseCreatorPage.typeCourseFullName("Selenium Testing Course " + randomNum);
34-
courseCreatorPage.typeCourseShortName("STC " + randomNum);
34+
UUID uniqueID = UUID.randomUUID();
35+
courseCreatorPage.typeCourseFullName("Selenium Testing Course " + randomNum + " " );
36+
courseCreatorPage.typeCourseShortName(uniqueID.toString());
3537

3638
List<WebElement> selectElements = courseCreatorPage.selectCourseVisibility(0);
3739
Assert.assertTrue(selectElements.get(0).isSelected());

0 commit comments

Comments
 (0)