mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-15 17:06:01 +08:00
Fixing last blog specflow tests
--HG-- branch : 1.x
This commit is contained in:
parent
de7681879b
commit
c2d6a28732
@ -1,4 +1,4 @@
|
|||||||
e800b87c0c7de675a59cf35db10d82d75b8625fa src/Orchard.Web/Modules/Orchard.Autoroute
|
f892519aacc32cbacc562ae5f1461ca9c5fd4919 src/Orchard.Web/Modules/Orchard.Autoroute
|
||||||
c54cb640d6bc14c51b9fb9bd78231bb0facec067 src/Orchard.Web/Modules/Orchard.Forms
|
c54cb640d6bc14c51b9fb9bd78231bb0facec067 src/Orchard.Web/Modules/Orchard.Forms
|
||||||
204bdef384f41bb5e463bed6b98a056945a7d839 src/Orchard.Web/Modules/Orchard.Rules
|
204bdef384f41bb5e463bed6b98a056945a7d839 src/Orchard.Web/Modules/Orchard.Rules
|
||||||
ce578373f907c0a55fd91229a344f0755f290174 src/Orchard.Web/Modules/Orchard.TaskLease
|
ce578373f907c0a55fd91229a344f0755f290174 src/Orchard.Web/Modules/Orchard.TaskLease
|
||||||
|
@ -67,7 +67,7 @@ Scenario: I can create a new blog with multiple blog posts each with the same ti
|
|||||||
And I fill in
|
And I fill in
|
||||||
| name | value |
|
| name | value |
|
||||||
| Title.Title | My Post |
|
| Title.Title | My Post |
|
||||||
| Autoroute.CurrentUrl | my-post |
|
| Autoroute.CurrentUrl | my-blog/my-post |
|
||||||
| Body.Text | Are you still there? |
|
| Body.Text | Are you still there? |
|
||||||
And I hit "Publish Now"
|
And I hit "Publish Now"
|
||||||
And I go to "my-blog/my-post-3"
|
And I go to "my-blog/my-post-3"
|
||||||
@ -120,7 +120,7 @@ Scenario: The virtual path of my installation when not at the root is reflected
|
|||||||
And I go to "admin/blogs"
|
And I go to "admin/blogs"
|
||||||
And I follow "My Blog"
|
And I follow "My Blog"
|
||||||
And I follow "New Post" where class name has "primaryAction"
|
And I follow "New Post" where class name has "primaryAction"
|
||||||
Then I should see "<span>http\://localhost/OrchardLocal/my-blog/</span>"
|
Then I should see "<span>http\://localhost/OrchardLocal/</span>"
|
||||||
|
|
||||||
Scenario: The virtual path of my installation when at the root is reflected in the URL example for the slug field when creating a blog or blog post
|
Scenario: The virtual path of my installation when at the root is reflected in the URL example for the slug field when creating a blog or blog post
|
||||||
Given I have installed Orchard at "/"
|
Given I have installed Orchard at "/"
|
||||||
@ -133,7 +133,7 @@ Scenario: The virtual path of my installation when at the root is reflected in t
|
|||||||
And I go to "admin/blogs"
|
And I go to "admin/blogs"
|
||||||
And I follow "My Blog"
|
And I follow "My Blog"
|
||||||
And I follow "New Post" where class name has "primaryAction"
|
And I follow "New Post" where class name has "primaryAction"
|
||||||
Then I should see "<span>http\://localhost/my-blog/</span>"
|
Then I should see "<span>http\://localhost/</span>"
|
||||||
|
|
||||||
Scenario: I set my blog to be the content for the home page and the posts for the blog be rooted to the app
|
Scenario: I set my blog to be the content for the home page and the posts for the blog be rooted to the app
|
||||||
Given I have installed Orchard
|
Given I have installed Orchard
|
||||||
|
6
src/Orchard.Specs/Blogs.feature.cs
generated
6
src/Orchard.Specs/Blogs.feature.cs
generated
@ -235,7 +235,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
"My Post"});
|
"My Post"});
|
||||||
table6.AddRow(new string[] {
|
table6.AddRow(new string[] {
|
||||||
"Autoroute.CurrentUrl",
|
"Autoroute.CurrentUrl",
|
||||||
"my-post"});
|
"my-blog/my-post"});
|
||||||
table6.AddRow(new string[] {
|
table6.AddRow(new string[] {
|
||||||
"Body.Text",
|
"Body.Text",
|
||||||
"Are you still there?"});
|
"Are you still there?"});
|
||||||
@ -385,7 +385,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 122
|
#line 122
|
||||||
testRunner.And("I follow \"New Post\" where class name has \"primaryAction\"");
|
testRunner.And("I follow \"New Post\" where class name has \"primaryAction\"");
|
||||||
#line 123
|
#line 123
|
||||||
testRunner.Then("I should see \"<span>http\\://localhost/OrchardLocal/my-blog/</span>\"");
|
testRunner.Then("I should see \"<span>http\\://localhost/OrchardLocal/</span>\"");
|
||||||
#line hidden
|
#line hidden
|
||||||
this.ScenarioCleanup();
|
this.ScenarioCleanup();
|
||||||
}
|
}
|
||||||
@ -423,7 +423,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 135
|
#line 135
|
||||||
testRunner.And("I follow \"New Post\" where class name has \"primaryAction\"");
|
testRunner.And("I follow \"New Post\" where class name has \"primaryAction\"");
|
||||||
#line 136
|
#line 136
|
||||||
testRunner.Then("I should see \"<span>http\\://localhost/my-blog/</span>\"");
|
testRunner.Then("I should see \"<span>http\\://localhost/</span>\"");
|
||||||
#line hidden
|
#line hidden
|
||||||
this.ScenarioCleanup();
|
this.ScenarioCleanup();
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ namespace Orchard.Utility.Extensions {
|
|||||||
/// <example>http://localhost:3030/OrchardLocal</example>
|
/// <example>http://localhost:3030/OrchardLocal</example>
|
||||||
/// <remarks>Prevents port number issues by using the client requested host</remarks>
|
/// <remarks>Prevents port number issues by using the client requested host</remarks>
|
||||||
public static string ToApplicationRootUrlString(this HttpRequestBase request) {
|
public static string ToApplicationRootUrlString(this HttpRequestBase request) {
|
||||||
string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath);
|
string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath == "/" ? string.Empty : request.ApplicationPath);
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ namespace Orchard.Utility.Extensions {
|
|||||||
/// <example>http://localhost:3030/OrchardLocal</example>
|
/// <example>http://localhost:3030/OrchardLocal</example>
|
||||||
/// <remarks>Prevents port number issues by using the client requested host</remarks>
|
/// <remarks>Prevents port number issues by using the client requested host</remarks>
|
||||||
public static string ToApplicationRootUrlString(this HttpRequest request) {
|
public static string ToApplicationRootUrlString(this HttpRequest request) {
|
||||||
string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath);
|
string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath == "/" ? string.Empty : request.ApplicationPath);
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user