This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
142 additions
and
15 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ services: | |
- 4444:4444 | ||
- 7900:7900 | ||
shm_size: 4g | ||
environment: | ||
VNC_NO_PASSWORD: 1 | ||
dns: | ||
- ${DNS1} | ||
- ${DNS2} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
const { reusable } = require("./isAadErrorPage") | ||
const isAadErrorPage = require("./isAadErrorPage") | ||
|
||
exports.assertion = function () { | ||
reusable(this, "AADSTS50105") | ||
const reusable = function (context) { | ||
isAadErrorPage.reusable("AADSTS50105", context) | ||
} | ||
|
||
const assertion = function () { | ||
reusable(this) | ||
}; | ||
|
||
module.exports = { | ||
reusable, | ||
assertion | ||
} |
39 changes: 39 additions & 0 deletions
39
nightwatch/assertions/isCloudflarePermissionRejectedPage.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const reusable = function (context) { | ||
context.formatMessage = () => { | ||
const message = `Checking if the page ${this.negate ? 'doesn\'t indicate' : 'indicates'} cloudflare permission rejected`; | ||
|
||
return { | ||
message, | ||
args: [] | ||
} | ||
}; | ||
|
||
context.expected = () => { | ||
return "That account does not have access." | ||
} | ||
|
||
context.value = function (result) { | ||
return result.value; | ||
}; | ||
|
||
context.failure = function (result) { | ||
return !result; | ||
}; | ||
|
||
context.evaluate = function (value) { | ||
return value && value.startsWith(this.expected()) | ||
}; | ||
|
||
context.command = async function (callback) { | ||
this.api.getText("div.AuthBox-messages", callback) | ||
}; | ||
}; | ||
|
||
const assertion = function () { | ||
reusable(this) | ||
}; | ||
|
||
module.exports = { | ||
reusable, | ||
assertion | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const isAadPermissionRejectedPage = require("./isAadPermissionRejectedPage") | ||
const isCloudflarePermissionRejectedPage = require("./isCloudflarePermissionRejectedPage") | ||
|
||
exports.assertion = function () { | ||
if (this.__nightwatchInstance.settings.globals.isRemote) { | ||
isCloudflarePermissionRejectedPage.reusable(this) | ||
} else { | ||
isAadPermissionRejectedPage.reusable(this) | ||
} | ||
} |
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
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
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
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