Last active
January 12, 2021 21:04
-
-
Save jlamoree/11303391 to your computer and use it in GitHub Desktop.
Nightwatch.js test for CKEditor components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
test: function (browser) { | |
var ckeditor = "editor1", | |
testtime = new Date(); | |
browser | |
.url("http://ckeditor.com/demo#standard") | |
.resizeWindow(1024, 820) | |
.waitForElementVisible("#cke_" + ckeditor, 5000) | |
.execute( | |
function (instance, content) { | |
CKEDITOR.instances[instance].setData(content); | |
}, | |
[ | |
ckeditor, | |
"<h1>New Content</h1><p>Some content set at " + testtime.toString() + "</p>" | |
] | |
) | |
.pause(1000) | |
.saveScreenshot("ckeditor-screenshot-" + testtime.getTime() + ".png") | |
.end(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment