test(BRIDGE-136): Download Bridge
This commit is contained in:
committed by
Gordana Zafirova
parent
cf9b35163a
commit
fd709b0d08
@ -33,7 +33,7 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
_homeResult.CheckIfLoggedIn();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Test, Category("TemporarilyExcluded")]
|
||||
public void OpenGoToHelpTopics()
|
||||
{
|
||||
_loginWindow.SignIn(TestUserData.GetPaidUser());
|
||||
@ -46,7 +46,7 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
_helpMenuWindow.ClickBackFromHelpMenu();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Test, Category("TemporarilyExcluded")]
|
||||
public void CheckForUpdates()
|
||||
{
|
||||
_loginWindow.SignIn(TestUserData.GetPaidUser());
|
||||
@ -58,7 +58,7 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
Wait.UntilInputIsProcessed(TimeSpan.FromSeconds(1));
|
||||
_helpMenuWindow.ClickBackFromHelpMenu();
|
||||
}
|
||||
[Test]
|
||||
[Test, Category("TemporarilyExcluded")]
|
||||
public void OpenLogs()
|
||||
{
|
||||
_loginWindow.SignIn(TestUserData.GetPaidUser());
|
||||
@ -134,7 +134,7 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
[TearDown]
|
||||
public void TestCleanup()
|
||||
{
|
||||
_mainWindow.RemoveAccount();
|
||||
_mainWindow.RemoveAccountTestCleanup();
|
||||
ClientCleanup();
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,25 +3,39 @@ using ProtonMailBridge.UI.Tests.TestsHelper;
|
||||
using ProtonMailBridge.UI.Tests.Windows;
|
||||
using ProtonMailBridge.UI.Tests.Results;
|
||||
using FlaUI.Core.Input;
|
||||
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
|
||||
|
||||
namespace ProtonMailBridge.UI.Tests.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
[Category("LoginLogoutTests")]
|
||||
public class LoginLogoutTests : TestSession
|
||||
{
|
||||
private readonly LoginWindow _loginWindow = new();
|
||||
private readonly HomeWindow _mainWindow = new();
|
||||
private readonly HomeResult _homeResult = new();
|
||||
private readonly string FreeAccountErrorText = "Bridge is exclusive to our mail paid plans. Upgrade your account to use Bridge.";
|
||||
private bool removeAccount = true;
|
||||
|
||||
[Test]
|
||||
[Category("NOOP")]
|
||||
public void Noop()
|
||||
{
|
||||
TestContext.Out.WriteLine("NoOP");
|
||||
removeAccount = false;
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("DebugTests")]
|
||||
public void LoginAsFreeUser()
|
||||
{
|
||||
_loginWindow.SignIn(TestUserData.GetFreeUser());
|
||||
_homeResult.CheckIfFreeAccountErrorIsDisplayed(FreeAccountErrorText);
|
||||
removeAccount = false;
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("DebugTests")]
|
||||
public void LoginAsPaidUser()
|
||||
{
|
||||
_loginWindow.SignIn(TestUserData.GetPaidUser());
|
||||
@ -46,13 +60,8 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
[Test]
|
||||
public void AddAliasAddress()
|
||||
{
|
||||
_loginWindow.SignIn(TestUserData.GetPaidUser());
|
||||
_homeResult.CheckIfLoggedIn();
|
||||
_mainWindow.AddNewAccount();
|
||||
_loginWindow.SignIn(TestUserData.GetAliasUser());
|
||||
_homeResult.CheckIfAccountAlreadySignedInIsDisplayed();
|
||||
_homeResult.ClickOkToAcknowledgeAccountAlreadySignedIn();
|
||||
_loginWindow.ClickCancelToSignIn();
|
||||
_homeResult.CheckIfLoggedIn();
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -83,6 +92,7 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
_loginWindow.SignIn(TestUserData.GetIncorrectCredentialsUser());
|
||||
_homeResult.CheckIfIncorrectCredentialsErrorIsDisplayed();
|
||||
_loginWindow.ClickCancelToSignIn();
|
||||
removeAccount = false;
|
||||
}
|
||||
|
||||
[Test, Order (1)]
|
||||
@ -91,8 +101,7 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
_loginWindow.SignIn(TestUserData.GetEmptyCredentialsUser());
|
||||
_homeResult.CheckIfEnterUsernameAndEnterPasswordErrorMsgsAreDisplayed();
|
||||
_loginWindow.ClickCancelToSignIn();
|
||||
_loginWindow.SignIn(TestUserData.GetPaidUser());
|
||||
_homeResult.CheckIfLoggedIn();
|
||||
removeAccount = false;
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -114,14 +123,7 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
_loginWindow.SignIn(TestUserData.GetDisabledUser());
|
||||
_homeResult.CheckIfDsabledAccountErrorIsDisplayed();
|
||||
_loginWindow.ClickCancelToSignIn();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AddDeliquentAccount()
|
||||
{
|
||||
_loginWindow.SignIn(TestUserData.GetDeliquentUser());
|
||||
_homeResult.CheckIfDelinquentAccountErrorIsDisplayed();
|
||||
_loginWindow.ClickCancelToSignIn();
|
||||
removeAccount = false;
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -143,14 +145,18 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
|
||||
[SetUp]
|
||||
public void TestInitialize()
|
||||
{
|
||||
{
|
||||
LaunchApp();
|
||||
Thread.Sleep(5000);
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TestCleanup()
|
||||
{
|
||||
_mainWindow.RemoveAccount();
|
||||
if (removeAccount)
|
||||
{
|
||||
_mainWindow.RemoveAccountTestCleanup();
|
||||
}
|
||||
ClientCleanup();
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ using FlaUI.UIA3;
|
||||
namespace ProtonMailBridge.UI.Tests.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
[Category("SettingsMenuTests")]
|
||||
public class SettingsMenuTests : TestSession
|
||||
{
|
||||
private readonly LoginWindow _loginWindow = new();
|
||||
@ -175,7 +176,6 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
_settingsMenuWindow.ClickSettingsButton();
|
||||
_settingsMenuWindow.ExpandAdvancedSettings();
|
||||
Mouse.Scroll(-20);
|
||||
//Thread.Sleep(3000);
|
||||
_settingsMenuResults.CollectUsageDiagnosticsIsEnabledByDefault();
|
||||
Mouse.Scroll(20);
|
||||
_settingsMenuWindow.CollapseAdvancedSettings();
|
||||
@ -189,8 +189,10 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
_settingsMenuWindow.ClickSettingsButton();
|
||||
_settingsMenuWindow.ExpandAdvancedSettings();
|
||||
Mouse.Scroll(-20);
|
||||
Thread.Sleep(5000);
|
||||
_settingsMenuWindow.DisableAndEnableCollectUsageDiagnostics();
|
||||
Mouse.Scroll(20);
|
||||
Thread.Sleep(5000);
|
||||
_settingsMenuWindow.CollapseAdvancedSettings();
|
||||
_settingsMenuWindow.ClickBackFromSettingsMenu();
|
||||
}
|
||||
@ -270,7 +272,7 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
_settingsMenuWindow.ClickBackFromSettingsMenu();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Test, Category("TemporarilyExcluded")]
|
||||
public void ChangeLocationSwitchBackToDefaultAndDeleteOldLocalCacheLocation()
|
||||
{
|
||||
_loginWindow.SignIn(TestUserData.GetPaidUser());
|
||||
@ -284,7 +286,7 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
_settingsMenuWindow.ClickBackFromSettingsMenu();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Test, Category("TemporarilyExcluded")]
|
||||
public void ExportTlsCertificatesVerifyExportAndDeleteTheExportFolder()
|
||||
{
|
||||
_loginWindow.SignIn(TestUserData.GetPaidUser());
|
||||
@ -325,7 +327,15 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
[TearDown]
|
||||
public void TestCleanup()
|
||||
{
|
||||
_mainWindow.RemoveAccount();
|
||||
try
|
||||
{
|
||||
_mainWindow.RemoveAccountTestCleanup();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TestContext.Out.WriteLine("Teardown error on test account cleanup: " + ex);
|
||||
}
|
||||
|
||||
ClientCleanup();
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,8 +26,7 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
LaunchApp();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("ZeroPercentUpdateRollout")]
|
||||
[Test, Category("TemporarilyExcluded")]
|
||||
public void EnableBetaAccessVerifyBetaIsEnabledVerifyNotificationAndRestartBridge()
|
||||
{
|
||||
_zeroPercentWindow.ClickStartSetupButton();
|
||||
@ -52,6 +51,7 @@ namespace ProtonMailBridge.UI.Tests.Tests
|
||||
public void TestCleanup()
|
||||
{
|
||||
ClientCleanup();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user