-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dia 05: refatorando constantes dos testes
- Loading branch information
1 parent
a4c1def
commit 7eda224
Showing
5 changed files
with
82 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
const NOTIFICATION_DISPLAY_LETTER_SUCCESSFULLY = 'Showing letter with success' | ||
const NOTIFICATION_BACKSPACE_KEY_PRESSED = 'Backspace key pressed' | ||
const NOTIFICATION_BACKSPACE_WHEN_EMPTY_GUESS = 'Could not erase when is an empty guess' | ||
const NOTIFICATION_EMPTY_GUESS = 'Empty guess' | ||
const NOTIFICATION_ENTER_KEY_PRESSED = 'Enter key pressed' | ||
const NOTIFICATION_INCOMPLETE_GUESS = 'Incomplete guess' | ||
const NOTIFICATION_INVALID_PRESSED_KEY = 'Invalid Pressed Key' | ||
const NOTIFICATION_REACH_MAX_ATTEMPTS = 'Reach Max Attempts' | ||
const NOTIFICATION_REACH_MAX_LETTERS_PER_ROW = 'Reach Max letter per row' | ||
const NOTIFICATION_WORD_NOT_IN_DATABASE = 'Word not in database' | ||
const NOTIFICATION_GAME_OVER_GUESS_RIGHT = 'You guessed right! Game over!' | ||
|
||
const GREEN_COLOR_RGB = 'rgb(83, 141, 78)' | ||
const GRAY_COLOR_RGB = 'rgb(88, 88, 88)' | ||
const YELLOW_COLOR_RGB = 'rgb(181, 159, 59)' | ||
|
||
const KEY_BACKSPACE = 'Backspace' | ||
const KEY_ENTER = 'Enter' | ||
const KEY_DELETE = 'Delete' | ||
|
||
module.exports = { | ||
NOTIFICATION_DISPLAY_LETTER_SUCCESSFULLY, | ||
NOTIFICATION_BACKSPACE_KEY_PRESSED, | ||
NOTIFICATION_BACKSPACE_WHEN_EMPTY_GUESS, | ||
NOTIFICATION_EMPTY_GUESS, | ||
NOTIFICATION_ENTER_KEY_PRESSED, | ||
NOTIFICATION_INCOMPLETE_GUESS, | ||
NOTIFICATION_INVALID_PRESSED_KEY, | ||
NOTIFICATION_REACH_MAX_ATTEMPTS, | ||
NOTIFICATION_REACH_MAX_LETTERS_PER_ROW, | ||
NOTIFICATION_WORD_NOT_IN_DATABASE, | ||
NOTIFICATION_GAME_OVER_GUESS_RIGHT, | ||
GREEN_COLOR_RGB, | ||
GRAY_COLOR_RGB, | ||
YELLOW_COLOR_RGB, | ||
KEY_BACKSPACE, | ||
KEY_ENTER, | ||
KEY_DELETE, | ||
} |
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,7 @@ | ||
const getGameBoardLetter = (index) => { | ||
return global.document.querySelector(`.letter-${index}`).style.backgroundColor | ||
} | ||
|
||
module.exports = { | ||
getGameBoardLetter | ||
} |
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