Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

Commit

Permalink
Fix NetworkPageLoadTest (#3042)
Browse files Browse the repository at this point in the history
  • Loading branch information
st3fan authored Feb 20, 2021
1 parent d9be31e commit 9075d8b
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,21 @@ class NetworkPageLoadTest {
/* ktlint-disable no-blank-line-before-rbrace */ // This imposes unreadable grouping.
@Test
fun networkPageLoadTest() {
val googleUrl = "https://google.com".toUri()!!
val mozillaUrl = "https://mozilla.org".toUri()!!

navigationOverlay {
// Work around for #1444: on emulators with turbo mode enabled, the url bar will display
// any url loaded by the page in addition to the primary url. We disable turbo mode to
// ensure we only see the primary url and can assert it correctly.
}.toggleTurbo {
}.openOverlay {
assertTurboIsSelected(false)

}.enterUrlAndEnterToBrowser(googleUrl) {
assertDOMElementExists(Locator.ID, "hplogo") // google logo
}.enterUrlAndEnterToBrowser("https://www.mozilla.org".toUri()!!) {
assertDOMElementExists(Locator.CLASS_NAME, "c-navigation-logo-image") // mozilla logo
}.openOverlay {
assertURLBarTextContains("google")

}.enterUrlAndEnterToBrowser(mozillaUrl) {
assertDOMElementExists(Locator.CLASS_NAME, "mzp-c-navigation-logo") // mozilla logo
assertURLBarTextContains("www.mozilla.org")
}.enterUrlAndEnterToBrowser("https://support.mozilla.org".toUri()!!) {
assertDOMElementExists(Locator.CLASS_NAME, "sumo-nav--logo")
}.openOverlay {
assertURLBarTextContains("mozilla")
assertURLBarTextContains("support.mozilla.org")
}
}
}

0 comments on commit 9075d8b

Please sign in to comment.