mirror of
https://github.com/bitwarden/mobile
synced 2026-01-03 09:03:35 +00:00
Added UI test project
This commit is contained in:
39
src/UiTests/Setup/PlatformQuery.cs
Executable file
39
src/UiTests/Setup/PlatformQuery.cs
Executable file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using Xamarin.UITest;
|
||||
using Xamarin.UITest.Queries;
|
||||
|
||||
namespace Bit.UITests.Setup
|
||||
{
|
||||
public class PlatformQuery
|
||||
{
|
||||
Func<AppQuery, AppQuery> _current;
|
||||
public Func<AppQuery, AppQuery> Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_current == null)
|
||||
throw new NullReferenceException("Trait not set for current platform");
|
||||
|
||||
return _current;
|
||||
}
|
||||
}
|
||||
|
||||
public Func<AppQuery, AppQuery> Android
|
||||
{
|
||||
set
|
||||
{
|
||||
if (AppManager.Platform == Platform.Android)
|
||||
_current = value;
|
||||
}
|
||||
}
|
||||
|
||||
public Func<AppQuery, AppQuery> iOS
|
||||
{
|
||||
set
|
||||
{
|
||||
if (AppManager.Platform == Platform.iOS)
|
||||
_current = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user