Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meni beta checks #3880

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Ginger/Ginger/Ginger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@
<PackageReference Include="Syncfusion.Shared.WPF" Version="20.1.0.55" />
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.Drawing.Common" Version="8.0.1" />
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
<PackageReference Include="System.Management" Version="8.0.0" />
<PackageReference Include="System.Web.Services.Description" Version="8.0.0" />
<PackageReference Include="System.Windows.Forms.DataVisualization" Version="1.0.0-prerelease.20110.1" />
Expand Down
2 changes: 1 addition & 1 deletion Ginger/GingerCore/GingerCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Drawing.Common">
<Version>8.0.1</Version>
<Version>8.0.7</Version>
</PackageReference>
<PackageReference Include="System.Globalization">
<Version>4.3.0</Version>
Expand Down
2 changes: 1 addition & 1 deletion Ginger/GingerCoreCommon/GingerCoreCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NJsonSchema" Version="9.13.10" />
<PackageReference Include="System.Drawing.Common" Version="8.0.1" />
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
13 changes: 13 additions & 0 deletions Ginger/GingerCoreNET/ActionsLib/UI/Mobile/ActMobileDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,19 @@ public ActInputValue Y2
}
}

public ActInputValue ActionAppPackage
{
get
{
return GetOrCreateInputParam(nameof(ActionAppPackage), "default");
}
set
{
AddOrUpdateInputParamValue(nameof(ActionAppPackage), value.ToString());
OnPropertyChanged(nameof(ActionAppPackage));
}
}
Comment on lines +170 to +181
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! But ensure tests and documentation are added.

The new public property ActionAppPackage is correctly implemented. Ensure that the new property is adequately tested and documented.

The code changes are approved.

Do you want me to generate the unit testing code or open a GitHub issue to track this task?


public string mSimulatedPhotoPath;
public ActInputValue SimulatedPhotoPath
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ private void MobileDeviceActionHandler(ActMobileDevice act)
case ActMobileDevice.eMobileDeviceAction.OpenApp:
if (AppType == eAppType.NativeHybride)
{
Driver.LaunchApp();
Driver.ActivateApp((GetAppPackage(act)));
}
else
{
Expand All @@ -1090,7 +1090,7 @@ private void MobileDeviceActionHandler(ActMobileDevice act)
case ActMobileDevice.eMobileDeviceAction.CloseApp:
if (AppType == eAppType.NativeHybride)
{
Driver.CloseApp();
Driver.TerminateApp((GetAppPackage(act)));
}
else
{
Expand Down Expand Up @@ -1196,6 +1196,28 @@ private void MobileDeviceActionHandler(ActMobileDevice act)
}
}

private string GetAppPackage(ActMobileDevice act)
{
string appPackage = null;
if (string.IsNullOrEmpty(act.ActionAppPackage.ValueForDriver) || act.ActionAppPackage.ValueForDriver.ToLower().Trim() == "default")
{
if (DevicePlatformType == eDevicePlatformType.Android)
{
appPackage = AppiumCapabilities.Where(x => x.Parameter == "appPackage" || x.Parameter == "appium:appPackage").FirstOrDefault().Value;
}
else
{
appPackage = AppiumCapabilities.Where(x => x.Parameter == "bundleId" || x.Parameter == "appium:bundleId").FirstOrDefault().Value;
}

return appPackage;
}
else
{
return act.ActionAppPackage.Value;
}
}

public string SimulatePhotoOrBarcode(string photoString, string action)
{
Bitmap picture = null;
Expand Down
4 changes: 2 additions & 2 deletions Ginger/GingerCoreNET/GingerCoreNET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@

<ItemGroup>

<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.6" />
<PackageReference Include="Appium.WebDriver" Version="5.1.0" />

<PackageReference Include="Azure.Identity" Version="1.12.0" />

Expand Down Expand Up @@ -333,7 +333,7 @@
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.Drawing.Common" Version="8.0.1" />
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
<PackageReference Include="System.Reflection" Version="4.3.0" />
<PackageReference Include="System.Reflection.DispatchProxy" Version="4.7.1" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion Ginger/GingerPluginCore/GingerPluginCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Drawing.Common" Version="8.0.1" />
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
<PackageReference Include="System.Reflection.DispatchProxy" Version="4.7.1" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Ginger/GingerUtils/GingerUtils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Drawing.Common" Version="8.0.1" />
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

Expand Down
Loading