mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
Skip appium tests on non-windows
Already had no data, but it turns out that's an error for xunit.
This commit is contained in:
parent
9bdfd873a3
commit
b8f9066a07
@ -10,7 +10,7 @@ namespace NAPS2.App.Tests.Appium;
|
||||
[Collection("appium")]
|
||||
public class ImportAndSaveTests : AppiumTests
|
||||
{
|
||||
[VerifyTheory(AllowDebug = true)]
|
||||
[VerifyTheory(AllowDebug = true, WindowsAppium = true)]
|
||||
[ClassData(typeof(AppiumTestData))]
|
||||
public void ImportVariousAndSavePdfWithOcr(IAppTestTarget target)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ public class LanguageSelectionTests : AppiumTests
|
||||
{
|
||||
private static readonly HashSet<string> ExpectedMissingLanguages = new() { "bn", "hi", "id", "th", "ur" };
|
||||
|
||||
[VerifyTheory(AllowDebug = true)]
|
||||
[VerifyTheory(AllowDebug = true, WindowsAppium = true)]
|
||||
[ClassData(typeof(AppiumTestData))]
|
||||
public void OpenLanguageDropdown(IAppTestTarget target)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ public class ScanAndSaveTests : AppiumTests
|
||||
private const string WIA_DEVICE_NAME = "";
|
||||
private const string TWAIN_DEVICE_NAME = "";
|
||||
|
||||
[VerifyTheory(AllowDebug = true)]
|
||||
[VerifyTheory(AllowDebug = true, WindowsAppium = true)]
|
||||
[ClassData(typeof(AppiumTestData))]
|
||||
public void ScanWiaSavePdf(IAppTestTarget target)
|
||||
{
|
||||
@ -48,7 +48,7 @@ public class ScanAndSaveTests : AppiumTests
|
||||
AppTestHelper.AssertNoErrorLog(FolderPath);
|
||||
}
|
||||
|
||||
[VerifyTheory(AllowDebug = true)]
|
||||
[VerifyTheory(AllowDebug = true, WindowsAppium = true)]
|
||||
[ClassData(typeof(AppiumTestData))]
|
||||
public void ScanTwainSaveImage(IAppTestTarget target)
|
||||
{
|
||||
|
@ -5,6 +5,7 @@ namespace NAPS2.App.Tests.Verification;
|
||||
public sealed class VerifyTheoryAttribute : TheoryAttribute
|
||||
{
|
||||
private bool _allowDebug;
|
||||
private bool _windowsAppium;
|
||||
|
||||
public VerifyTheoryAttribute()
|
||||
{
|
||||
@ -33,4 +34,17 @@ public sealed class VerifyTheoryAttribute : TheoryAttribute
|
||||
_allowDebug = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool WindowsAppium
|
||||
{
|
||||
get => _windowsAppium;
|
||||
set
|
||||
{
|
||||
if (value && Skip == null && !OperatingSystem.IsWindows())
|
||||
{
|
||||
Skip = "Appium tests are only supported on Windows right now.";
|
||||
}
|
||||
_windowsAppium = value;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user