Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name the link to execution log simply "Execution Log" #851

Merged
merged 5 commits into from Jan 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -36,3 +36,4 @@ FitNesseRoot/ErrorLogs/*
FitNesseRoot/files/testResults/*
FitNesseRoot/RecentChanges
desktop.ini
junit*.properties
2 changes: 1 addition & 1 deletion FitNesseRoot/FitNesse/ReleaseNotes/content.txt
Expand Up @@ -8,6 +8,7 @@
* FitNesse now uses java.util.concurrent thread pools instead of spawning unmanaged threads ([[830][https://github.com/unclebob/fitnesse/pull/830]])
* Execution log information is displayed when executing suites and tests with format=xml ([[816][https://github.com/unclebob/fitnesse/issues/816]])
* Many, many code consistency fixes thanks to @hansjoachim ([[807][https://github.com/unclebob/fitnesse/pull/807]], [[808][https://github.com/unclebob/fitnesse/pull/808]], [[810][https://github.com/unclebob/fitnesse/pull/810]], [[811][https://github.com/unclebob/fitnesse/pull/811]], [[812][https://github.com/unclebob/fitnesse/pull/812]], [[817][https://github.com/unclebob/fitnesse/pull/817]], [[818][https://github.com/unclebob/fitnesse/pull/818]], [[829][https://github.com/unclebob/fitnesse/pull/829]], [[836][https://github.com/unclebob/fitnesse/pull/836]], [[840][https://github.com/unclebob/fitnesse/pull/840]])
* Under the hood: JQuery has been upgraded to 1.11.3 (was 1.7.2)
* Issues fixed:
* Class path issues (on windows and paths with spaces) ([[821][https://github.com/unclebob/fitnesse/pull/821]])
* Fix issues with non-wiki words and symbolic links ([[820][https://github.com/unclebob/fitnesse/pull/820]])
Expand All @@ -29,7 +30,6 @@
* Rich text editor retains line breaks ([[756][https://github.com/unclebob/fitnesse/pull/756]], [[777][https://github.com/unclebob/fitnesse/pull/77]])
* XML result files do no longer contain HTML output by default (as it was a few releases ago) ([[771][https://github.com/unclebob/fitnesse/pull/771]])


For a complete list of closed issues and merged pull requests see https://github.com/unclebob/fitnesse/issues?milestone=12&state=closed.

!2 20150428
Expand Down
@@ -1,23 +1,23 @@
Create a simple test page

!|script|Page Builder|
|line|${SUT_PATH}|
|line|!-!|-!fitnesse.testutil.${FIXTURE_NAME}!-|-!|
|line|!-|blah|-!|
|page|!-TestPage-!|
!|script|Page Builder |
|line |${SUT_PATH} |
|line |!-!|-!fitnesse.testutil.${FIXTURE_NAME}!-|-!|
|line |!-|blah|-! |
|page |!-TestPage-! |

Now run the test page.

|Response Requester.|
|uri |valid?|
|!-TestPage?responder=test-!|true|
|Response Requester. |
|uri |valid?|
|!-TestPage?responder=test-!|true |

|Response Examiner.|
|contents?|
||
|contents? |
| |

Check the status message.

|Response Examiner.|
|type |pattern|matches?|
|contents|<a href=\\"\?executionLog\\" class=\\"${EXPECTED_STYLE}\\">${EXPECTED_STATUS_MESSAGE}</a>|true|
|Response Examiner. |
|type |pattern |matches?|
|contents|<a href=\\"\?executionLog\\" class=\\"${EXPECTED_STYLE}\\">Execution Log</a>|true |
Expand Up @@ -2,7 +2,6 @@ When errors occur, we get the message:
* Errors Occurred

!define FIXTURE_NAME {CrashFixture}
!define EXPECTED_STATUS_MESSAGE {Errors Occurred}
!define EXPECTED_STYLE {error}

!include DoTest
@@ -1,13 +1,11 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<properties>
<Edit/>
<Files/>
<Help></Help>
<Properties/>
<RecentChanges/>
<Refactor/>
<Suites/>
<Test/>
<Versions/>
<WhereUsed/>
<Edit/>
<Files/>
<Properties/>
<RecentChanges/>
<Refactor/>
<Test/>
<Versions/>
<WhereUsed/>
</properties>
Expand Up @@ -2,7 +2,6 @@ When everything works just fine we get the message:
* Tests Executed OK

!define FIXTURE_NAME {PassFixture}
!define EXPECTED_STATUS_MESSAGE {Tests Executed OK}
!define EXPECTED_STYLE {ok}

!include DoTest
@@ -1,8 +1,7 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<properties>
<Files/>
<Help></Help>
<RecentChanges/>
<Test/>
<WhereUsed/>
<Files/>
<RecentChanges/>
<Test/>
<WhereUsed/>
</properties>
13 changes: 6 additions & 7 deletions FitNesseRoot/FrontPage/content.txt
Expand Up @@ -4,11 +4,10 @@

To add your first "page", click the [[Edit][.FrontPage?edit]] button and add a [[!-WikiWord-!][.FitNesse.UserGuide.FitNesseWiki.WikiWord]] to the page.

|'''To Learn More...''' |
|[[A One-Minute Description][.FitNesse.UserGuide.OneMinuteDescription]]|''What is FitNesse Start here.'' |
|[[A Two-Minute Example][.FitNesse.UserGuide.TwoMinuteExample]] |''A brief example. Read this one next.'' |
|[[User Guide][.FitNesse.UserGuide]] |''Answer the rest of your questions here.''|
|[[Acceptance Tests][.FitNesse.SuiteAcceptanceTests]] |''FitNesse's suite of Acceptance Tests'' |
|[[Release Notes][.FitNesse.ReleaseNotes]] |''Find out about FitNesse's new features'' |
|'''To Learn More...''' |
|[[User Guide][.FitNesse.UserGuide]] |''Answer the rest of your questions here.''|
|[[A Two-Minute Example][.FitNesse.UserGuide.TwoMinuteExample]]|''A brief example. Read this one next.'' |
|[[Acceptance Tests][.FitNesse.SuiteAcceptanceTests]] |''FitNesse's suite of Acceptance Tests'' |
|[[Release Notes][.FitNesse.ReleaseNotes]] |''Find out about FitNesse's new features'' |

!note Release ${FITNESSE_VERSION}
!note Release ${FITNESSE_VERSION}
1 change: 0 additions & 1 deletion FitNesseRoot/FrontPage/properties.xml
Expand Up @@ -3,7 +3,6 @@
<AddChild/>
<Edit/>
<Files/>
<LastModifyingUser>arjan</LastModifyingUser>
<Properties/>
<Prune/>
<RecentChanges/>
Expand Down
4 changes: 2 additions & 2 deletions src/fitnesse/junit/JavaFormatter.java
Expand Up @@ -75,7 +75,7 @@ private void writeHeaderFor(String testName) throws IOException {
currentWriter
.write("</title><meta http-equiv='Content-Type' content='text/html;charset=" + FileUtil.CHARENCODING + "'/>"
+ "<link rel='stylesheet' type='text/css' href='css/fitnesse.css'/>"
+ "<script src='javascript/jquery-1.7.2.min.js' type='text/javascript'></script>"
+ "<script src='javascript/jquery-1.11.3.min.js' type='text/javascript'></script>"
+ "<script src='javascript/fitnesse.js' type='text/javascript'></script>" + "</head><body><header><h2>");
currentWriter.write(testName);
currentWriter.write("</h2></header><article>");
Expand Down Expand Up @@ -127,7 +127,7 @@ private void copyAssets() throws IOException {
addFile(cssDir + "fitnesse_pages.css", "css/fitnesse_pages.css");
addFile(cssDir + "fitnesse_straight.css", "css/fitnesse_straight.css");
String javascriptDir = base + "javascript/";
addFile(javascriptDir + "jquery-1.7.2.min.js", "javascript/jquery-1.7.2.min.js");
addFile(javascriptDir + "jquery-1.11.3.min.js", "javascript/jquery-1.11.3.min.js");
addFile(javascriptDir + "fitnesse.js", "javascript/fitnesse.js");
String imagesDir = base + "images/";
addFile(imagesDir + "collapsibleOpen.png", "images/collapsibleOpen.png");
Expand Down
18 changes: 6 additions & 12 deletions src/fitnesse/reporting/ExecutionStatus.java
Expand Up @@ -2,29 +2,23 @@
// Released under the terms of the CPL Common Public License version 1.0.
package fitnesse.reporting;

public class ExecutionStatus {
public static final ExecutionStatus OK = new ExecutionStatus("Tests Executed OK", "ok");
public static final ExecutionStatus ERROR = new ExecutionStatus("Errors Occurred", "error");
public enum ExecutionStatus {
OK("ok"),
ERROR("error");

private String message;
private String style;
private final String style;

public ExecutionStatus(String message, String style) {
this.message = message;
ExecutionStatus(String style) {
this.style = style;
}

public String getMessage() {
return message;
}

public String getStyle() {
return style;
}

@Override
public String toString() {
return "Execution Report: " + message;
return "Execution Status: " + style;
}

}
2 changes: 1 addition & 1 deletion src/fitnesse/reporting/InteractiveFormatter.java
Expand Up @@ -154,7 +154,7 @@ private String initErroMetadata() {
}

public static String makeExecutionStatusLink(ExecutionStatus executionStatus) {
HtmlTag status = HtmlUtil.makeLink("?executionLog", executionStatus.getMessage());
HtmlTag status = HtmlUtil.makeLink("?executionLog", "Execution Log");
status.addAttribute("class", executionStatus.getStyle());
return status.html();
}
Expand Down
2 changes: 1 addition & 1 deletion src/fitnesse/resources/bootstrap/templates/skeleton.vm
Expand Up @@ -23,7 +23,7 @@
<link rel="stylesheet" type="text/css" href="${contextRoot}files/fitnesse/bootstrap/css/fitnesse-bootstrap.css">
<link rel="stylesheet" type="text/css" href="${contextRoot}files/fitnesse/question.mark/question.mark.css" />

<script src="${contextRoot}files/fitnesse/javascript/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="${contextRoot}files/fitnesse/javascript/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="${contextRoot}files/fitnesse/javascript/fitnesse.js" type="text/javascript"></script>

<script src="${contextRoot}files/fitnesse/bootstrap/js/bootstrap.js" type="text/javascript"></script>
Expand Down
2 changes: 1 addition & 1 deletion src/fitnesse/resources/javascript/javascript-test.html
Expand Up @@ -13,7 +13,7 @@
<!--<link rel="wysiwyg.base" href="/" />-->
<!--<link rel="wysiwyg.stylesheet" type="text/css" href="../css/fitnesse.css" media="screen" />-->
<!--<link rel="wysiwyg.stylesheet" type="text/css" href="./editor.css" media="screen" />-->
<script src="../javascript/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../javascript/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="./WikiFormatter.js" type="text/javascript"></script>
<script src="./SpreadsheetTranslator.js" type="text/javascript"></script>
<script src="./clientSideSort.js" type="text/javascript"></script>
Expand Down
5 changes: 5 additions & 0 deletions src/fitnesse/resources/javascript/jquery-1.11.3.min.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions src/fitnesse/resources/javascript/jquery-1.7.2.min.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/fitnesse/resources/templates/skeleton.vm
Expand Up @@ -24,7 +24,7 @@
<link rel="wysiwyg.stylesheet" type="text/css" href="${contextRoot}files/fitnesse/css/fitnesse.css" media="screen" />
<link rel="wysiwyg.stylesheet" type="text/css" href="${contextRoot}files/fitnesse/wysiwyg/editor.css" media="screen" />
<link rel="shortcut icon" type="image/png" href="${contextRoot}files/fitnesse/images/favicon.png" />
<script src="${contextRoot}files/fitnesse/javascript/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="${contextRoot}files/fitnesse/javascript/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="${contextRoot}files/fitnesse/javascript/fitnesse.js" type="text/javascript"></script>
<script src="${contextRoot}files/fitnesse/javascript/${theme}.js" type="text/javascript"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion src/fitnesse/resources/wysiwyg/wysiwyg-test.html
Expand Up @@ -10,7 +10,7 @@
<script type="text/javascript" src="../../../../extra/phantomjs/console-runner.js"></script>

<link rel="stylesheet" type="text/css" href="./wysiwyg.css" media="screen"/>
<script src="../javascript/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../javascript/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="../codemirror/codemirror.js" type="text/javascript"></script>
<script src="./wysiwyg.js" type="text/javascript"></script>

Expand Down
6 changes: 4 additions & 2 deletions test/fitnesse/responders/run/SuiteResponderTest.java
Expand Up @@ -191,9 +191,11 @@ public void testNoExitCodeHeaderIfNotChunked() throws Exception {
}

@Test
public void testExecutionStatusAppears() throws Exception {
public void testExecutionLogLinkAppears() throws Exception {
String results = runSuite();
assertHasRegexp("Tests Executed OK", results);
// Lots of escaping: the content is escaped, since it's written from Javascript.
// Everything needs to be double escaped because it's handled as a regexp.
assertHasRegexp("class=\\\\\"ok\\\\\">Execution Log", results);
}

@Test
Expand Down
14 changes: 7 additions & 7 deletions test/fitnesse/responders/run/TestResponderTest.java
Expand Up @@ -265,9 +265,9 @@ public void testResultsDoHaveHeaderAndFooter() throws Exception {
}

@Test
public void testExecutionStatusAppears() throws Exception {
public void testExecutionLogLinkAppears() throws Exception {
doSimpleRun(passFixtureTable());
assertHasRegexp("Tests Executed OK", results);
assertHasRegexp("class=\\\\\"ok\\\\\">Execution Log", results);
}

@Test
Expand Down Expand Up @@ -374,15 +374,15 @@ public void simpleTextFormatForErrorTest() throws Exception {
@Test
public void testExecutionStatusOk() throws Exception {
doSimpleRun(passFixtureTable());
assertTrue(results.contains(">Tests Executed OK<"));
assertTrue(results.contains(">Execution Log<"));
assertTrue(results.contains("\\\"ok\\\""));
}

@Test
public void debugTest() throws Exception {
request.addInput("debug", "");
doSimpleRun(passFixtureTable());
assertTrue(results.contains(">Tests Executed OK<"));
assertTrue(results.contains(">Execution Log<"));
assertTrue(results.contains("\\\"ok\\\""));
assertTrue("should be fast test", responder.isDebug());
}
Expand All @@ -391,15 +391,15 @@ public void debugTest() throws Exception {
public void testExecutionStatusError() throws Exception {
debug = false;
doSimpleRun(crashFixtureTable());
assertTrue(results.contains(">Errors Occurred<"));
assertTrue(results.contains(">Execution Log<"));
assertTrue(results.contains("\\\"error\\\""));
}

@Test
public void testExecutionStatusErrorHasPriority() throws Exception {
debug = false;
doSimpleRun(errorWritingTable("blah") + crashFixtureTable());
assertTrue(results.contains(">Errors Occurred<"));
assertTrue(results.contains("class=\\\"error\\\">Execution Log<"));
}

@Test
Expand Down Expand Up @@ -497,7 +497,7 @@ public void testSuiteSetUpAndTearDownIsCalledIfSingleTestIsRun() throws Exceptio
sender.doSending(response);
results = sender.sentData();

assertTrue(results.contains(">Tests Executed OK<"));
assertTrue(results.contains(">Execution Log<"));
assertHasRegexp("\\?executionLog", results);
assertSubString("Test Page tags", results);

Expand Down