Skip to content

Commit c99be0b

Browse files
author
Mindaugas Veblauskas
committed
Merge branch 'release/3.1.1'
2 parents 9e73ea4 + d58c126 commit c99be0b

File tree

83 files changed

+1345
-781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1345
-781
lines changed

.gitlab-ci-templates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
when: always
1919
name: "result-ui"
2020
paths:
21-
- $SCREENSHOT_PATH
21+
- $TEST_ARTIFACT_PATH
2222
expire_in: 1 weeks
2323

2424
.build-script:

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ include:
1111

1212
variables:
1313
PUBLIC_REPO_URL: [email protected]:ProtonVPN/win-app.git
14-
SCREENSHOT_PATH: src/bin/TestFailureData/
14+
TEST_ARTIFACT_PATH: src/bin/TestArtifactData/
1515
TEST_REPORT_PATH: results/
1616
PROJECT_ID: "13"
1717
MILESTONE: "Windows"
@@ -77,7 +77,7 @@ tests:
7777
- cmd.exe /c BuildDependencies.bat bin gosrponly
7878
- dotnet restore ProtonVpn.sln
7979
- dotnet build ProtonVpn.sln
80-
- coverlet src\bin --target "dotnet" --targetargs "test ProtonVpn.sln -l ""console;verbosity=normal"" --filter ""TestCategory!=UI&TestCategory!=Connection"" --no-restore --no-build" --format cobertura --output .\coverage-reports --exclude "[*.Tests*]*" --exclude "[ProtonVPN.MarkupValidator]*" --exclude "[TestTools*]*" --exclude "[*.Installers]*"
80+
- coverlet src\bin --target "dotnet" --targetargs "test ProtonVpn.sln -l ""console;verbosity=normal"" --filter ""TestCategory!=UI&TestCategory!=Connection&TestCategory!=Performance"" --no-restore --no-build" --format cobertura --output .\coverage-reports --exclude "[*.Tests*]*" --exclude "[ProtonVPN.MarkupValidator]*" --exclude "[TestTools*]*" --exclude "[*.Installers]*"
8181
- powershell -Command "(gc coverage-reports.cobertura.xml) -replace '\\', '/' | Out-File -encoding UTF8 cobertura.xml"
8282
- ReportGenerator.exe "-reports:cobertura.xml" "-targetdir:.\code-coverage-report-html"
8383
artifacts:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
$response = Invoke-RestMethod -Uri "https://protonvpn.com/download/windows-releases.json"
2+
$documentsFolderPath = [Environment]::GetFolderPath("MyDocuments")
3+
$installersFolderPath = Join-Path $documentsFolderPath "Installers"
4+
5+
if (-not (Test-Path -Path $installersFolderPath -PathType Container)) {
6+
New-Item -Path $installersFolderPath -ItemType Directory
7+
}
8+
9+
$mostRecentStableVersion = $response.Categories | Where-Object { $_.Name -eq "Stable" } |
10+
Select-Object -ExpandProperty Releases |
11+
Sort-Object { [version]::Parse($_.Version) } -Descending |
12+
Select-Object -First 1
13+
14+
$mostRecentStableVersionUrl = $mostRecentStableVersion.File.Url
15+
$executableName = [System.IO.Path]::GetFileName($mostRecentStableVersionUrl)
16+
17+
$executablePath = Join-Path $installersFolderPath $executableName
18+
19+
if (-not (Test-Path -Path $executablePath)) {
20+
Invoke-WebRequest -Uri $mostRecentStableVersionUrl -OutFile $executablePath
21+
}
22+
23+
Start-Process -FilePath $executablePath -ArgumentList "/verysilent" -PassThru -Wait

ci/test-scripts/uninstall-app.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
$protonFolder = "C:\Program Files\Proton\VPN"
22
$protonUninstallExe = $protonFolder + "\unins000.exe"
3-
if (Test-Path -Path $protonFolder) {
3+
if(Test-Path -Path $protonUninstallExe) {
44
Start-Process -FilePath $protonUninstallExe -ArgumentList "/verysilent" -Wait -ErrorAction Ignore
5+
}
6+
if (Test-Path -Path $protonFolder) {
57
Remove-Item $protonFolder -Recurse -ErrorAction Ignore
68
}

src/Api/ProtonVPN.Api.Contracts/Events/EventResponse.cs

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/Api/ProtonVPN.Api.Contracts/IApiClient.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
using ProtonVPN.Api.Contracts.Auth;
2424
using ProtonVPN.Api.Contracts.Certificates;
2525
using ProtonVPN.Api.Contracts.Common;
26-
using ProtonVPN.Api.Contracts.Events;
2726
using ProtonVPN.Api.Contracts.Geographical;
2827
using ProtonVPN.Api.Contracts.Partners;
2928
using ProtonVPN.Api.Contracts.ReportAnIssue;
@@ -41,7 +40,6 @@ public interface IApiClient : IClientBase
4140
Task<ApiResponseResult<PhysicalServerWrapperResponse>> GetServerAsync(string serverId);
4241
Task<ApiResponseResult<VpnInfoWrapperResponse>> GetVpnInfoResponse();
4342
Task<ApiResponseResult<BaseResponse>> GetLogoutResponse();
44-
Task<ApiResponseResult<EventResponse>> GetEventResponse(string lastId = default);
4543
Task<ApiResponseResult<ServersResponse>> GetServersAsync(string ip);
4644
Task<ApiResponseResult<ReportAnIssueFormResponse>> GetReportAnIssueFormData();
4745
Task<ApiResponseResult<ServersResponse>> GetServerLoadsAsync(string ip);

src/Api/ProtonVPN.Api.Contracts/Servers/LogicalServerResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class LogicalServerResponse
3333
public string ExitCountry { get; set; }
3434
public string Domain { get; set; }
3535
public sbyte Tier { get; set; }
36-
public sbyte Features { get; set; }
36+
public ulong Features { get; set; }
3737
public LocationResponse LocationResponse { get; set; }
3838
public sbyte Status { get; set; }
3939
public sbyte Load { get; set; }

src/Api/ProtonVPN.Api/ApiClient.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
using ProtonVPN.Api.Contracts.Auth;
2727
using ProtonVPN.Api.Contracts.Certificates;
2828
using ProtonVPN.Api.Contracts.Common;
29-
using ProtonVPN.Api.Contracts.Events;
3029
using ProtonVPN.Api.Contracts.Geographical;
3130
using ProtonVPN.Api.Contracts.Partners;
3231
using ProtonVPN.Api.Contracts.ReportAnIssue;
@@ -35,10 +34,10 @@
3534
using ProtonVPN.Api.Contracts.VpnConfig;
3635
using ProtonVPN.Api.Contracts.VpnSessions;
3736
using ProtonVPN.Common.Configuration;
38-
using ProtonVPN.Logging.Contracts;
39-
using ProtonVPN.Logging.Contracts.Events.ApiLogs;
4037
using ProtonVPN.Common.OS.Net.Http;
4138
using ProtonVPN.Core.Settings;
39+
using ProtonVPN.Logging.Contracts;
40+
using ProtonVPN.Logging.Contracts.Events.ApiLogs;
4241

4342
namespace ProtonVPN.Api
4443
{
@@ -95,13 +94,6 @@ public async Task<ApiResponseResult<BaseResponse>> GetLogoutResponse()
9594
return await SendRequest<BaseResponse>(request, "Logout");
9695
}
9796

98-
public async Task<ApiResponseResult<EventResponse>> GetEventResponse(string lastId)
99-
{
100-
string id = string.IsNullOrEmpty(lastId) ? "latest" : lastId;
101-
HttpRequestMessage request = GetAuthorizedRequest(HttpMethod.Get, "events/" + id);
102-
return await SendRequest<EventResponse>(request, "Get events");
103-
}
104-
10597
public async Task<ApiResponseResult<ServersResponse>> GetServersAsync(string ip)
10698
{
10799
HttpRequestMessage request = GetAuthorizedRequest(HttpMethod.Get,

src/GlobalAssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

17-
[assembly: AssemblyVersion("3.1.0.0")]
18-
[assembly: AssemblyFileVersion("3.1.0.0")]
17+
[assembly: AssemblyVersion("3.1.1.0")]
18+
[assembly: AssemblyFileVersion("3.1.1.0")]
1919
[assembly: ComVisible(false)]
2020
[assembly: AssemblyInformationalVersion("$AssemblyVersion")]
2121
[assembly: SupportedOSPlatform("windows")]

src/HumanVerification/ProtonVPN.HumanVerification.Gui/WebView.xaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
xmlns:gui="clr-namespace:ProtonVPN.HumanVerification.Gui"
99
d:DataContext="{d:DesignInstance gui:WebViewViewModel}"
1010
mc:Ignorable="d">
11-
<wpf:WebView2 DefaultBackgroundColor="Black"
12-
MinHeight="100"
11+
<wpf:WebView2 MinHeight="100"
12+
Width="370"
1313
Name="WebView2"
14-
Height="{Binding Height}">
14+
Height="{Binding Height}"
15+
DefaultBackgroundColor="#1C1B23">
1516
<wpf:WebView2.CreationProperties>
1617
<Binding RelativeSource="{RelativeSource Self}" Path="DataContext.WebView2CreationProperties" />
1718
</wpf:WebView2.CreationProperties>

0 commit comments

Comments
 (0)