Skip to content

Commit 8ca4f52

Browse files
committed
browser-repl tests using testing library
1 parent 2e85187 commit 8ca4f52

File tree

5 files changed

+791
-20
lines changed

5 files changed

+791
-20
lines changed

package-lock.json

Lines changed: 191 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/browser-repl/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@
7777
"@mongodb-js/prettier-config-devtools": "^1.0.1",
7878
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
7979
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.8",
80+
"@testing-library/dom": "^8.20.1",
81+
"@testing-library/react": "^12.1.5",
82+
"@testing-library/user-event": "^13.5.0",
8083
"@types/numeral": "^2.0.2",
8184
"@types/react": "^16.9.17",
8285
"@types/react-dom": "^18.0.8",

packages/browser-repl/src/components/password-prompt.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ export class PasswordPrompt extends Component<PasswordPromptProps> {
3939

4040
render(): JSX.Element {
4141
return (
42-
<label id="password-promt-label" className={passwordPrompt}>
42+
<label id="password-prompt-label" className={passwordPrompt}>
4343
{this.props.prompt}:&nbsp;
4444
<TextInput
45-
aria-labelledby="password-promt-label"
45+
data-testid="password-prompt"
46+
aria-labelledby="password-prompt-label"
4647
type="password"
4748
onKeyDown={this.onKeyDown}
4849
className={passwordPropmtInputStyles}

0 commit comments

Comments
 (0)