Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TSLarson committed Sep 30, 2024
1 parent b5e2a7f commit 65045b4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ exports[`SignUpPane shows the Captcha pane 1`] = `
/>
<CaptchaPane
error={false}
flow="signup"
i18n={
{
"html": [Function],
Expand Down Expand Up @@ -241,6 +242,7 @@ exports[`SignUpPane shows the Captcha pane for SSO (ADFS) connections 1`] = `
/>
<CaptchaPane
error={false}
flow="signup"
i18n={
{
"html": [Function],
Expand Down
10 changes: 6 additions & 4 deletions src/__tests__/engine/classic/sign_up_pane.test.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React from 'react';
import { expectComponent, mockComponent } from 'testUtils';
import { expectShallowComponent } from '../../testUtils';
import { Flow } from '../../../connection/captcha';

jest.mock('field/email/email_pane', () => mockComponent('email_pane'));
jest.mock('field/password/password_pane', () => mockComponent('password_pane'));
jest.mock('field/username/username_pane', () => mockComponent('username_pane'));
jest.mock('field/custom_input', () => mockComponent('custom_input'));

jest.mock('core/index', () => ({
captcha: jest.fn()
signupCaptcha: jest.fn()
}));

jest.mock('engine/classic', () => ({
Expand Down Expand Up @@ -38,6 +39,7 @@ describe('SignUpPane', () => {
str: (...keys) => keys.join(','),
html: (...keys) => keys.join(',')
},
flow: Flow.SIGNUP,
model: 'model',
emailInputPlaceholder: 'emailInputPlaceholder',
onlyEmail: true,
Expand All @@ -58,7 +60,7 @@ describe('SignUpPane', () => {
});

it('shows the Captcha pane', () => {
require('core/index').captcha.mockReturnValue({
require('core/index').signupCaptcha.mockReturnValue({
get() {
return true;
}
Expand All @@ -72,7 +74,7 @@ describe('SignUpPane', () => {
});

it('hides the Captcha pane for SSO connections', () => {
require('core/index').captcha.mockReturnValue({
require('core/index').signupCaptcha.mockReturnValue({
get() {
return true;
}
Expand All @@ -86,7 +88,7 @@ describe('SignUpPane', () => {
});

it('shows the Captcha pane for SSO (ADFS) connections', () => {
require('core/index').captcha.mockReturnValue({
require('core/index').signupCaptcha.mockReturnValue({
get() {
return true;
}
Expand Down
2 changes: 0 additions & 2 deletions src/engine/classic/sign_up_screen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ const Component = ({ i18n, model }) => {
? 'databaseAlternativeSignUpInstructions'
: 'databaseSignUpInstructions';

console.log('this is in signupscreen banana we should be here')

const db = (l.hasSomeConnections(model, 'database') ||
l.hasSomeConnections(model, 'enterprise')) && (
<SignUpPane
Expand Down

0 comments on commit 65045b4

Please sign in to comment.