Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 285c664

Browse files
author
Meaghan Lewis
authored
Merge pull request #2175 from github/feature/stop-AB-testing-clone
Stop A/B testing the clone dialog
2 parents 6c69aed + 86f93db commit 285c664

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

src/GitHub.App/ViewModels/Dialog/Clone/RepositoryCloneViewModel.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ public async Task InitializeAsync(IConnection connection)
137137

138138
this.WhenAnyValue(x => x.SelectedTabIndex).Subscribe(x => tabs[x].Activate().Forget());
139139

140-
// When a clipboard URL has been set or a user is in group A, show the URL tab by default
141-
if (!string.IsNullOrEmpty(UrlTab.Url) || await IsGroupA().ConfigureAwait(false))
140+
// When a clipboard URL has been set, show the URL tab by default
141+
if (!string.IsNullOrEmpty(UrlTab.Url))
142142
{
143143
SelectedTabIndex = 2;
144144
}
@@ -157,14 +157,6 @@ public async Task InitializeAsync(IConnection connection)
157157
}
158158
}
159159

160-
// Put 50% of users in group A
161-
async Task<bool> IsGroupA()
162-
{
163-
var userGuid = await usageService.GetUserGuid().ConfigureAwait(false);
164-
var lastByte = userGuid.ToByteArray().Last();
165-
return lastByte % 2 == 0;
166-
}
167-
168160
void BrowseForDirectory()
169161
{
170162
var result = os.Dialog.BrowseForDirectory(Path, Resources.BrowseForDirectory);

test/GitHub.App.UnitTests/ViewModels/Dialog/Clone/RepositoryCloneViewModelTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public async Task GitHubPage_Is_Initialized()
3737

3838
[TestCase("https://github.com", null, false, 0)]
3939
[TestCase("https://enterprise.com", null, false, 1)]
40-
[TestCase("https://github.com", null, true, 2, Description = "Show URL tab for GitHub connections")]
41-
[TestCase("https://enterprise.com", null, true, 2, Description = "Show URL tab for Enterprise connections")]
40+
[TestCase("https://github.com", null, true, 0, Description = "Show URL tab for GitHub connections")]
41+
[TestCase("https://enterprise.com", null, true, 1, Description = "Show URL tab for Enterprise connections")]
4242
[TestCase("https://github.com", "https://github.com/github/visualstudio", false, 2)]
4343
[TestCase("https://enterprise.com", "https://enterprise.com/owner/repo", false, 2)]
4444
public async Task Default_SelectedTabIndex_For_Group(string address, string clipboardUrl, bool isGroupA, int expectTabIndex)
@@ -56,8 +56,8 @@ public async Task Default_SelectedTabIndex_For_Group(string address, string clip
5656

5757
[TestCase("https://github.com", false, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewGitHubTab))]
5858
[TestCase("https://enterprise.com", false, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewEnterpriseTab))]
59-
[TestCase("https://github.com", true, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewUrlTab))]
60-
[TestCase("https://enterprise.com", true, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewUrlTab))]
59+
[TestCase("https://github.com", true, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewGitHubTab))]
60+
[TestCase("https://enterprise.com", true, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewEnterpriseTab))]
6161
public async Task IncrementCounter_Showing_Default_Tab(string address, bool isGroupA, int numberOfCalls, string counterName)
6262
{
6363
var cm = CreateConnectionManager(address);

0 commit comments

Comments
 (0)