Skip to content

Instantly share code, notes, and snippets.

@brizental
Created August 15, 2017 18:24
Show Gist options
  • Save brizental/2af203aa4d5d2bd8f122157520d10e1d to your computer and use it in GitHub Desktop.
Save brizental/2af203aa4d5d2bd8f122157520d10e1d to your computer and use it in GitHub Desktop.
Add a screenshot to a comment
"Add a screenshot to a comment": async function() {
await FunctionalHelpers.openPage(
this,
url("/issues/100"),
".wc-Comment-body"
);
let input = await this.remote.findById("image");
await this.remote.execute(function(element){
});
await input.type(require.toUrl("../fixtures/green_square.png"));
let textarea = await this.remote.findByCssSelector(".js-Comment-text");
let text = await textarea.getProperty("value");
assert.include(
text,
"[![Screenshot Description](http://localhost:5000/uploads/",
"The image was correctly uploaded and its URL was copied to the comment text."
);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment