Skip to content

Commit 4d6854d

Browse files
committed
Moved tooltip attribute to separate interface
1 parent 5925e71 commit 4d6854d

File tree

5 files changed

+25
-21
lines changed

5 files changed

+25
-21
lines changed

CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
[1.8.5] - 2022-01-27
7+
[1.8.6] - 2022-02-16
88
### Changed
9-
- Bindings code refactoring
10-
- Updated Specflow package version
9+
- Moved tooltip attribute to separate interface

src/Behavioral.Automation/Behavioral.Automation.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The whole automation code is divided into the following parts:
1616
- UI structure descriptive code
1717
- Supportive code</Description>
1818
<Copyright>Quantori Inc.</Copyright>
19-
<PackageVersion>1.8.5</PackageVersion>
19+
<PackageVersion>1.8.6</PackageVersion>
2020
<RepositoryUrl>https://github.com/quantori/Behavioral.Automation</RepositoryUrl>
2121
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2222
<IncludeSymbols>true</IncludeSymbols>

src/Behavioral.Automation/Bindings/LabelBinding.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
namespace Behavioral.Automation.Bindings
1010
{
11-
/// <summary>
12-
/// Bindings for labels or other text elements testing
11+
/// <summary>
12+
/// Bindings for labels or other text elements testing
1313
/// </summary>
1414
[Binding]
1515
public sealed class LabelBinding
@@ -23,18 +23,18 @@ public LabelBinding([NotNull] RunnerService runnerService, [NotNull] ScenarioCon
2323
_scenarioContext = scenarioContext;
2424
}
2525

26-
/// <summary>
27-
/// Check that element's text is equal to the expected one
28-
/// </summary>
29-
/// <param name="element">Tested web element wrapper</param>
30-
/// <param name="behavior">Assertion behavior (instant or continuous)</param>
26+
/// <summary>
27+
/// Check that element's text is equal to the expected one
28+
/// </summary>
29+
/// <param name="element">Tested web element wrapper</param>
30+
/// <param name="behavior">Assertion behavior (instant or continuous)</param>
3131
/// <param name="value">Expected value</param>
3232
/// <example>Then "Test" element text should be "expected text"</example>
3333
[Given("the (.*?) text (is|is not|become|become not) \"(.*)\"")]
3434
[Then("the (.*?) text should (be|be not|become|become not) \"(.*)\"")]
3535
public void CheckSelectedText(
36-
[NotNull] IWebElementWrapper element,
37-
[NotNull] AssertionBehavior behavior,
36+
[NotNull] IWebElementWrapper element,
37+
[NotNull] AssertionBehavior behavior,
3838
[NotNull] string value)
3939
{
4040
Assert.ShouldBecome(() => StringExtensions.GetElementTextOrValue(element), value, behavior,
@@ -68,7 +68,7 @@ public void CheckSelectedTextContain(
6868
/// <example>Then the "Test" element should have tooltip with text "expected string"</example>
6969
[Then("the (.*?) should (have|not have) tooltip with text \"(.*)\"")]
7070
public void CheckElementTooltip(
71-
[NotNull] IWebElementWrapper element,
71+
[NotNull] ITooltipElementWrapper element,
7272
[NotNull] AssertionBehavior behavior,
7373
[NotNull] string value)
7474
{
@@ -88,8 +88,8 @@ public void CheckElementIsEmpty([NotNull] IWebElementWrapper element, AssertionB
8888
{
8989
Assert.ShouldBecome(() => StringExtensions.GetElementTextOrValue(element), string.Empty, behavior,
9090
$"{element.Caption} text is \"{StringExtensions.GetElementTextOrValue(element)}\"");
91-
}
92-
91+
}
92+
9393
/// <summary>
9494
/// Check that multiple elements' texts are empty
9595
/// </summary>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Behavioral.Automation.Elements
2+
{
3+
public interface ITooltipElementWrapper : IWebElementWrapper
4+
{
5+
/// <summary>
6+
/// Message that appears when mouse is hovered over element
7+
/// </summary>
8+
public string Tooltip { get; }
9+
}
10+
}

src/Behavioral.Automation/Elements/IWebElementWrapper.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ public interface IWebElementWrapper
6565
/// </summary>
6666
public bool Enabled { get; }
6767

68-
/// <summary>
69-
/// Message that appears when mouse is hovered over element
70-
/// </summary>
71-
public string Tooltip { get; }
72-
7368
/// <summary>
7469
/// Element staleness. See <seealso cref="StaleElementReferenceException"/>
7570
/// </summary>

0 commit comments

Comments
 (0)