Skip to content

Commit

Permalink
Merge pull request #461 from BlueDotBrigade/Features/191-GherkinScena…
Browse files Browse the repository at this point in the history
…rios

Merge branch to `main` for: working on gherkin scenarios
  • Loading branch information
Pressacco authored Nov 20, 2024
2 parents 3d0b09d + 3d5c3f1 commit 73b7301
Show file tree
Hide file tree
Showing 24 changed files with 114 additions and 259 deletions.
12 changes: 4 additions & 8 deletions Src/BlueDotBrigade.Weevil.Gui/BlueDotBrigade.Weevil.Gui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,14 @@
<CodeAnalysisRuleSet>..\..\Weevil.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<None Remove="Filter\FilterViewModel" />
<None Remove="nlog.config" />
<None Remove="PostSharp.license" />
<None Remove="Resources\Icons\Insight\Timestamp-Data-48.png" />
<None Remove="Resources\Icons\Insight\Timestamp-DataRequiresAttention-48.png" />
</ItemGroup>
<ItemGroup>
<Compile Update="Filter\FilterViewModel.Commands.cs">
<DependentUpon>FilterViewModel</DependentUpon>
<DependentUpon>FilterViewModel.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -100,10 +99,10 @@
<Version>5.3.2</Version>
</PackageReference>
<PackageReference Include="PostSharp">
<Version>2024.0.8</Version>
<Version>2024.1.6</Version>
</PackageReference>
<PackageReference Include="PostSharp.Patterns.Model">
<Version>2024.0.8</Version>
<Version>2024.1.6</Version>
</PackageReference>
<PackageReference Include="Prism.Core" Version="8.1.97" />
<PackageReference Include="System.Collections.Immutable">
Expand Down Expand Up @@ -208,12 +207,9 @@
<_Parameter1>BlueDotBrigade.Weevil.Gui-FeatureTests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<Compile Include="Filter\FilterViewModel" />
</ItemGroup>
<ItemGroup>
<Content Include="nlog.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal partial class FilterViewModel
{
#region Commands: General
[SafeForDependencyAnalysis]
public ICommand OpenCommand => new UiBoundCommand(Open, () => !this.IsCommandExecuting);
public ICommand OpenCommand => new UiBoundCommand(OpenAsync, () => !this.IsCommandExecuting);
[SafeForDependencyAnalysis]
public ICommand ReloadCommand => new UiBoundCommand(Reload, () => this.IsMenuEnabled);
[SafeForDependencyAnalysis]
Expand Down Expand Up @@ -265,4 +265,4 @@ internal partial class FilterViewModel
public ICommand ToggleIsPinnedCommand => new UiBoundCommand(ToggleIsPinned, () => this.IsMenuEnabled);
#endregion
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,14 @@ private void OnInitialize()
{
if (File.Exists(args[1]))
{
OpenCompressed(args[1]);
OpenCompressedAsync(args[1]);
}
}
}

private void OnFileDropped(object sender, DroppedFileEventArgs e)
{
OpenCompressed(e.FilePath);
OpenCompressedAsync(e.FilePath);
}

protected void RaisePropertyChanged(string name)
Expand All @@ -343,7 +343,7 @@ protected void RaisePropertyChanged(string name)
#endregion

#region Commands: General
public async void Open()
public async void OpenAsync()
{
var filePath = _dialogBox.ShowOpenFile(CompatibleFileExtensions);
if (string.IsNullOrWhiteSpace(filePath))
Expand All @@ -356,7 +356,7 @@ public async void Open()
{
this.IsCommandExecuting = true;

await OpenCompressed(filePath);
await OpenCompressedAsync(filePath);
}
finally
{
Expand All @@ -365,7 +365,7 @@ public async void Open()
}
}

public async Task OpenCompressed(string sourceFilePath)
public async Task OpenCompressedAsync(string sourceFilePath)
{
var fileInfo = new FileInfo(sourceFilePath);
var isSourceFileCompressed = fileInfo.Extension.ToUpperInvariant() == ".ZIP";
Expand Down Expand Up @@ -1458,4 +1458,4 @@ private Dictionary<string, object> GetFilterConfiguration()
return configuration;
}
}
}
}
12 changes: 0 additions & 12 deletions Src/BlueDotBrigade.Weevil.Installer/WeevilBinFiles.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,6 @@
<Component Id="BlueDotBrigade.Weevil.Plugins.csproj" Guid="{D4A32105-48BC-45BB-9B11-71D0DF0FA29E}">
<File Id="BlueDotBrigade.Weevil.Plugins.csproj" KeyPath="yes" Source="$(var.SourceDirPath)\Plugins\BlueDotBrigade.Weevil.Plugins.csproj" />
</Component>
<Component Id="ProfoundMedical.Weevil_TulsaPro.dll" Guid="{1B680744-FE3A-4CB3-80C1-C9DC46F385C8}">
<File Id="ProfoundMedical.Weevil_TulsaPro.dll" KeyPath="yes" Source="$(var.SourceDirPath)\Plugins\ProfoundMedical.Weevil-TulsaPro.dll" />
</Component>
<Component Id="ProfoundMedical.Weevil_TulsaPro.dll.config" Guid="{177A5AF4-ADF9-4A47-B307-65F0DC90A26F}">
<File Id="ProfoundMedical.Weevil_TulsaPro.dll.config" KeyPath="yes" Source="$(var.SourceDirPath)\Plugins\ProfoundMedical.Weevil-TulsaPro.dll.config" />
</Component>
<Component Id="ProfoundMedical.Weevil_TulsaPro.pdb" Guid="{C869158E-2CCA-419B-AD0D-5FC14F2004C4}">
<File Id="ProfoundMedical.Weevil_TulsaPro.pdb" KeyPath="yes" Source="$(var.SourceDirPath)\Plugins\ProfoundMedical.Weevil-TulsaPro.pdb" />
</Component>
<Component Id="ReadMe.md" Guid="{71CCA0F2-14BF-4690-BDB4-988DF17CBCFF}">
<File Id="ReadMe.md" KeyPath="yes" Source="$(var.SourceDirPath)\Plugins\ReadMe.md" />
</Component>
Expand Down Expand Up @@ -459,9 +450,6 @@
<ComponentRef Id="System.Speech.dll" />
<ComponentRef Id="System.Web.Services.Description.dll" />
<ComponentRef Id="BlueDotBrigade.Weevil.Plugins.csproj" />
<ComponentRef Id="ProfoundMedical.Weevil_TulsaPro.dll" />
<ComponentRef Id="ProfoundMedical.Weevil_TulsaPro.dll.config" />
<ComponentRef Id="ProfoundMedical.Weevil_TulsaPro.pdb" />
<ComponentRef Id="ReadMe.md" />
<ComponentRef Id="System.Data.Odbc.dll_1" />
<ComponentRef Id="System.Data.Odbc.dll_2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<Company>Blue Dot Brigade</Company>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BlueDotBrigade.Weevil.Common\BlueDotBrigade.Weevil.Common.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<PackageReference Include="BlueDotBrigade.DatenLokator">
<Version>2.0.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter">
<Version>3.6.0</Version>
<Version>3.6.3</Version>
</PackageReference>
<PackageReference Include="MSTest.TestFramework">
<Version>3.6.0</Version>
<Version>3.6.3</Version>
</PackageReference>
<PackageReference Include="NSubstitute" Version="5.1.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="BlueDotBrigade.DatenLokator" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="Reqnroll.MsTest" Version="2.1.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="Reqnroll.MsTest" Version="2.2.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Feature: Filtering

# ---------------- CORE ENGINE

@Requirement:406, @UserStory:123
Scenario: Logical OR operator used to define multiple expressions
Given that the default log file is open
Expand Down Expand Up @@ -54,4 +56,4 @@ Scenario: Built-in filter alias #IPv6 identifies records with IP addresses
When using the "Regular Expression" filter mode
And applying the include filter: #IPV6
Then there will be 1 visible records
And all records will include: S/N=IA-1073R037
And all records will include: S/N=IA-1073R037
4 changes: 2 additions & 2 deletions Tst/BlueDotBrigade.Weevil.Core-FeatureTests/Token.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public Token()

public FilterType FilterType { get; set; }

public Dictionary<string, object> Configuration { get; set; }

public FilterCriteria FilterCriteria => new FilterCriteria(
this.IncludeFilter,
this.ExcludeFilter,
this.Configuration);

public ImmutableArray<IRecord> Results => Engine.Filter.Results;

public Dictionary<string, object> Configuration { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="BlueDotBrigade.DatenLokator" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<PackageReference Include="BlueDotBrigade.DatenLokator">
<Version>2.0.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter">
<Version>3.6.0</Version>
<Version>3.6.3</Version>
</PackageReference>
<PackageReference Include="MSTest.TestFramework">
<Version>3.6.0</Version>
<Version>3.6.3</Version>
</PackageReference>
<PackageReference Include="NSubstitute" Version="5.1.0" />
</ItemGroup>
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@
<None Remove="Drivers\**" />
<Page Remove="Drivers\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="OLD\CalculatorStepDefinitions.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BlueDotBrigade.DatenLokator" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="Reqnroll.MsTest" Version="2.1.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="Reqnroll.MsTest" Version="2.2.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
</ItemGroup>
<ItemGroup>
Expand All @@ -48,11 +45,10 @@
<ItemGroup>
<None Include=".Daten\.Global\AstroMech.log" />
<None Include=".Daten\Converters\ContentConverterTests\LongMultiLineRecord.log" />
<None Include="OLD\CalculatorStepDefinitions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Src\BlueDotBrigade.Weevil.Common\BlueDotBrigade.Weevil.Common.csproj" />
<ProjectReference Include="..\..\Src\BlueDotBrigade.Weevil.Gui\BlueDotBrigade.Weevil.Gui.csproj" />
<ProjectReference Include="..\..\Src\BlueDotBrigade.Weevil.TestingTools\BlueDotBrigade.Weevil.TestingTools.csproj" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
Feature: Filtering

Scenario: AAA
Given that the default log file is open

@Requirement:408
Scenario: Status bar displays number of records in results
Given that the default log file is open
When applying the include filter: #Information
Then there will be 36 results
# ---------------- VIEW MODEL

@Requirement:410
Scenario: Filter automatically applied when typing pauses
Expand All @@ -26,9 +19,3 @@ Scenario: Filter is not automatically applied when typing continues
And entering the include filter: #Error||#Fatal
And waiting 1 seconds
Then there will be 387 results

# REMOVE requirement or add manual test instead of scenario.
@Requirement:411
Scenario: `Regular Expression` filter mode selected by default
Given that the default log file is open
Then the filter mode will be regular expression
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BlueDotBrigade.Weevil.Gui.Filter
{
[Binding]
internal sealed class FilteringSteps : ReqnrollSteps
{
public FilteringSteps(Token token) : base(token)
{
// nothing to do
}

[When($"applying the include filter: {X.AnyText}")]
public void WhenApplyingTheIncludeFilter(string includeFilter)
{
this.Context.Filter.InclusiveFilter = includeFilter;
this.Context.Filter.Filter();
}
}
}
27 changes: 0 additions & 27 deletions Tst/BlueDotBrigade.Weevil.Gui-FeatureTests/OLD/Calculator.feature

This file was deleted.

Loading

0 comments on commit 73b7301

Please sign in to comment.