-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Templates for Sitefinity 14.3 (#202)
* Added templates folder for 14.3. Update Integration tests templates for MSTest v2 framework. * bootstrap 4 and 5 templates updated * changed default password * Bump version to 1.1.0.31 * Fixed integration tests docuemntation for 14.3 Co-authored-by: Stoyan Dimitrov <[email protected]>
- Loading branch information
1 parent
2abd0c3
commit b5c6d47
Showing
335 changed files
with
55,219 additions
and
3 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
28 changes: 28 additions & 0 deletions
28
Sitefinity CLI/Templates/14.3/CustomWidget/Default/Controller.Template
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 @@ | ||
/* {{> sign}} */ | ||
|
||
using {{projectDefaultNamespace}}.Mvc.Models; | ||
using System.Web.Mvc; | ||
using Telerik.Sitefinity.Mvc; | ||
using Telerik.Sitefinity.Personalization; | ||
|
||
namespace {{projectDefaultNamespace}}.Mvc.Controllers | ||
{ | ||
[ControllerToolboxItem(Name = "{{pascalCaseName}}_MVC", Title = "{{name}}", SectionName = "CustomWidgets")] | ||
public class {{pascalCaseName}}Controller : Controller, IPersonalizable | ||
{ | ||
// GET: {{name}} | ||
public ActionResult Index() | ||
{ | ||
var model = new {{pascalCaseName}}Model(); | ||
model.Message = this.Message; | ||
return View(model); | ||
} | ||
|
||
protected override void HandleUnknownAction(string actionName) | ||
{ | ||
this.ActionInvoker.InvokeAction(this.ControllerContext, "Index"); | ||
} | ||
|
||
public string Message { get; set; } | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Sitefinity CLI/Templates/14.3/CustomWidget/Default/Model.Template
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,12 @@ | ||
/* {{> sign}} */ | ||
|
||
using System.Web.Mvc; | ||
using Telerik.Sitefinity.Mvc; | ||
|
||
namespace {{projectDefaultNamespace}}.Mvc.Models | ||
{ | ||
public class {{pascalCaseName}}Model | ||
{ | ||
public string Message { get; set; } | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Sitefinity CLI/Templates/14.3/CustomWidget/Default/View.Template
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 @@ | ||
@* {{> sign}} *@ | ||
|
||
@model {{projectDefaultNamespace}}.Mvc.Models.{{pascalCaseName}}Model | ||
<div> | ||
@Model.Message | ||
</div> |
14 changes: 14 additions & 0 deletions
14
Sitefinity CLI/Templates/14.3/CustomWidget/Default/templates.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,14 @@ | ||
[ | ||
{ | ||
"FilePath": "Controllers\\{0}Controller.cs", | ||
"TemplatePath": "Controller.Template" | ||
}, | ||
{ | ||
"FilePath": "Models\\{0}Model.cs", | ||
"TemplatePath": "Model.Template" | ||
}, | ||
{ | ||
"FilePath": "Views\\{0}\\Index.cshtml", | ||
"TemplatePath": "View.Template" | ||
} | ||
] |
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,8 @@ | ||
<!-- {{> sign}} --> | ||
|
||
<div class="row" data-sf-element="Row"> | ||
<div class="sf_colsIn col-lg-6" data-sf-element="Column 1" data-placeholder-label="Column 1"> | ||
</div> | ||
<div class="sf_colsIn col-lg-6" data-sf-element="Column 2" data-placeholder-label="Column 2"> | ||
</div> | ||
</div> |
38 changes: 38 additions & 0 deletions
38
Sitefinity CLI/Templates/14.3/IntegrationTests/Default/AssemblyInfo.Template
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,38 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("{{pascalCaseName}}")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("SitefinityWebApp.Tests.Integration")] | ||
[assembly: AssemblyCopyright("Copyright © 2022")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("{{projectGuid}}")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] | ||
[assembly: ClassCleanupExecution(ClassCleanupBehavior.EndOfClass)] |
60 changes: 60 additions & 0 deletions
60
Sitefinity CLI/Templates/14.3/IntegrationTests/Default/DemoTests.Template
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,60 @@ | ||
/* {{> sign}} */ | ||
|
||
using System; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Telerik.Sitefinity.TestIntegration.Framework.MSTest; | ||
|
||
namespace {{pascalCaseName}} | ||
{ | ||
/// <summary> | ||
/// Represents sample integration tests class to demonstrate the usage of some attributes. | ||
/// For sample integration tests see this project in the Sitefinity GitHub repo: https://github.com/Sitefinity/Telerik.Sitefinity.Samples.IntegrationTests | ||
/// </summary> | ||
[TestClass] | ||
public class DemoTests : SitefinityIntegrationTestsBase | ||
{ | ||
/// <summary> | ||
/// This method is invoked once prior to executing any tests in the test class. | ||
/// </summary> | ||
public override void ClassInitialize() | ||
{ | ||
base.ClassInitialize(); | ||
} | ||
|
||
/// <summary> | ||
/// This method is invoked once after all tests in the test class have been executed. | ||
/// </summary> | ||
public override void ClassCleanup() | ||
{ | ||
base.ClassCleanup(); | ||
} | ||
|
||
/// <summary> | ||
/// This method is invoked just before each test method is executed. | ||
/// </summary> | ||
public override void TestInitialize() | ||
{ | ||
base.TestInitialize(); | ||
} | ||
|
||
/// <summary> | ||
/// This method is invoked after each test method. | ||
/// </summary> | ||
public override void TestCleanup() | ||
{ | ||
base.TestCleanup(); | ||
} | ||
|
||
/// <summary> | ||
/// Write your integration test | ||
/// </summary> | ||
[SitefinityIntegrationTest] | ||
[TestCategory("Demo")] | ||
[Owner("Sitefinity CLI")] | ||
[Description("Write your integration test")] | ||
public void Test() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...finity CLI/Templates/14.3/IntegrationTests/Default/IntegrationTestsSettings.json.Template
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,8 @@ | ||
{ | ||
"SitefinityUrl": "http://localhost", | ||
"SitefinityClientId": "sftestrunner", | ||
"SitefinityClientSecret": "secret", | ||
"Username": "[email protected]", | ||
"Password": "admin!23", | ||
"TestExecutionTimeout": "00:05:00" | ||
} |
82 changes: 82 additions & 0 deletions
82
Sitefinity CLI/Templates/14.3/IntegrationTests/Default/csproj.Template
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,82 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props')" /> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{ {{~projectGuid~}} }</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>{{pascalCaseName}}</RootNamespace> | ||
<AssemblyName>{{pascalCaseName}}</AssemblyName> | ||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>{{binFolder}}</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>{{binFolder}}</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="IdentityModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b28c218413bdf563, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Progress.Sitefinity.IdentityModel.1.3.0\lib\net45\IdentityModel.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Http, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Microsoft.Http.1.0.0.0\lib\Microsoft.Http.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Http.Extensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Microsoft.Http.Extensions.1.0.0.0\lib\net40\Microsoft.Http.Extensions.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\MSTest.TestFramework.2.2.10\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\MSTest.TestFramework.2.2.10\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="Telerik.Sitefinity.HttpClientCore, Version=3.0.1.0, Culture=neutral, PublicKeyToken=b28c218413bdf563, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Telerik.Sitefinity.HttpClientCore.3.0.1\lib\net45\Telerik.Sitefinity.HttpClientCore.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Telerik.Sitefinity.TestIntegration.Framework, Version={{sitefinityVersion}}, Culture=neutral, PublicKeyToken=b28c218413bdf563, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Progress.Sitefinity.TestIntegration.Framework.{{sitefinityNugetVersion}}\lib\net48\Telerik.Sitefinity.TestIntegration.Framework.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="IntegrationTestsSettings.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
<PropertyGroup> | ||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
</PropertyGroup> | ||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props'))" /> | ||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets'))" /> | ||
</Target> | ||
<Import Project="..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets')" /> | ||
</Project> |
11 changes: 11 additions & 0 deletions
11
Sitefinity CLI/Templates/14.3/IntegrationTests/Default/packages.config.Template
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,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Microsoft.Http" version="1.0.0.0" targetFramework="net48" /> | ||
<package id="Microsoft.Http.Extensions" version="1.0.0.0" targetFramework="net48" /> | ||
<package id="MSTest.TestAdapter" version="2.2.10" targetFramework="net48" /> | ||
<package id="MSTest.TestFramework" version="2.2.10" targetFramework="net48" /> | ||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" /> | ||
<package id="Progress.Sitefinity.IdentityModel" version="1.3.0" targetFramework="net48" /> | ||
<package id="Progress.Sitefinity.TestIntegration.Framework" version="{{sitefinityNugetVersion}}" targetFramework="net48" /> | ||
<package id="Telerik.Sitefinity.HttpClientCore" version="3.0.1" targetFramework="net48" /> | ||
</packages> |
22 changes: 22 additions & 0 deletions
22
Sitefinity CLI/Templates/14.3/IntegrationTests/Default/templates.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,22 @@ | ||
[ | ||
{ | ||
"FilePath": "Properties\\AssemblyInfo.cs", | ||
"TemplatePath": "AssemblyInfo.Template" | ||
}, | ||
{ | ||
"FilePath": "{0}.csproj", | ||
"TemplatePath": "csproj.Template" | ||
}, | ||
{ | ||
"FilePath": "DemoTests.cs", | ||
"TemplatePath": "DemoTests.Template" | ||
}, | ||
{ | ||
"FilePath": "packages.config", | ||
"TemplatePath": "packages.config.Template" | ||
}, | ||
{ | ||
"FilePath": "IntegrationTestsSettings.json", | ||
"TemplatePath": "IntegrationTestsSettings.json.Template" | ||
} | ||
] |
37 changes: 37 additions & 0 deletions
37
Sitefinity CLI/Templates/14.3/Module/Default/AssemblyInfo.template
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,37 @@ | ||
using {{pascalCaseName}}; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
using Telerik.Sitefinity.Services; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("{{pascalCaseName}}")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("{{pascalCaseName}}")] | ||
[assembly: AssemblyCopyright("Copyright © 2022")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("{{projectGuid}}")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
Oops, something went wrong.