"uploaded image file preview"() {
return FunctionalHelpers.openPage(this, url, ".js-image-upload-label")
.findById("image")
.type("tests/fixtures/green_square.png")
.sleep(1000)
.end()
.findByCssSelector(".js-image-upload-label")
.getAttribute("style")
.then(function(inlineStyle) {
assert.include(
inlineStyle,
"data:image/png;base64,iVBOR",
"Base64 data shown as preview background"
);
})
.end();
},
× safari 13604.4.7.1.6 on macOS - Image Uploads (non-auth) - uploaded image file preview
ElementNotVisible: [POST http://localhost:4444/wd/hub/session/24FB85B4-1656-4D51-9BCC-BBB5EEC8A70F/element/node-389166D6-4C77-4480-B482-2E81BB127864/value / {"value":["/var/folders/1y/gr1mj8xx7bq2rgsnv2f4d2xm0000gn/T/24FB85B4-1656-4D51-9BCC-BBB5EEC8A70F/upload2278698953725792071file/green_square.png"]}] An element command could not be completed because the element is not visible on the page.
at Test.uploaded image file preview [as test] <tests/functional/image-uploads-non-auth.js:61:10>
at <src/lib/Test.ts:260:47>
"Back button works from issues page"() {
return (
FunctionalHelpers.openPage(this, url("/"), ".js-issues-link")
.findByCssSelector(".js-issues-link")
.click()
.end()
// check that the page is loaded
.findDisplayedByCssSelector(".wc-IssueList:nth-child(11)")
.end()
.getCurrentUrl()
.then(function(url) {
assert.include(url, "/issues");
})
.goBack()
// now check that we're back at the home page.
.findDisplayedByCssSelector(".wc-IssueList:nth-child(1)")
.end()
.getCurrentUrl()
.then(function(url) {
assert.notInclude(url, "/issues");
})
.end()
);
}
× safari 13604.4.7.1.6 on macOS - History navigation - Back button works from is
This just freezes the interface and never ends the tests. Intern 4 is not giving me any stack trace, just the failure message.
Hmm...so, uploading files in native safaridriver (assuming that's what you're using) is...not well documented. Safari didn't even support uploads until late August, and I'm not entirely clear at the moment what's required to get it to work (the standard behavior of typing into the input doesn't work).
Regarding the hanging issue with
goBack
, it's hard to tell without a runnable example. In some simple tests I tried with Safari 10 and Intern 4.1.5,goBack
seems to be working fine.