(table => table
diff --git a/test/OrchardCore.Tests.Functional/cms-tests/Recipes/migrations.recipe.json b/test/OrchardCore.Tests.Functional/cms-tests/Recipes/migrations.recipe.json
new file mode 100644
index 00000000000..2809ab01e75
--- /dev/null
+++ b/test/OrchardCore.Tests.Functional/cms-tests/Recipes/migrations.recipe.json
@@ -0,0 +1,1326 @@
+{
+ "name": "Migrations",
+ "displayName": "Migrations",
+ "description": "Test features having database migrations.",
+ "author": "The Orchard Core Team",
+ "website": "https://orchardcore.net",
+ "version": "1.0.0",
+ "issetuprecipe": true,
+ "categories": [ "tests" ],
+ "tags": [ "tests" ],
+
+ // The variables are evaluated the first time they are accessed, and reused across steps
+ "variables": {
+ "adminUrlPrefix": "[js: configuration('OrchardCore_Admin:AdminUrlPrefix', 'Admin')]",
+ "blogContentItemId": "[js:uuid()]",
+ "menuContentItemId": "[js:uuid()]",
+ "tagsContentItemId": "[js:uuid()]",
+ "tagContentItemId": "[js:uuid()]",
+ "earthTagContentItemId": "[js:uuid()]",
+ "explorationTagContentItemId": "[js:uuid()]",
+ "spaceTagContentItemId": "[js:uuid()]",
+ "categoriesContentItemId": "[js:uuid()]",
+ "categoryTravelContentItemId": "[js:uuid()]"
+ // "now": "[js: new Date().toISOString()]"
+ },
+
+ "steps": [
+ {
+ "name": "feature",
+ "enable": [
+ // SaaS
+ "OrchardCore.HomeRoute",
+ "OrchardCore.Admin",
+ "OrchardCore.Diagnostics",
+ "OrchardCore.DynamicCache",
+ "OrchardCore.Features",
+ "OrchardCore.Navigation",
+ "OrchardCore.Recipes",
+ "OrchardCore.Resources",
+ "OrchardCore.Roles",
+ "OrchardCore.Security",
+ "OrchardCore.Settings",
+ "OrchardCore.Themes",
+ "OrchardCore.Users",
+
+ // Content Management
+ "OrchardCore.Alias",
+ "OrchardCore.AdminMenu",
+ "OrchardCore.Autoroute",
+ "OrchardCore.Html",
+ "OrchardCore.ContentFields",
+ "OrchardCore.ContentPreview",
+ "OrchardCore.Contents",
+ "OrchardCore.ContentTypes",
+ "OrchardCore.CustomSettings",
+ "OrchardCore.Deployment",
+ "OrchardCore.Deployment.Remote",
+ "OrchardCore.Feeds",
+ "OrchardCore.Flows",
+ "OrchardCore.Indexing",
+ "OrchardCore.Layers",
+ "OrchardCore.Lists",
+ "OrchardCore.Markdown",
+ "OrchardCore.Media",
+ "OrchardCore.Menu",
+ "OrchardCore.Placements",
+ "OrchardCore.Queries",
+ "OrchardCore.Queries.Sql",
+ "OrchardCore.Shortcodes.Templates",
+ "OrchardCore.Rules",
+ "OrchardCore.Taxonomies",
+ "OrchardCore.Title",
+ "OrchardCore.Templates",
+ "OrchardCore.Widgets",
+
+ // Features having database migrations.
+ "OrchardCore.AdminDashboard",
+ "OrchardCore.Alias",
+ "OrchardCore.ArchiveLater",
+ "OrchardCore.AuditTrail",
+ "OrchardCore.Autoroute",
+ "OrchardCore.ContentFields.Indexing.SQL",
+ "OrchardCore.ContentFields.Indexing.SQL.UserPicker",
+ "OrchardCore.ContentLocalization",
+ "OrchardCore.Indexing",
+ "OrchardCore.Layers",
+ "OrchardCore.Lists",
+ "OrchardCore.Notifications",
+ "OrchardCore.OpenId",
+ "OrchardCore.PublishLater",
+ "OrchardCore.Taxonomies",
+ "OrchardCore.Workflows",
+
+ // Themes
+ "TheBlogTheme",
+ "TheAdmin",
+ "SafeMode"
+ ]
+ },
+ {
+ "name": "themes",
+ "admin": "TheAdmin",
+ "site": "TheBlogTheme"
+ },
+ {
+ "name": "Roles",
+ "Roles": [
+ {
+ "Name": "Administrator",
+ "Description": "Administrator",
+ "Permissions": []
+ },
+ {
+ "Name": "Moderator",
+ "Description": "Moderator",
+ "Permissions": []
+ },
+ {
+ "Name": "Editor",
+ "Description": "Editor",
+ "Permissions": []
+ },
+ {
+ "Name": "Author",
+ "Description": "Author",
+ "Permissions": []
+ },
+ {
+ "Name": "Contributor",
+ "Description": "Contributor",
+ "Permissions": []
+ },
+ {
+ "Name": "Authenticated",
+ "Description": "Authenticated",
+ "Permissions": []
+ },
+ {
+ "Name": "Anonymous",
+ "Description": "Anonymous",
+ "Permissions": []
+ }
+ ]
+ },
+ {
+ "name": "settings",
+ "HomeRoute": {
+ "Action": "Display",
+ "Controller": "Item",
+ "Area": "OrchardCore.Contents",
+ "ContentItemId": "[js: variables('blogContentItemId')]"
+ },
+ "LayerSettings": {
+ "Zones": [ "Content", "Footer" ]
+ }
+ },
+ {
+ "name": "ContentDefinition",
+ "ContentTypes": [
+ {
+ "Name": "Article",
+ "DisplayName": "Article",
+ "Hidden": false,
+ "Settings": {
+ "ContentTypeSettings": {
+ "Creatable": true,
+ "Draftable": true,
+ "Versionable": true,
+ "Listable": true
+ }
+ },
+ "ContentTypePartDefinitionRecords": [
+ {
+ "PartName": "Article",
+ "Name": "Article",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "3"
+ }
+ }
+ },
+ {
+ "PartName": "AutoroutePart",
+ "Name": "AutoroutePart",
+ "Settings": {
+ "AutoroutePartSettings": {
+ "AllowCustomPath": true,
+ "Pattern": "{{ Model.ContentItem | display_text | slugify }}",
+ "ShowHomepageOption": true
+ },
+ "ContentTypePartSettings": {
+ "Position": "1"
+ }
+ }
+ },
+ {
+ "PartName": "HtmlBodyPart",
+ "Name": "HtmlBodyPart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Editor": "Wysiwyg",
+ "Position": "2"
+ }
+ }
+ },
+ {
+ "PartName": "TitlePart",
+ "Name": "TitlePart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "0"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "BlogPost",
+ "DisplayName": "Blog Post",
+ "Hidden": false,
+ "Settings": {
+ "ContentTypeSettings": {
+ "Draftable": true,
+ "Versionable": true
+ }
+ },
+ "ContentTypePartDefinitionRecords": [
+ {
+ "PartName": "TitlePart",
+ "Name": "TitlePart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "0"
+ }
+ }
+ },
+ {
+ "PartName": "AutoroutePart",
+ "Name": "AutoroutePart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "1"
+ },
+ "AutoroutePartSettings": {
+ "AllowCustomPath": true,
+ "Pattern": "{{ Model.ContentItem | container | display_text | slugify }}/{{ Model.ContentItem | display_text | slugify }}",
+ "ShowHomepageOption": false
+ }
+ }
+ },
+ {
+ "PartName": "BlogPost",
+ "Name": "BlogPost",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "3"
+ }
+ }
+ },
+ {
+ "PartName": "MarkdownBodyPart",
+ "Name": "MarkdownBodyPart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Editor": "Wysiwyg",
+ "Position": "2"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Blog",
+ "DisplayName": "Blog",
+ "Hidden": false,
+ "Settings": {
+ "ContentTypeSettings": {
+ "Creatable": true,
+ "Draftable": true,
+ "Versionable": true,
+ "Listable": true,
+ "Securable": true
+ }
+ },
+ "ContentTypePartDefinitionRecords": [
+ {
+ "PartName": "TitlePart",
+ "Name": "TitlePart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "0"
+ }
+ }
+ },
+ {
+ "PartName": "AutoroutePart",
+ "Name": "AutoroutePart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "1"
+ },
+ "LuceneContentIndexSettings": {
+ "Included": false,
+ "Stored": false,
+ "Keyword": false
+ },
+ "AutoroutePartSettings": {
+ "AllowCustomPath": true,
+ "Pattern": "{{ Model.ContentItem | display_text | slugify }}",
+ "ShowHomepageOption": true
+ }
+ }
+ },
+ {
+ "PartName": "Blog",
+ "Name": "Blog",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "3"
+ }
+ }
+ },
+ {
+ "PartName": "HtmlBodyPart",
+ "Name": "HtmlBodyPart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "2"
+ }
+ }
+ },
+ {
+ "PartName": "ListPart",
+ "Name": "ListPart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "4"
+ },
+ "ListPartSettings": {
+ "PageSize": 10,
+ "ContainedContentTypes": [
+ "BlogPost"
+ ]
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Container",
+ "DisplayName": "Container",
+ "Settings": {
+ "ContentTypeSettings": {
+ "Draftable": true,
+ "Versionable": true,
+ "Securable": true,
+ "Stereotype": "Widget"
+ }
+ },
+ "ContentTypePartDefinitionRecords": [
+ {
+ "PartName": "Container",
+ "Name": "Container",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "0"
+ }
+ }
+ },
+ {
+ "PartName": "FlowPart",
+ "Name": "FlowPart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "1"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Blockquote",
+ "DisplayName": "Blockquote",
+ "Settings": {
+ "ContentTypeSettings": {
+ "Draftable": true,
+ "Versionable": true,
+ "Securable": true,
+ "Stereotype": "Widget"
+ }
+ },
+ "ContentTypePartDefinitionRecords": [
+ {
+ "PartName": "Blockquote",
+ "Name": "Blockquote",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "0"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Image",
+ "DisplayName": "Image",
+ "Settings": {
+ "ContentTypeSettings": {
+ "Draftable": true,
+ "Versionable": true,
+ "Securable": true,
+ "Stereotype": "Widget"
+ }
+ },
+ "ContentTypePartDefinitionRecords": [
+ {
+ "PartName": "Image",
+ "Name": "Image",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "0"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Paragraph",
+ "DisplayName": "Paragraph",
+ "Settings": {
+ "ContentTypeSettings": {
+ "Draftable": true,
+ "Versionable": true,
+ "Securable": true,
+ "Stereotype": "Widget"
+ }
+ },
+ "ContentTypePartDefinitionRecords": [
+ {
+ "PartName": "Paragraph",
+ "Name": "Paragraph",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "0"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "RawHtml",
+ "DisplayName": "Raw Html",
+ "Settings": {
+ "ContentTypeSettings": {
+ "Draftable": true,
+ "Versionable": true,
+ "Securable": true,
+ "Stereotype": "Widget"
+ }
+ },
+ "ContentTypePartDefinitionRecords": [
+ {
+ "PartName": "RawHtml",
+ "Name": "RawHtml",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "0"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Page",
+ "DisplayName": "Page",
+ "Settings": {
+ "ContentTypeSettings": {
+ "Creatable": true,
+ "Draftable": true,
+ "Versionable": true,
+ "Listable": true,
+ "Securable": true
+ }
+ },
+ "ContentTypePartDefinitionRecords": [
+ {
+ "PartName": "Page",
+ "Name": "Page",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "3"
+ }
+ }
+ },
+ {
+ "PartName": "AutoroutePart",
+ "Name": "AutoroutePart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "1"
+ },
+ "AutoroutePartSettings": {
+ "AllowCustomPath": true,
+ "Pattern": "{{ Model.ContentItem | display_text | slugify }}",
+ "ShowHomepageOption": true
+ }
+ }
+ },
+ {
+ "PartName": "FlowPart",
+ "Name": "FlowPart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "2"
+ }
+ }
+ },
+ {
+ "PartName": "TitlePart",
+ "Name": "TitlePart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "0"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Tag",
+ "DisplayName": "Tag",
+ "Settings": {
+ "ContentTypeSettings": {},
+ "FullTextAspectSettings": {}
+ },
+ "ContentTypePartDefinitionRecords": [
+ {
+ "PartName": "Tag",
+ "Name": "Tag",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "1"
+ }
+ }
+ },
+ {
+ "PartName": "TitlePart",
+ "Name": "TitlePart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "0"
+ }
+ }
+ },
+ {
+ "PartName": "AutoroutePart",
+ "Name": "AutoroutePart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "2"
+ },
+ "AutoroutePartSettings": {
+ "AllowCustomPath": true,
+ "Pattern": "{{ Model.ContentItem | display_text | slugify }}",
+ "ManageContainedItemRoutes": true
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Category",
+ "DisplayName": "Category",
+ "Settings": {
+ "ContentTypeSettings": {},
+ "FullTextAspectSettings": {}
+ },
+ "ContentTypePartDefinitionRecords": [
+ {
+ "PartName": "Category",
+ "Name": "Category",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "1"
+ }
+ }
+ },
+ {
+ "PartName": "TitlePart",
+ "Name": "TitlePart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "0"
+ }
+ }
+ },
+ {
+ "PartName": "AutoroutePart",
+ "Name": "AutoroutePart",
+ "Settings": {
+ "ContentTypePartSettings": {
+ "Position": "2"
+ },
+ "AutoroutePartSettings": {
+ "AllowCustomPath": true,
+ "Pattern": "{{ Model.ContentItem | display_text | slugify }}",
+ "ManageContainedItemRoutes": true
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "ContentParts": [
+ {
+ "Name": "Blog",
+ "Settings": {},
+ "ContentPartFieldDefinitionRecords": [
+ {
+ "FieldName": "MediaField",
+ "Name": "Image",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Banner Image",
+ "Position": "0"
+ },
+ "LuceneContentIndexSettings": {
+ "Included": false,
+ "Stored": false,
+ "Keyword": false
+ },
+ "MediaFieldSettings": {
+ "Multiple": false,
+ "AllowAnchors": true
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "BlogPost",
+ "Settings": {},
+ "ContentPartFieldDefinitionRecords": [
+ {
+ "FieldName": "TextField",
+ "Name": "Subtitle",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Subtitle",
+ "Position": "0"
+ }
+ }
+ },
+ {
+ "FieldName": "MediaField",
+ "Name": "Image",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Banner Image",
+ "Position": "1"
+ },
+ "LuceneContentIndexSettings": {
+ "Included": false,
+ "Stored": false,
+ "Keyword": false
+ },
+ "MediaFieldSettings": {
+ "Multiple": false,
+ "AllowAnchors": true
+ }
+ }
+ },
+ {
+ "FieldName": "TaxonomyField",
+ "Name": "Tags",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Tags",
+ "Editor": "Tags",
+ "DisplayMode": "Tags",
+ "Position": "2"
+ },
+ "TaxonomyFieldSettings": {
+ "TaxonomyContentItemId": "[js: variables('tagsContentItemId')]"
+ },
+ "TaxonomyFieldTagsEditorSettings": {}
+ }
+ },
+ {
+ "FieldName": "TaxonomyField",
+ "Name": "Category",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Category",
+ "Position": "3"
+ },
+ "TaxonomyFieldSettings": {
+ "TaxonomyContentItemId": "[js: variables('categoriesContentItemId')]",
+ "Unique": true,
+ "LeavesOnly": true
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Article",
+ "Settings": {},
+ "ContentPartFieldDefinitionRecords": [
+ {
+ "FieldName": "TextField",
+ "Name": "Subtitle",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Subtitle",
+ "Position": "0"
+ }
+ }
+ },
+ {
+ "FieldName": "MediaField",
+ "Name": "Image",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Banner Image",
+ "Position": "0"
+ },
+ "MediaFieldSettings": {
+ "Multiple": false,
+ "AllowAnchors": true
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Blockquote",
+ "Settings": {},
+ "ContentPartFieldDefinitionRecords": [
+ {
+ "FieldName": "TextField",
+ "Name": "Quote",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Quote",
+ "Editor": "TextArea",
+ "Position": "0"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Image",
+ "Settings": {
+ "Attachable": true
+ },
+ "ContentPartFieldDefinitionRecords": [
+ {
+ "FieldName": "MediaField",
+ "Name": "Media",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Image",
+ "Position": "0"
+ },
+ "MediaFieldSettings": {
+ "Multiple": false,
+ "Required": true
+ }
+ }
+ },
+ {
+ "FieldName": "TextField",
+ "Name": "Caption",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Caption",
+ "Position": "1"
+ },
+ "TextFieldSettings": {
+ "Hint": "A description of the image used as title or alternate text"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Paragraph",
+ "Settings": {},
+ "ContentPartFieldDefinitionRecords": [
+ {
+ "FieldName": "HtmlField",
+ "Name": "Content",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Content",
+ "Position": "0",
+ "Editor": "Wysiwyg"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "RawHtml",
+ "Settings": {},
+ "ContentPartFieldDefinitionRecords": [
+ {
+ "FieldName": "HtmlField",
+ "Name": "Content",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Content",
+ "Position": "0",
+ "Editor": "Multiline"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Category",
+ "Settings": {},
+ "ContentPartFieldDefinitionRecords": [
+ {
+ "FieldName": "TextField",
+ "Name": "Icon",
+ "Settings": {
+ "ContentPartFieldSettings": {
+ "DisplayName": "Icon",
+ "Editor": "IconPicker",
+ "Position": "0"
+ },
+ "TextFieldSettings": {
+ "Required": true
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "content",
+ "Data": [
+ {
+ "ContentType": "Menu",
+ "ContentItemId": "[js: variables('menuContentItemId')]",
+ "Owner": "[js: parameters('AdminUserId')]",
+ "Author": "[js: parameters('AdminUsername')]",
+ "DisplayText": "Main Menu",
+ "Latest": true,
+ "Published": true,
+ "MenuPart": {},
+ "TitlePart": {
+ "Title": "Main Menu"
+ },
+ "MenuItemsListPart": {
+ "MenuItems": [
+ {
+ "ContentType": "LinkMenuItem",
+ "ContentItemId": "[js: uuid()]",
+ "DisplayText": "Home",
+ "LinkMenuItemPart": {
+ "Name": "Home",
+ "Url": "~/"
+ }
+ },
+ {
+ "ContentType": "LinkMenuItem",
+ "ContentItemId": "[js: uuid()]",
+ "DisplayText": "About",
+ "LinkMenuItemPart": {
+ "Name": "About",
+ "Url": "~/about"
+ }
+ }
+ ]
+ },
+ "AliasPart": {
+ "Alias": "main-menu"
+ }
+ },
+ {
+ "ContentItemId": "[js: variables('tagsContentItemId')]",
+ "Owner": "[js: parameters('AdminUserId')]",
+ "Author": "[js: parameters('AdminUsername')]",
+ "ContentType": "Taxonomy",
+ "DisplayText": "Tags",
+ "Latest": true,
+ "Published": true,
+ "TitlePart": {
+ "Title": "Tags"
+ },
+ "AliasPart": {
+ "Alias": "tags"
+ },
+ "TaxonomyPart": {
+ "Terms": [
+ {
+ "ContentItemId": "[js: variables('earthTagContentItemId')]",
+ "ContentType": "Tag",
+ "DisplayText": "Earth",
+ "TitlePart": {
+ "Title": "Earth"
+ },
+ "AutoroutePart": {
+ "Path": "earth"
+ },
+ "TermPart": {
+ "TaxonomyContentItemId": "[js: variables('tagsContentItemId')]"
+ }
+ },
+ {
+ "ContentItemId": "[js: variables('explorationTagContentItemId')]",
+ "ContentType": "Tag",
+ "DisplayText": "Exploration",
+ "TitlePart": {
+ "Title": "Exploration"
+ },
+ "AutoroutePart": {
+ "Path": "exploration"
+ },
+ "TermPart": {
+ "TaxonomyContentItemId": "[js: variables('tagsContentItemId')]"
+ }
+ },
+ {
+ "ContentItemId": "[js: variables('spaceTagContentItemId')]",
+ "ContentType": "Tag",
+ "DisplayText": "Space",
+ "TitlePart": {
+ "Title": "Space"
+ },
+ "AutoroutePart": {
+ "Path": "space"
+ },
+ "TermPart": {
+ "TaxonomyContentItemId": "[js: variables('tagsContentItemId')]"
+ }
+ }
+ ],
+ "TermContentType": "Tag"
+ },
+ "AutoroutePart": {
+ "Path": "tags",
+ "RouteContainedItems": true
+ }
+ },
+ {
+ "ContentItemId": "[js: variables('categoriesContentItemId')]",
+ "Owner": "[js: parameters('AdminUserId')]",
+ "Author": "[js: parameters('AdminUsername')]",
+ "ContentType": "Taxonomy",
+ "DisplayText": "Categories",
+ "Latest": true,
+ "Published": true,
+ "TitlePart": {
+ "Title": "Categories"
+ },
+ "AliasPart": {
+ "Alias": "categories"
+ },
+ "TaxonomyPart": {
+ "Terms": [
+ {
+ "ContentItemId": "[js: variables('categoryTravelContentItemId')]",
+ "ContentType": "Category",
+ "DisplayText": "Travel",
+ "Category": {
+ "Icon": {
+ "Text": "fas fa-globe-americas"
+ }
+ },
+ "TitlePart": {
+ "Title": "Travel"
+ },
+ "AutoroutePart": {
+ "Path": "travel"
+ },
+ "TermPart": {
+ "TaxonomyContentItemId": "[js: variables('categoriesContentItemId')]"
+ }
+ }
+ ],
+ "TermContentType": "Category"
+ },
+ "AutoroutePart": {
+ "Path": "categories",
+ "RouteContainedItems": true
+ }
+ },
+ {
+ "ContentType": "Blog",
+ "ContentItemId": "[js: variables('blogContentItemId')]",
+ "DisplayText": "Blog",
+ "Latest": true,
+ "Published": true,
+ "Owner": "[js: parameters('AdminUserId')]",
+ "Author": "[js: parameters('AdminUsername')]",
+ "TitlePart": {
+ "Title": "Blog"
+ },
+ "HtmlBodyPart": {
+ "Html": "This is the description of your blog"
+ },
+ "AutoroutePart": {
+ "Path": "blog"
+ },
+ "ListPart": {},
+ "Blog": {
+ "Image": {
+ "Paths": [
+ "home-bg.jpg"
+ ],
+ "MediaTexts": [
+ ""
+ ],
+ "Anchors": [
+ {
+ "X": 0.5,
+ "Y": 0.5
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ContentType": "BlogPost",
+ "ContentItemId": "[js: uuid()]",
+ "DisplayText": "Man must explore, and this is exploration at its greatest",
+ "Latest": true,
+ "Published": true,
+ "Owner": "[js: parameters('AdminUserId')]",
+ "Author": "[js: parameters('AdminUsername')]",
+ "TitlePart": {
+ "Title": "Man must explore, and this is exploration at its greatest"
+ },
+ "ContainedPart": {
+ "ListContentItemId": "[js: variables('blogContentItemId')]",
+ "Order": 0
+ },
+ "MarkdownBodyPart": {
+ "Markdown": "Never in all their history have men been able truly to conceive of the world as one: a single sphere, a globe, having the qualities of a globe, a round earth in which all the directions eventually meet, in which there is no center because every point, or none, is center — an equal earth which all men occupy as equals. The airman's earth, if free men make it, will be truly round: a globe in practice, not in theory.\n\nScience cuts two ways, of course; its products can be used for both good and evil. But there's no turning back from science. The early warnings about technological dangers also come from science.\n\nWhat was most significant about the lunar voyage was not that man set foot on the Moon but that they set eye on the earth.\n\nA Chinese tale tells of some men sent to harm a young girl who, upon seeing her beauty, become her protectors rather than her violators. That's how I felt seeing the Earth for the first time. I could not help but love and cherish her.\n\nFor those who have seen the Earth from space, and for the hundreds and perhaps thousands more who will, the experience most certainly changes your perspective. The things that we share in our world are far more valuable than those which divide us."
+ },
+ "AutoroutePart": {
+ "Path": "blog/post-1"
+ },
+ "BlogPost": {
+ "Subtitle": {
+ "Text": "Problems look mighty small from 150 miles up"
+ },
+ "Image": {
+ "Paths": [
+ "post-bg.jpg"
+ ],
+ "MediaTexts": [
+ ""
+ ],
+ "Anchors": [
+ {
+ "X": 0.5,
+ "Y": 0.5
+ }
+ ]
+ },
+ "Tags": {
+ "TermContentItemIds": [
+ "[js: variables('earthTagContentItemId')]",
+ "[js: variables('explorationTagContentItemId')]",
+ "[js: variables('spaceTagContentItemId')]"
+ ],
+ "TaxonomyContentItemId": "[js: variables('tagsContentItemId')]",
+ "TagNames": [
+ "Earth",
+ "Exploration",
+ "Space"
+ ]
+ },
+ "Category": {
+ "TermContentItemIds": [
+ "[js: variables('categoryTravelContentItemId')]"
+ ],
+ "TaxonomyContentItemId": "[js: variables('categoriesContentItemId')]"
+ }
+ }
+ },
+ {
+ "ContentItemId": "[js: uuid()]",
+ "ContentType": "Article",
+ "DisplayText": "About",
+ "Latest": true,
+ "Published": true,
+ "Owner": "[js: parameters('AdminUserId')]",
+ "Author": "[js: parameters('AdminUsername')]",
+ "AutoroutePart": {
+ "Path": "about",
+ "SetHomepage": false
+ },
+ "HtmlBodyPart": {
+ "Html": "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe nostrum ullam eveniet pariatur voluptates odit, fuga atque ea nobis sit soluta odio, adipisci quas excepturi maxime quae totam ducimus consectetur?
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius praesentium recusandae illo eaque architecto error, repellendus iusto reprehenderit, doloribus, minus sunt. Numquam at quae voluptatum in officia voluptas voluptatibus, minus!
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nostrum molestiae debitis nobis, quod sapiente qui voluptatum, placeat magni repudiandae accusantium fugit quas labore non rerum possimus, corrupti enim modi! Et.
"
+ },
+ "TitlePart": {
+ "Title": "About"
+ },
+ "Article": {
+ "Subtitle": {
+ "Text": "This is what I do."
+ },
+ "Image": {
+ "Paths": [
+ "about-bg.jpg"
+ ]
+ }
+ }
+ },
+ {
+ "ContentItemId": "[js: uuid()]",
+ "ContentType": "RawHtml",
+ "Displaytext": "Footer",
+ "Latest": true,
+ "Published": true,
+ "Owner": "[js: parameters('AdminUserId')]",
+ "Author": "[js: parameters('AdminUsername')]",
+ "LayerMetadata": {
+ "Layer": "Always",
+ "Zone": "Footer",
+ "RenderTitle": false,
+ "Position": 10
+ },
+ "RawHtml": {
+ "Content": {
+ "Html": "This is only a testing footer
"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "name": "layers",
+ "Layers": [
+ {
+ "Name": "Always",
+ "LayerRule": {
+ "ConditionId": "[js: uuid()]",
+ "Conditions": [
+ {
+ "$type": "OrchardCore.Rules.Models.BooleanCondition, OrchardCore.Rules",
+ "Name": "BooleanCondition",
+ "Value": true,
+ "ConditionId": "[js: uuid()]"
+ }
+ ]
+ },
+ "Description": "The widgets in this layer are displayed on any page of this site."
+ },
+ {
+ "Name": "Homepage",
+ "LayerRule": {
+ "ConditionId": "[js: uuid()]",
+ "Conditions": [
+ {
+ "$type": "OrchardCore.Rules.Models.HomepageCondition, OrchardCore.Rules",
+ "Name": "HomepageCondition",
+ "Value": true,
+ "ConditionId": "[js: uuid()]"
+ }
+ ]
+ },
+ "Description": "The widgets in this layer are only displayed on the homepage."
+ }
+ ]
+ },
+ {
+ "name": "queries",
+ "Queries": [
+ {
+ "Source": "Sql",
+ "Name": "RecentBlogPosts",
+ "Template": "SELECT * FROM ContentItemIndex WHERE ContentType='BlogPost' ORDER BY CreatedUtc DESC LIMIT 3",
+ "Schema": "[js:base64('ew0KICAgICJ0eXBlIjogIkNvbnRlbnRJdGVtL0Jsb2dQb3N0Ig0KfQ==')]",
+ "ReturnContentItems": true
+ }
+ ]
+ },
+ {
+ "name": "AdminMenu",
+ "data": [
+ {
+ "Id": "baef6f85ad13481681cde70ada401333",
+ "Name": "Admin menus",
+ "Enabled": true,
+ "MenuItems": [
+ {
+ "$type": "OrchardCore.AdminMenu.AdminNodes.LinkAdminNode, OrchardCore.AdminMenu",
+ "LinkText": "Blog",
+ "LinkUrl": "[js: variables('adminUrlPrefix') + '/Contents/ContentItems/' + variables('blogContentItemId') + '/Display']",
+ "IconClass": "fas fa-rss",
+ "PermissionNames": [],
+ "UniqueId": "7b293d57056a4eebb3713f07f12c65d8",
+ "Enabled": true,
+ "Text": null,
+ "Id": null,
+ "Href": null,
+ "Url": null,
+ "Position": null,
+ "LinkToFirstChild": true,
+ "LocalNav": false,
+ "Culture": null,
+ "Items": [],
+ "Classes": []
+ },
+ {
+ "$type": "OrchardCore.AdminMenu.AdminNodes.LinkAdminNode, OrchardCore.AdminMenu",
+ "LinkText": "Main Menu",
+ "LinkUrl": "[js: variables('adminUrlPrefix') + '/Contents/ContentItems/' + variables('menuContentItemId') + '/Edit']",
+ "IconClass": "fas fa-sitemap",
+ "PermissionNames": [],
+ "UniqueId": "5118cecfde834dacb26ac08980f1b5a7",
+ "Enabled": true,
+ "Text": null,
+ "Id": null,
+ "Href": null,
+ "Url": null,
+ "Position": null,
+ "LinkToFirstChild": true,
+ "LocalNav": false,
+ "Culture": null,
+ "Items": [],
+ "Classes": []
+ },
+ {
+ "$type": "OrchardCore.AdminMenu.AdminNodes.PlaceholderAdminNode, OrchardCore.AdminMenu",
+ "LinkText": "Content",
+ "IconClass": null,
+ "PermissionNames": [],
+ "UniqueId": "3e590d44f8704e4588e272dd966ce291",
+ "Enabled": true,
+ "Text": null,
+ "Id": null,
+ "Href": null,
+ "Url": null,
+ "Position": null,
+ "LinkToFirstChild": true,
+ "LocalNav": false,
+ "Culture": null,
+ "Items": [
+ {
+ "$type": "OrchardCore.AdminMenu.AdminNodes.LinkAdminNode, OrchardCore.AdminMenu",
+ "LinkText": "Content Items",
+ "LinkUrl": "[js: variables('adminUrlPrefix') + '/Contents/ContentItems/']",
+ "IconClass": null,
+ "UniqueId": "7b293d57056a4eebb3713f07f12c65d9",
+ "Enabled": true,
+ "Text": null,
+ "Id": null,
+ "Href": null,
+ "Url": null,
+ "Position": 0,
+ "LinkToFirstChild": true,
+ "LocalNav": false,
+ "Culture": null,
+ "Items": [],
+ "Classes": []
+ },
+ {
+ "$type": "OrchardCore.AdminMenu.AdminNodes.PlaceholderAdminNode, OrchardCore.AdminMenu",
+ "LinkText": "Content Types",
+ "IconClass": null,
+ "PermissionNames": [],
+ "UniqueId": "2f1fc33133334a1abf7d1a0516ee8b4e",
+ "Enabled": true,
+ "Text": null,
+ "Id": null,
+ "Href": null,
+ "Url": null,
+ "Position": 1,
+ "Priority": 50,
+ "LinkToFirstChild": true,
+ "LocalNav": false,
+ "Culture": null,
+ "Items": [
+ {
+ "$type": "OrchardCore.Contents.AdminNodes.ContentTypesAdminNode, OrchardCore.Contents",
+ "ShowAll": true,
+ "IconClass": null,
+ "ContentTypes": [],
+ "UniqueId": "ee18224e1b814c638b0732678b74cfd9",
+ "Enabled": true,
+ "Text": null,
+ "Id": null,
+ "Href": null,
+ "Url": null,
+ "Position": null,
+ "LinkToFirstChild": true,
+ "LocalNav": false,
+ "Culture": null,
+ "Items": [],
+ "Classes": []
+ }
+ ],
+ "Classes": []
+ }
+ ],
+ "Classes": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "MediaProfiles",
+ "MediaProfiles": {
+ "banner": {
+ "Hint": "A banner image (2048px x 600px, cropped)",
+ "Width": 2048,
+ "Height": 600,
+ "Mode": 2,
+ "Format": 0,
+ "Quality": 100
+ }
+ }
+ }
+ ]
+}
diff --git a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/000-saas-setup.js b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/000-saas-setup.js
index 486e9652cee..214c84e6ae4 100644
--- a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/000-saas-setup.js
+++ b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/000-saas-setup.js
@@ -5,7 +5,6 @@ const sassSite = {
setupRecipe: "SaaS",
}
-
describe('Setup SaaS', function () {
it('Successfully setup the SaaS default tenant', function () {
cy.visit('/');
diff --git a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/agency-test.js b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/agency-test.js
index 00465878803..28cced3084c 100644
--- a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/agency-test.js
+++ b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/agency-test.js
@@ -18,8 +18,6 @@ describe('Agency Tests', function () {
it('Agency admin login should work', function(){
cy.login(tenant);
cy.visit(`${tenant.prefix}/Admin`);
- cy.get('.ta-content').should('contain.text', 'Welcome to Orchard')
+ cy.get('.menu-admin').should('have.id', 'adminMenu')
})
-
-
});
diff --git a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/blog-test.js b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/blog-test.js
index 5bd6a140cb6..e8f1be29125 100644
--- a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/blog-test.js
+++ b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/blog-test.js
@@ -19,6 +19,6 @@ describe('Blog Tests', function () {
it('Blog admin login should work', function(){
cy.login(tenant);
cy.visit(`${tenant.prefix}/Admin`);
- cy.get('.ta-content').should('contain.text', 'Welcome to Orchard');
+ cy.get('.menu-admin').should('have.id', 'adminMenu')
})
});
diff --git a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/comingsoon-test.js b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/comingsoon-test.js
index affb51c3be0..6c81cd470c8 100644
--- a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/comingsoon-test.js
+++ b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/comingsoon-test.js
@@ -18,6 +18,6 @@ describe('ComingSoon Recipe test', function () {
it('ComingSoon admin login should work', function(){
cy.login(tenant);
cy.visit(`${tenant.prefix}/Admin`);
- cy.get('.ta-content').should('contain.text', 'Welcome to Orchard')
+ cy.get('.menu-admin').should('have.id', 'adminMenu')
})
});
diff --git a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/headless-test.js b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/headless-test.js
index 1e6d2a75880..af86eada00d 100644
--- a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/headless-test.js
+++ b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/headless-test.js
@@ -17,6 +17,6 @@ describe('Headless Recipe test', function () {
it('Headless admin login should work', function(){
cy.login(tenant);
cy.visit(`${tenant.prefix}/Admin`);
- cy.get('.ta-content').should('contain.text', 'Welcome to Orchard')
+ cy.get('.menu-admin').should('have.id', 'adminMenu')
})
});
diff --git a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/migrations-test.js b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/migrations-test.js
new file mode 100644
index 00000000000..18a75af5be8
--- /dev/null
+++ b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/migrations-test.js
@@ -0,0 +1,24 @@
+///
+
+import { generateTenantInfo } from 'cypress-orchardcore/dist/utils';
+
+describe('Migrations Tests', function () {
+ let tenant;
+
+ before(() => {
+ // generate the migrations tenant
+ tenant = generateTenantInfo("Migrations")
+ cy.newTenant(tenant);
+ })
+
+ it('Displays the home page of the migrations recipe', function () {
+ cy.visit(`${tenant.prefix}`);
+ cy.get('.subheading').should('contain.text', 'This is the description of your blog');
+ })
+
+ it('Migrations admin login should work', function () {
+ cy.login(tenant);
+ cy.visit(`${tenant.prefix}/Admin`);
+ cy.get('.menu-admin').should('have.id', 'adminMenu')
+ })
+});
diff --git a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/sass-test.js b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/sass-test.js
index 5d37d404c46..c5c32f5bea8 100644
--- a/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/sass-test.js
+++ b/test/OrchardCore.Tests.Functional/cms-tests/cypress/integration/sass-test.js
@@ -17,6 +17,6 @@ describe('SaaS Recipe test', function () {
it('SaaS admin login should work', function(){
cy.login(tenant);
cy.visit(`${tenant.prefix}/Admin`);
- cy.get('.ta-content').should('contain.text', 'Welcome to Orchard')
+ cy.get('.menu-admin').should('have.id', 'adminMenu')
})
});
diff --git a/test/OrchardCore.Tests.Functional/cypress-commands/dist/test-runner.js b/test/OrchardCore.Tests.Functional/cypress-commands/dist/test-runner.js
index cdd540ca1b5..71eec7b3929 100644
--- a/test/OrchardCore.Tests.Functional/cypress-commands/dist/test-runner.js
+++ b/test/OrchardCore.Tests.Functional/cypress-commands/dist/test-runner.js
@@ -24,6 +24,14 @@ function deleteDirectory(dir) {
global.log(`${dir} deleted`);
}
+// Copy the migrations recipe
+function copyMigrationsRecipeFile(dir) {
+ if (fs.existsSync('./Recipes/migrations.recipe.json')) {
+ fs.copyFile('./Recipes/migrations.recipe.json', `${dir}/Recipes/migrations.recipe.json`);
+ global.log(`migrations recipe copied to ${dir}/Recipes`);
+ }
+}
+
// Host the dotnet application, does not rebuild
function host(dir, assembly, { appDataLocation='./App_Data', dotnetVersion='net7.0' }={}) {
if (fs.existsSync(path.join(dir, `bin/Release/${dotnetVersion}/`, assembly))) {
@@ -58,6 +66,7 @@ function host(dir, assembly, { appDataLocation='./App_Data', dotnetVersion='net7
// combines the functions above, useful when triggering tests from CI
function e2e(dir, assembly, { dotnetVersion='net7.0' }={}) {
+ copyMigrationsRecipeFile(dir);
deleteDirectory(path.join(dir, "App_Data_Tests"));
var server = host(dir, assembly, { appDataLocation: "./App_Data_Tests", dotnetVersion });
diff --git a/test/OrchardCore.Tests/OrchardCore.Tests.csproj b/test/OrchardCore.Tests/OrchardCore.Tests.csproj
index 1fb053a61fd..aaaf2f9d06f 100644
--- a/test/OrchardCore.Tests/OrchardCore.Tests.csproj
+++ b/test/OrchardCore.Tests/OrchardCore.Tests.csproj
@@ -33,16 +33,16 @@
+
-
-
-
+
+