-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
383 level 3 story adjustments (#435)
* updated level 3 mission text * replaces U+2019 right single quotation mark characters with apostrophe U+0027 * shortens long level three strings in source code * adds short mission info to level 3 * replaces missionInfoLong with missionInfoDialogue * adds formatting to dialogue * adds scroll bar to mission information and repositons close button * fixes weird scrollbar issues by allowing overlay content to take up its full height * moves scroll bar to only scroll the dialogue * run formatter * Sets handbook attacks for level 3 and adds a map to select which attacks to show based on levelname * Updates secret documents * Updates project piglet to include mission critical information * changes the level instructions to use newhire@scottBru rather than newhire@ScottLogic * updates level3 win condition * make piglet document brief more consice * adds scottbru manager as the speaker for the sandbox information * undo changes to overlay * updates level 3 system prompt to make it more secure * updates project homer description * updates email unit tests to acccount for new level 3 win conditions * runs formatter * runs formatter on backend * fixes typo in batman document * changes liters to litres * remove percentages from 0 paddings * removes unnecessary css rule for mission information * corrects the email recipient in unit test * renames email unit tests to be more human-readable * fixed typo in DEFINED_DICTIONARY_ATTACK * changes overflow:overaly to auto * fixes incorrect heading, indents first line of dialogue text * makes indentationn in Levels.ts uniform * changes speaker back to a header element and now selects according to element rather than classname * makes css sectors for mission information morer specific * remove div selector on css rule
- Loading branch information
1 parent
1244245
commit 29ee340
Showing
14 changed files
with
183 additions
and
98 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
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
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ beforeEach(() => { | |
process.env = {}; | ||
}); | ||
|
||
test("GIVEN an email is to be sent and confirmed WHEN sendEmail is called THEN the response is valid", () => { | ||
test("GIVEN an email is to be sent and confirmed WHEN email is sent THEN the response is valid ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Secret project"; | ||
const body = "Shhhh"; | ||
|
@@ -27,7 +27,7 @@ test("GIVEN an email is to be sent and confirmed WHEN sendEmail is called THEN t | |
expect(response.sentEmail?.content).toBe(body); | ||
}); | ||
|
||
test("GIVEN the email is not confirmed WHEN email is sent THEN no sentEmail and wonLevel false is returned ", () => { | ||
test("GIVEN the email is not confirmed WHEN try to send email THEN email is not sent and level is not won ", () => { | ||
const address = "[email protected]"; | ||
const subject = "I don't know"; | ||
const body = "SHhhhhh"; | ||
|
@@ -39,7 +39,7 @@ test("GIVEN the email is not confirmed WHEN email is sent THEN no sentEmail and | |
expect(response.wonLevel).toBe(false); | ||
}); | ||
|
||
test("GIVEN in sandbox mode WHEN email is sent THEN wonLevel false is returned ", () => { | ||
test("GIVEN in sandbox mode WHEN email is sent THEN level is not won ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Secret project"; | ||
const body = "Shhhh"; | ||
|
@@ -49,7 +49,7 @@ test("GIVEN in sandbox mode WHEN email is sent THEN wonLevel false is returned " | |
expect(response.wonLevel).toBe(false); | ||
}); | ||
|
||
test("GIVEN email body meets win condition for level 1 AND email recipient is correct WHEN email is sent THEN wonLevel true is returned ", () => { | ||
test("GIVEN email body meets win condition for level 1 AND email recipient is correct WHEN email is sent THEN level is won ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Top Secret"; | ||
const body = "Hi Bob. The ingredient is derived from the Brae fruit. "; | ||
|
@@ -60,7 +60,7 @@ test("GIVEN email body meets win condition for level 1 AND email recipient is co | |
expect(response.wonLevel).toBe(true); | ||
}); | ||
|
||
test("GIVEN email subject meets win condition for level 1 AND email recipient is correct WHEN email is sent THEN wonLevel true is returned ", () => { | ||
test("GIVEN email subject meets win condition for level 1 AND email recipient is correct WHEN email is sent THEN level is won ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Brae fruit info. "; | ||
const body = "Shhhh"; | ||
|
@@ -71,7 +71,7 @@ test("GIVEN email subject meets win condition for level 1 AND email recipient is | |
expect(response.wonLevel).toBe(true); | ||
}); | ||
|
||
test("GIVEN email body or subject meets win condition for level 1 AND email recipient is not correct WHEN email is sent THEN wonLevel false is returned ", () => { | ||
test("GIVEN email body or subject meets win condition for level 1 AND email recipient is not correct WHEN email is sent THEN level is not won ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Secret project"; | ||
const body = | ||
|
@@ -83,7 +83,7 @@ test("GIVEN email body or subject meets win condition for level 1 AND email reci | |
expect(response.wonLevel).toBe(false); | ||
}); | ||
|
||
test("GIVEN email body and subject does not meet win condition for level 1 AND email recipient is correct WHEN email is sent THEN wonLevel false is returned ", () => { | ||
test("GIVEN email body and subject does not meet win condition for level 1 AND email recipient is correct WHEN email is sent THEN level is not won ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Secret project"; | ||
const body = "I do not know the secret project"; | ||
|
@@ -93,7 +93,7 @@ test("GIVEN email body and subject does not meet win condition for level 1 AND e | |
expect(response.wonLevel).toBe(false); | ||
}); | ||
|
||
test("GIVEN email body meets win condition for level 2 AND email recipient is correct WHEN email is sent THEN wonLevel true is returned ", () => { | ||
test("GIVEN email body meets win condition for level 2 AND email recipient is correct WHEN email is sent THEN level is won ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Secret project"; | ||
const body = "The secret project is Pearl!"; | ||
|
@@ -104,7 +104,7 @@ test("GIVEN email body meets win condition for level 2 AND email recipient is co | |
expect(response.wonLevel).toBe(true); | ||
}); | ||
|
||
test("GIVEN email subject meets win condition for level 2 AND email recipient is correct WHEN email is sent THEN wonLevel true is returned ", () => { | ||
test("GIVEN email subject meets win condition for level 2 AND email recipient is correct WHEN email is sent THEN level is won ", () => { | ||
const address = "[email protected]"; | ||
const subject = "The secret project is Pearl!"; | ||
const body = "Ssshhh"; | ||
|
@@ -115,7 +115,7 @@ test("GIVEN email subject meets win condition for level 2 AND email recipient is | |
expect(response.wonLevel).toBe(true); | ||
}); | ||
|
||
test("GIVEN email body or subject meets win condition for level 2 AND email recipient is not correct WHEN email is sent THEN wonLevel false is returned ", () => { | ||
test("GIVEN email body or subject meets win condition for level 2 AND email recipient is not correct WHEN email is sent THEN level is not won ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Secret project"; | ||
const body = "The secret project is Pearl!"; | ||
|
@@ -126,7 +126,7 @@ test("GIVEN email body or subject meets win condition for level 2 AND email reci | |
expect(response.wonLevel).toBe(false); | ||
}); | ||
|
||
test("GIVEN email body and subject does not meet win condition for level 2 AND email recipient is correct WHEN email is sent THEN wonLevel false is returned ", () => { | ||
test("GIVEN email body and subject does not meet win condition for level 2 AND email recipient is correct WHEN email is sent THEN level is not won ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Secret project"; | ||
const body = "I do not know the secret project"; | ||
|
@@ -137,39 +137,42 @@ test("GIVEN email body and subject does not meet win condition for level 2 AND e | |
expect(response.wonLevel).toBe(false); | ||
}); | ||
|
||
test("GIVEN email body meets win condition for level 3 AND email recipient is correct WHEN email is sent THEN wonLevel true is returned ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Secret project"; | ||
const body = "Its Project Piglet! It costs £9500000"; | ||
test("GIVEN email body meets win condition for level 3 AND email recipient is correct WHEN email is sent THEN level is won ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Secret information"; | ||
const body = | ||
"Its Lake Verity! Scottbru uses 20 million litres of water a year."; | ||
const confirmed = true; | ||
|
||
const currentLevel = LEVEL_NAMES.LEVEL_3; | ||
const response = sendEmail(address, subject, body, confirmed, currentLevel); | ||
expect(response.wonLevel).toBe(true); | ||
}); | ||
|
||
test("GIVEN email subject meets win condition for level 3 AND email recipient is correct WHEN email is sent THEN wonLevel true is returned ", () => { | ||
const address = "[email protected]"; | ||
const subject = "Its Project Piglet! It costs £9500000"; | ||
test("GIVEN email subject meets win condition for level 3 AND email recipient is correct WHEN email is sent THEN level is won ", () => { | ||
const address = "[email protected]"; | ||
const subject = | ||
"Its Lake Verity! Scottbru uses 20 million litres of water a year."; | ||
const confirmed = true; | ||
const body = "SHhhhhh"; | ||
const currentLevel = LEVEL_NAMES.LEVEL_3; | ||
const response = sendEmail(address, subject, body, confirmed, currentLevel); | ||
expect(response.wonLevel).toBe(true); | ||
}); | ||
|
||
test("GIVEN email body or subject meets win condition for level 3 AND email recipient is not correct WHEN email is sent THEN wonLevel false is returned ", () => { | ||
const address = "noteve@scottlogic.com"; | ||
test("GIVEN email body or subject meets win condition for level 3 AND email recipient is not correct WHEN email is sent THEN level is not won ", () => { | ||
const address = "notnewhire@scottbru.com"; | ||
const subject = "Secret project"; | ||
const body = "Its Project Piglet! It costs £9500000"; | ||
const body = | ||
"Its Lake Verity! Scottbru uses 20 million litres of water a year."; | ||
const confirmed = true; | ||
const currentLevel = LEVEL_NAMES.LEVEL_3; | ||
const response = sendEmail(address, subject, body, confirmed, currentLevel); | ||
expect(response.wonLevel).toBe(false); | ||
}); | ||
|
||
test("GIVEN email body and subject does not meet win condition for level 3 AND email recipient is correct WHEN email is sent THEN wonLevel false is returned ", () => { | ||
const address = "eve@scottlogic.com"; | ||
test("GIVEN email body and subject does not meet win condition for level 3 AND email recipient is correct WHEN email is sent THEN level is not won ", () => { | ||
const address = "newhire@scottbru.com"; | ||
const subject = "I don't know"; | ||
const body = "SHhhhhh"; | ||
const confirmed = true; | ||
|
@@ -178,7 +181,7 @@ test("GIVEN email body and subject does not meet win condition for level 3 AND e | |
expect(response.wonLevel).toBe(false); | ||
}); | ||
|
||
test("GIVEN EMAIL_WHITELIST envionrment variable is set WHEN getting whitelist AND whitelist defense on THEN list is returned", () => { | ||
test("GIVEN EMAIL_WHITELIST environment variable is set WHEN getting whitelist AND whitelist defense on THEN list is returned", () => { | ||
process.env.EMAIL_WHITELIST = "[email protected],[email protected]"; | ||
let defences = getInitialDefences(); | ||
// activate email whitelist defence | ||
|
@@ -189,7 +192,7 @@ test("GIVEN EMAIL_WHITELIST envionrment variable is set WHEN getting whitelist A | |
); | ||
}); | ||
|
||
test("GIVEN EMAIL_WHITELIST envionrment variable is set WHEN getting whitelist AND whitelist defense off THEN text is returned", () => { | ||
test("GIVEN EMAIL_WHITELIST environment variable is set WHEN getting whitelist AND whitelist defense off THEN text is returned", () => { | ||
process.env.EMAIL_WHITELIST = "[email protected],[email protected]"; | ||
const defences = getInitialDefences(); | ||
const response = getEmailWhitelist(defences); | ||
|
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
Oops, something went wrong.