mirror of
https://github.com/bitwarden/mobile
synced 2026-01-09 20:13:18 +00:00
[PM-2691] Adding AutomationIDs for Vault Page sections (#2580)
* Adding IDs for Vault Page sections * Removing extra spaces * Adding Matt's comments * Fixing Filters Id bug * Adding Fede's suggestions * Fixing Settings Ids issues * Fixing AutomationIds issues with RecyclerViews + implementing AutomationId helper class * Adding Fede's suggestion * Adding latest Fede's suggestions
This commit is contained in:
23
src/App/Utilities/Automation/AutomationIdsHelper.cs
Normal file
23
src/App/Utilities/Automation/AutomationIdsHelper.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Bit.App.Utilities.Automation
|
||||
{
|
||||
public static class AutomationIdsHelper
|
||||
{
|
||||
public static string ToEnglishTitleCase(string name)
|
||||
{
|
||||
return new CultureInfo("en-US", false)
|
||||
.TextInfo
|
||||
.ToTitleCase(name)
|
||||
.Replace(" ", String.Empty)
|
||||
.Replace("-", String.Empty);
|
||||
}
|
||||
|
||||
public static string AddSuffixFor(string text, SuffixType type)
|
||||
{
|
||||
return $"{text}{Enum.GetName(typeof(SuffixType), type)}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
13
src/App/Utilities/Automation/SuffixType.cs
Normal file
13
src/App/Utilities/Automation/SuffixType.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Bit.App.Utilities.Automation
|
||||
{
|
||||
public enum SuffixType
|
||||
{
|
||||
Cell,
|
||||
SettingValue,
|
||||
Header,
|
||||
ListGroup,
|
||||
ListItem,
|
||||
Filter
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user