File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
Core/Core/Common/CommonUI/SwiftUIViews
Student/StudentE2ETests/Announcements
Teacher/TeacherE2ETests/Announcements Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,12 @@ public struct WebView: UIViewRepresentable {
139
139
context. coordinator. loaded = source
140
140
switch source {
141
141
case . html( let html) :
142
- webView. loadFileURL ( URL . Directories. documents, allowingReadAccessTo: URL . Directories. documents)
143
- webView. loadHTMLString ( html, baseURL: baseURL)
142
+ webView. loadFileURL (
143
+ URL . Directories. documents,
144
+ allowingReadAccessTo: URL . Directories. documents
145
+ ) { _ in
146
+ webView. loadHTMLString ( html, baseURL: baseURL)
147
+ }
144
148
case . request( let request) :
145
149
webView. load ( request)
146
150
case nil :
Original file line number Diff line number Diff line change @@ -69,13 +69,16 @@ class AnnouncementsTests: E2ETestCase {
69
69
// MARK: Check visibility toggle and dismiss button of the announcement notificaiton
70
70
let toggleButton = AccountNotifications . toggleButton ( notification: globalAnnouncement) . waitUntil ( . visible)
71
71
XCTAssertTrue ( toggleButton. isVisible)
72
+ XCTAssertEqual ( toggleButton. label, " \( globalAnnouncement. subject) , Tap to view announcement " )
72
73
var dismissButton = AccountNotifications . dismissButton ( notification: globalAnnouncement) . waitUntil ( . vanish)
73
74
XCTAssertTrue ( dismissButton. isVanished)
74
75
75
76
// MARK: Tap the toggle button and check visibility of dismiss button again
76
77
toggleButton. hit ( )
77
78
dismissButton = dismissButton. waitUntil ( . visible)
79
+ XCTAssertEqual ( toggleButton. label, " Hide content for \( globalAnnouncement. subject) " )
78
80
XCTAssertTrue ( dismissButton. isVisible)
81
+ XCTAssertEqual ( dismissButton. label, " Dismiss \( globalAnnouncement. subject) " )
79
82
80
83
// MARK: Check the message of the announcement
81
84
let announcementMessage = Helper . notificationMessage ( announcement: globalAnnouncement) . waitUntil ( . visible)
Original file line number Diff line number Diff line change @@ -77,14 +77,17 @@ class AnnouncementsTests: E2ETestCase {
77
77
78
78
// MARK: Check visibility toggle and dismiss button of the announcement notificaiton
79
79
let toggleButton = AccountNotifications . toggleButton ( notification: globalAnnouncement) . waitUntil ( . visible)
80
- var dismissButton = AccountNotifications . dismissButton ( notification: globalAnnouncement) . waitUntil ( . vanish)
81
80
XCTAssertTrue ( toggleButton. isVisible)
81
+ XCTAssertEqual ( toggleButton. label, " \( globalAnnouncement. subject) , Tap to view announcement " )
82
+ var dismissButton = AccountNotifications . dismissButton ( notification: globalAnnouncement) . waitUntil ( . vanish)
82
83
XCTAssertTrue ( dismissButton. isVanished)
83
84
84
85
// MARK: Tap the toggle button and check visibility of dismiss button again
85
86
toggleButton. hit ( )
86
87
dismissButton = dismissButton. waitUntil ( . visible)
88
+ XCTAssertEqual ( toggleButton. label, " Hide content for \( globalAnnouncement. subject) " )
87
89
XCTAssertTrue ( dismissButton. isVisible)
90
+ XCTAssertEqual ( dismissButton. label, " Dismiss \( globalAnnouncement. subject) " )
88
91
89
92
// MARK: Check the message of the announcement
90
93
let announcementMessage = Helper . notificationMessage ( announcement: globalAnnouncement) . waitUntil ( . visible)
You can’t perform that action at this time.
0 commit comments