Skip to content

Commit

Permalink
Fix trailing newlines. Remove () from assertions.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewculver committed Mar 2, 2021
1 parent 902faa3 commit ddf488a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/views/magic_test/_context_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
document.addEventListener('DOMContentLoaded', fn);
}
}

ready(function() {
enableKeyboardShortcuts();
});
Expand All @@ -23,9 +23,9 @@
document.addEventListener('keydown', keydown, false);

function generateAssertion() {
var text = selectedText();
if (text.trim().length > 0) {
var action = "assert page.has_content?('" + text.replace("'", "\\\'") + "')";
var text = selectedText().trim();
if (text.length > 0) {
var action = "assert page.has_content? '" + text.replace("'", "\\\'") + "'";
var testingOutput = JSON.parse(sessionStorage.getItem("testingOutput"));
var target = "";
var options = "";
Expand Down

0 comments on commit ddf488a

Please sign in to comment.