Skip to content

Commit

Permalink
Feature/auto release (#138)
Browse files Browse the repository at this point in the history
* #18 Fix pipeline to create releases on GitHub

* #127 Fix code smells
  • Loading branch information
paveliam authored Aug 29, 2019
1 parent fc190e9 commit f7814ad
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public RetryConfiguration(JsonFile settingsFile)

private int GetIntFromSettings(string name)
{
return settingsFile.GetValue<int>($".retry.{name}");;
return settingsFile.GetValue<int>($".retry.{name}");
}

public int Number { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@ public virtual string DownloadDir

protected void SetCapabilities(DriverOptions options, Action<string, object> addCapabilityMethod = null)
{
foreach(var capability in BrowserCapabilities)
foreach (var capability in BrowserCapabilities)
{
try
{
var defaultAddCapabilityMethod = addCapabilityMethod ?? options.AddAdditionalCapability;
defaultAddCapabilityMethod(capability.Key, capability.Value);
}
catch(ArgumentException exception)
catch (ArgumentException exception)
{
if(exception.Message.StartsWith("There is already an option"))
{
SetKnownProperty(options, capability, exception);
}
else
{
throw exception;
throw;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ namespace Aquality.Selenium.Elements
/// <param name="name">Element name</param>
/// <param name="state">Element state</param>
/// <returns>Element instance of type T</returns>
public delegate T ElementSupplier<T>(By locator, string name, ElementState state) where T : IElement;
public delegate T ElementSupplier<out T>(By locator, string name, ElementState state) where T : IElement;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Aquality.Selenium.Utilities
/// <summary>
/// Retries an action or function when <see cref="StaleElementReferenceException"/> or <see cref="InvalidElementStateException"/> occures.
/// </summary>
internal sealed class ElementActionRetrier
internal static class ElementActionRetrier
{
/// <summary>
/// Retries the action when <see cref="StaleElementReferenceException"/> or <see cref="InvalidElementStateException"/> occures.
Expand Down
3 changes: 1 addition & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ steps:
repositoryName: 'aquality-automation/aquality-selenium-dotnet'
action: 'create'
tag: 'v$(GitVersion.NuGetVersion)'
title: 'v$(GitVersion.NuGetVersion)'
tagSource: 'auto'
tagSource: 'manual'
isPreRelease: contains(variables['GitVersion.NuGetVersion'], '-')
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))

0 comments on commit f7814ad

Please sign in to comment.