Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
paula-stacho committed Jul 18, 2024
1 parent f2e3da0 commit e50f093
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function Connections({
<ConnectionForm
onConnectClicked={onConnectClick}
key={activeConnectionId}
onSaveConnectionClicked={saveConnection}
onSaveClicked={saveConnection}
initialConnectionInfo={activeConnectionInfo}
connectionErrorMessage={connectionErrorMessage}
preferences={preferences}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import sinon from 'sinon';
import { ConnectionFormModalActions } from './connection-form-actions';

describe('<ConnectionFormModalActions />', function () {
describe.only('Connect Button', function () {
describe('Connect Button', function () {
it('should call onSave function', function () {
const onSaveSpy = sinon.spy();
render(
Expand Down
14 changes: 7 additions & 7 deletions packages/connection-form/src/components/connection-form.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('ConnectionForm Component', function () {
'mongodb://pineapple:orangutans@localhost:27019',
},
}}
onSaveConnectionClicked={noop}
onSaveClicked={noop}
{...props}
/>
</PreferencesProvider>
Expand Down Expand Up @@ -264,7 +264,7 @@ describe('ConnectionForm Component', function () {
connectionString: 'pineapples',
},
}}
onSaveConnectionClicked={noop}
onSaveClicked={noop}
/>
);
expect(screen.getByText('Invalid connection string "pineapples"')).to.be
Expand All @@ -281,7 +281,7 @@ describe('ConnectionForm Component', function () {
connectionString: 'pineapples',
},
}}
onSaveConnectionClicked={noop}
onSaveClicked={noop}
/>
);
expect(screen.getByText(favoriteText).closest('button')).to.be.visible;
Expand All @@ -297,7 +297,7 @@ describe('ConnectionForm Component', function () {
connectionString: 'pineapples',
},
}}
onSaveConnectionClicked={noop}
onSaveClicked={noop}
/>
);

Expand All @@ -321,7 +321,7 @@ describe('ConnectionForm Component', function () {
connectionString: 'mongodb://localhost:27017',
},
}}
onSaveConnectionClicked={noop}
onSaveClicked={noop}
/>
);

Expand All @@ -338,7 +338,7 @@ describe('ConnectionForm Component', function () {
connectionString: 'pineapples',
},
}}
onSaveConnectionClicked={noop}
onSaveClicked={noop}
/>
);

Expand Down Expand Up @@ -369,7 +369,7 @@ describe('ConnectionForm Component', function () {
name: 'foo',
},
}}
onSaveConnectionClicked={noop}
onSaveClicked={noop}
/>
);

Expand Down
6 changes: 3 additions & 3 deletions packages/connection-form/src/components/connection-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ type ConnectionFormPropsWithoutPreferences = {
initialConnectionInfo: ConnectionInfo;
connectionErrorMessage?: string | null;
onCancel?: () => void;
onConnectClicked: (connectionInfo: ConnectionInfo) => void;
onSaveAndConnectClicked: (connectionInfo: ConnectionInfo) => Promise<void>;
onConnectClicked?: (connectionInfo: ConnectionInfo) => void;
onSaveAndConnectClicked?: (connectionInfo: ConnectionInfo) => void;
onSaveClicked: (connectionInfo: ConnectionInfo) => Promise<void>;
onAdvancedOptionsToggle?: (newState: boolean) => void;
};
Expand Down Expand Up @@ -466,7 +466,7 @@ function ConnectionForm({
action === 'saveAndConnect'
? onSaveAndConnectClicked
: onConnectClicked;
callback({
callback?.({
...initialConnectionInfo,
...getConnectionInfoToSave(),
connectionOptions: updatedConnectionOptions,
Expand Down

0 comments on commit e50f093

Please sign in to comment.