1
1
package ui
2
2
3
+ import io .qameta .allure .scalatest .AllureScalatestContext
3
4
import org .openqa .selenium .chrome .ChromeDriver
4
5
import org .scalatest .{BeforeAndAfter , BeforeAndAfterAll }
5
6
import org .scalatest .concurrent .Eventually
@@ -17,7 +18,7 @@ class BlogTest extends AnyFlatSpec with BeforeAndAfterAll with Matchers with Eve
17
18
new ChromeDriver ()
18
19
}
19
20
20
- " User" should " be able to view latest blog post" in {
21
+ " User" should " be able to view latest blog post" in new AllureScalatestContext {
21
22
val homePage = new HomePage
22
23
go to homePage
23
24
val posts = findAll(CssSelectorQuery (" div.post-preview" )).toList
@@ -26,7 +27,7 @@ class BlogTest extends AnyFlatSpec with BeforeAndAfterAll with Matchers with Eve
26
27
latestPost.text should not be empty
27
28
}
28
29
29
- " User" should " be able to open Contact Page" in {
30
+ " User" should " be able to open Contact Page" in new AllureScalatestContext {
30
31
val homePage = new HomePage
31
32
go to homePage
32
33
homePage.url should equal (currentUrl)
@@ -38,7 +39,7 @@ class BlogTest extends AnyFlatSpec with BeforeAndAfterAll with Matchers with Eve
38
39
contactPage.url should equal (currentUrl)
39
40
}
40
41
41
- " User" should " be able to send message to author" in {
42
+ " User" should " be able to send message to author" in new AllureScalatestContext {
42
43
val contactPage = new ContactPage
43
44
go to contactPage
44
45
contactPage.url should be (currentUrl)
@@ -51,7 +52,7 @@ class BlogTest extends AnyFlatSpec with BeforeAndAfterAll with Matchers with Eve
51
52
click on cssSelector(contactPage.sendButton)
52
53
}
53
54
54
- " User" should " be able to open About Page" in {
55
+ " User" should " be able to open About Page" in new AllureScalatestContext {
55
56
val homePage = new HomePage
56
57
go to homePage
57
58
homePage.url should equal (currentUrl)
0 commit comments