mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Added test for alert bar
This commit is contained in:
parent
acc1df2031
commit
36aafb9246
1 changed files with 21 additions and 0 deletions
|
@ -6,6 +6,8 @@
|
||||||
* @license Apache-2.0
|
* @license Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
const utils = require("./browserUtils.js");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
before: browser => {
|
before: browser => {
|
||||||
browser
|
browser
|
||||||
|
@ -221,6 +223,25 @@ module.exports = {
|
||||||
.waitForElementVisible("//ul[@id='search-results']//b[text()='MD5']", 1000);
|
.waitForElementVisible("//ul[@id='search-results']//b[text()='MD5']", 1000);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"Alert bar": browser => {
|
||||||
|
// Bake nothing to create an empty output which can be copied
|
||||||
|
utils.clear(browser);
|
||||||
|
utils.bake(browser);
|
||||||
|
|
||||||
|
// Alert bar shows and contains correct content
|
||||||
|
browser
|
||||||
|
.click("#copy-output")
|
||||||
|
.waitForElementVisible("#snackbar-container")
|
||||||
|
.waitForElementVisible("#snackbar-container .snackbar-content")
|
||||||
|
.expect.element("#snackbar-container .snackbar-content").text.to.equal("Copied raw output successfully.");
|
||||||
|
|
||||||
|
// Alert bar disappears after the correct amount of time
|
||||||
|
// Should disappear after 2000ms
|
||||||
|
browser
|
||||||
|
.waitForElementNotPresent("#snackbar-container .snackbar-content", 2500)
|
||||||
|
.waitForElementNotVisible("#snackbar-container");
|
||||||
|
},
|
||||||
|
|
||||||
after: browser => {
|
after: browser => {
|
||||||
browser.end();
|
browser.end();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue