Skip to content

Commit 9a5876b

Browse files
authored
Changed Atlas links to https and adjused CTA copy (#259)
1 parent 26c254f commit 9a5876b

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

src/explorer/helpTree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export default class HelpTree implements vscode.TreeDataProvider<vscode.TreeItem
101101

102102
const atlas = new HelpLinkTreeItem(
103103
'Create Free Atlas Cluster',
104-
'http://mongodb.com/products/vs-code/vs-code-atlas-signup?utm_campaign=vs-code-extension&utm_source=visual-studio&utm_medium=product',
104+
'https://mongodb.com/products/vs-code/vs-code-atlas-signup?utm_campaign=vs-code-extension&utm_source=visual-studio&utm_medium=product',
105105
'freeClusterCTA',
106106
'atlas',
107107
true

src/test/suite/explorer/helpExplorer.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ suite('Help Explorer Test Suite', function () {
4444
assert(atlasHelpItem.label === 'Create Free Atlas Cluster');
4545
assert(
4646
atlasHelpItem.url ===
47-
'http://mongodb.com/products/vs-code/vs-code-atlas-signup?utm_campaign=vs-code-extension&utm_source=visual-studio&utm_medium=product'
47+
'https://mongodb.com/products/vs-code/vs-code-atlas-signup?utm_campaign=vs-code-extension&utm_source=visual-studio&utm_medium=product'
4848
);
4949
assert(atlasHelpItem.iconName === 'atlas');
5050
assert(atlasHelpItem.linkId === 'freeClusterCTA');
5151
assert(atlasHelpItem.useRedirect === true);
52+
// The assert below is a bit redundant but will prevent us from redirecting to a non-https URL by mistake
53+
assert(atlasHelpItem.url.startsWith('https://') === true);
5254
});
5355

5456
test('when a help item that does not require a redirect is clicked on it should open the url with vscode', async () => {

src/test/suite/views/webview-app/components/atlas-cta/atlas-cta.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ describe('Resources Panel Component Test Suite', () => {
5353
wrapper.find('a').at(1).simulate('click');
5454
assert(fakeVscodeWindowPostMessage.called);
5555
assert(fakeVscodeWindowPostMessage.firstCall.args[0].command === 'OPEN_TRUSTED_LINK');
56-
assert(fakeVscodeWindowPostMessage.firstCall.args[0].linkTo === 'http://mongodb.com/products/vs-code/vs-code-atlas-signup?utm_campaign=vs-code-extension&utm_source=visual-studio&utm_medium=product');
56+
assert(fakeVscodeWindowPostMessage.firstCall.args[0].linkTo === 'https://mongodb.com/products/vs-code/vs-code-atlas-signup?utm_campaign=vs-code-extension&utm_source=visual-studio&utm_medium=product');
57+
// The assert below is a bit redundant but will prevent us from redirecting to a non-https URL by mistake
58+
assert(fakeVscodeWindowPostMessage.firstCall.args[0].linkTo.startsWith('https://') === true);
5759
});
5860
});
5961
});

src/views/webview-app/components/atlas-cta/atlas-cta.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type DispatchProps = {
1919
class AtlasCTA extends React.Component<DispatchProps> {
2020
onAtlasCtaClicked = (): void => {
2121
this.props.openTrustedLink(
22-
'http://mongodb.com/products/vs-code/vs-code-atlas-signup?utm_campaign=vs-code-extension&utm_source=visual-studio&utm_medium=product'
22+
'https://mongodb.com/products/vs-code/vs-code-atlas-signup?utm_campaign=vs-code-extension&utm_source=visual-studio&utm_medium=product'
2323
);
2424

2525
this.onLinkClicked(
@@ -43,8 +43,7 @@ class AtlasCTA extends React.Component<DispatchProps> {
4343
<strong>New to MongoDB and don't have a cluster?</strong>
4444
</div>
4545
<div>
46-
If you don't already have a cluster you can create one for free
47-
using&nbsp;
46+
Create one for free using&nbsp;
4847
<a
4948
className={styles['atlas-cta-text-link']}
5049
target="_blank"

0 commit comments

Comments
 (0)