-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
SITE-62: Deleting not needed recipe execution
- Loading branch information
Showing
19 changed files
with
264 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Themes/Sample.Theme/Recipes/_MediaTheme/Templates/Widget__LayoutInjection.liquid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
src/Themes/Sample.Theme/Views/Widget-LayoutInjection.liquid
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace DotNest.Core.SDK.Tests.UI.Constants; | ||
|
||
public static class Recipes | ||
{ | ||
public const string DefaultRecipeId = "DotNest.Core.SDK.Tests.Default"; | ||
} |
25 changes: 25 additions & 0 deletions
25
test/DotNest.Core.SDK.Tests.UI/DotNest.Core.SDK.Tests.UI.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" /> | ||
<PackageReference Include="Lombiq.Tests.UI" Version="8.2.1-alpha.6.osoe-351" /> | ||
<PackageReference Include="Lombiq.Analyzers" Version="3.3.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="Recipes\*.Tests*.recipe.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\DotNest.Core.SDK.Web\DotNest.Core.SDK.Web.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using DotNest.Core.SDK.Tests.UI.Constants; | ||
using Lombiq.Tests.UI.Extensions; | ||
using Lombiq.Tests.UI.Pages; | ||
using Lombiq.Tests.UI.Services; | ||
using OpenQA.Selenium; | ||
using Shouldly; | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace DotNest.Core.SDK.Tests.UI.Helpers; | ||
|
||
public static class SetupHelpers | ||
{ | ||
public static async Task<Uri> RunSetupAsync(UITestContext context) | ||
{ | ||
var homepageUri = await context.GoToSetupPageAndSetupOrchardCoreAsync( | ||
new OrchardCoreSetupParameters(context) | ||
{ | ||
SiteName = "DotNest Core SDK", | ||
RecipeId = Recipes.DefaultRecipeId, | ||
SiteTimeZoneValue = "Europe/Budapest", | ||
}); | ||
|
||
context.Get(By.ClassName("navbar-brand")).Text.ShouldBe("DotNest Core SDK"); | ||
|
||
return homepageUri; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# DotNest Core SDK UI Tests | ||
|
||
## Overview | ||
|
||
This project contains a sample UI test for the DotNest Core SDK, which ensures that basic functionality is working. You can use it as a starting point for your own UI tests. The project uses the [Lombiq UI Testing Toolbox for Orchard Core project](https://github.com/Lombiq/UI-Testing-Toolbox) which gives you a framework for writing UI tests. For more info please check out its documentation. For more UI test examples see the [`Lombiq.Tests.UI.Samples` repository](https://github.com/Lombiq/UI-Testing-Toolbox/blob/dev/Lombiq.Tests.UI.Samples/Readme.md). |
35 changes: 35 additions & 0 deletions
35
.../DotNest.Core.SDK.Tests.UI/Recipes/DotNest.Core.SDK.Tests.Configuration.Tests.recipe.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "DotNest.Core.SDK.Tests.Configuration.Tests", | ||
"displayName": "TEST: DotNest Core SDK - Configuration Tests", | ||
"description": "Common configuration necessary for UI tests.", | ||
"author": "Lombiq Technologies", | ||
"website": "https://github.com/Lombiq/DotNest-Core-SDK", | ||
"version": "1.0", | ||
"issetuprecipe": false, | ||
"categories": [ "test" ], | ||
"tags": [ "test", "HideFromSetupScreen" ], | ||
|
||
"steps": [ | ||
{ | ||
"name": "feature", | ||
"enable": [ | ||
"OrchardCore.Localization" | ||
] | ||
}, | ||
{ | ||
"name": "settings", | ||
// To make sure that e.g. numbers and dates are formatted the same way on all machines we have to specify the | ||
// culture too. | ||
"UseCdn": false, | ||
"SmtpSettings": { | ||
"DefaultSender": "[email protected]" | ||
}, | ||
"LocalizationSettings": { | ||
"DefaultCulture": "en-US", | ||
"SupportedCultures": [ | ||
"en-US" | ||
] | ||
} | ||
} | ||
] | ||
} |
27 changes: 27 additions & 0 deletions
27
test/DotNest.Core.SDK.Tests.UI/Recipes/DotNest.Core.SDK.Tests.Default.recipe.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "DotNest.Core.SDK.Tests.Default", | ||
"displayName": "TEST: DotNest Core SDK - Default tenant", | ||
"description": "Setup recipe for the default tenant of DotNest Tenants SDK, for automated UI test execution.", | ||
"author": "Lombiq Technologies", | ||
"website": "https://github.com/Lombiq/DotNest-Core-SDK", | ||
"version": "1.0", | ||
"issetuprecipe": true, | ||
"categories": [ "developer" ], | ||
"tags": [ "dotnest", "test", "HideFromSetupScreen" ], | ||
|
||
"steps": [ | ||
{ | ||
"name": "recipes", | ||
"Values": [ | ||
{ | ||
"executionid": "DotNest.Core.SDK.Tests.UI", | ||
"name": "DotNest.Core.SDK.Setup" | ||
}, | ||
{ | ||
"executionid": "DotNest.Core.SDK.Tests.UI", | ||
"name": "DotNest.Core.SDK.Tests.Configuration.Tests" | ||
} | ||
] | ||
} | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
test/DotNest.Core.SDK.Tests.UI/Tests/BasicOrchardFeaturesTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using DotNest.Core.SDK.Tests.UI.Constants; | ||
using Lombiq.Tests.UI.Extensions; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace DotNest.Core.SDK.Tests.UI.Tests; | ||
|
||
public class BasicOrchardFeaturesTests : UITestBase | ||
{ | ||
public BasicOrchardFeaturesTests(ITestOutputHelper testOutputHelper) | ||
: base(testOutputHelper) | ||
{ | ||
} | ||
|
||
[Fact] | ||
public Task BasicOrchardFeaturesShouldWork() => | ||
ExecuteTestAsync( | ||
context => context.TestBasicOrchardFeaturesExceptRegistrationAsync(Recipes.DefaultRecipeId)); | ||
} |
Oops, something went wrong.