Skip to content

Commit

Permalink
Merge branch 'online_help'
Browse files Browse the repository at this point in the history
  • Loading branch information
joffems committed Mar 23, 2015
2 parents 5e6a8ea + e4128dd commit bc282a5
Show file tree
Hide file tree
Showing 14 changed files with 187 additions and 1 deletion.
27 changes: 27 additions & 0 deletions app/assets/javascripts/application.js
Expand Up @@ -192,6 +192,8 @@ jQuery(function($) {
}
});
jQuery(".best_in_place").best_in_place();

online_help();

});

Expand Down Expand Up @@ -332,4 +334,29 @@ function reset_row_classes() {
$(this).addClass('odd');
}
});
}

function online_help() {
var currentHelpUrl = currentHelpUrl || "";

$('a#help-link').click(function(event){
if (!$('#help-modal').is(":visible")) {
console.log(currentHelpUrl);
console.log( window.location.pathname);
if (currentHelpUrl != window.location.pathname) {
$.ajax({
url: "/help",
context: document.body,
data: {
page_path: window.location.pathname
}
}).success(function( data ) {
$("#help-content").html( data );
});
currentHelpUrl = window.location.pathname;
}
}
event.preventDefault();
$('#help-modal').toggle( "slide", {direction:'right'}, 1000 );
});
}
34 changes: 34 additions & 0 deletions app/assets/stylesheets/style.css.scss
Expand Up @@ -247,4 +247,38 @@ table.front-page {
p.credit {
text-align: center;
padding-top: 5px;
}

div#help-modal {
height: 100%;
background: #fff;
width: 450px;
display: none;
position: absolute;
top: 30px;
right: 0;
border: solid 1px #ddd;
padding: 0 7px;
-webkit-box-shadow: -2px 0px 2px 0px rgba(170,170,170,0.39);
-moz-box-shadow: -2px 0px 2px 0px rgba(170,170,170,0.39);
box-shadow: -2px 0px 2px 0px rgba(170,170,170,0.39);
h1 {
font-weight: bold;
font-size: 20px;
color: #2159b8;
padding: 7px 7px 0;
margin: 0;
}
h2 {
font-weight: bold;
font-size: 16px;
color: #2159b8;
padding: 7px
}
h3 {
font-size: 16px;
color: #2159b8;
padding: 7px
}
p { padding: 0 0 0 7px;}
}
15 changes: 15 additions & 0 deletions app/controllers/help_controller.rb
@@ -0,0 +1,15 @@
class HelpController < ApplicationController
layout false
def index
if params[:page_path] == '/'
render 'help/admin/index'
else
# Split by slashes, remove inital blank and integer values
target_url = params[:page_path].split('/')[1..-1].reject { |l| l =~ /\A\d+\z/ }

target_url << 'index' if target_url.length <= 1

render "help/#{target_url[0]}/#{target_url[1]}" rescue render "help/#{target_url[0]}/index"
end
end
end
15 changes: 15 additions & 0 deletions app/views/help/admin/index.html
@@ -0,0 +1,15 @@
<h2>Welcome to TestCaseDB</h2>

<p>The homepage is your intro into what is happening in TestCaseDB. The two main components are displayed; Recent Activity and current tasks.</p>

<h3>Recent Activity</h3>

<p>The recent activity feed shows you recent changes within the system to keep you up-to-date.</p>

<h3>Tasks</h3>

<p>The tasks listing on the homepage shows tasks that are assigned to you with their due date. If the task is highlighted red, it is overdue.</p>

<h2>Getting Started</h2>

<p>If you're new to TestCaseDB, the dashboard won't have anything too interesting. Have your admin configure Products and Categories on the Admin page to get started. Once that done you can start creating test cases and test plans.</p>
7 changes: 7 additions & 0 deletions app/views/help/assignments/index.html
@@ -0,0 +1,7 @@
<h2>Assignments</h2>

<p>Assignments enable you to associate a test plan or stencil with a user and release for testing.</p>

<p>When assignments are created, the associated result entries in the DB are also created for tracking.</p>

<p>If you need to frequently combin multiple test plans per release for testing, you should consider using stencils.</p>
7 changes: 7 additions & 0 deletions app/views/help/index.html
@@ -0,0 +1,7 @@
<h2>Help Content Title</h2>

<p>The content will go here. More to see and do</p>

<h3>Test Title</h3>

<p>More to read</p>
6 changes: 6 additions & 0 deletions app/views/help/reports/index.html
@@ -0,0 +1,6 @@
<h2>Reports</h2>

<p>Reports are stored andconfigured through the reports section of the site.</p>

<p>Currently, report results are not stored in the system.</p>

5 changes: 5 additions & 0 deletions app/views/help/schedules/index.html
@@ -0,0 +1,5 @@
<h2>Schedules</h2>

<p>Schedules are used to have TestCaseDB trigger automation runs for you. Select the time and days you would like the test plans to run and TestCaseDB will take care of the rest.</p>

<p>Note that the test plan will need to include test cases that are marked as automated and include the require test scripts.</p>
9 changes: 9 additions & 0 deletions app/views/help/stencils/index.html
@@ -0,0 +1,9 @@
<h2>Stencils</h2>
<p>Stencils are test plan collections</p>

<p>A stencil contains multiple test plans (including duplicates) and related devices. Stencils make it really easy to quickly assign a set of test plans and resources that must be tested. This is especially useful for regression tracking.</p>

<h3>New Version</h3>
<p>The new version button will make a clone of the current test plan. The current plan will be marked as deprecated and the new version will contain the previous versions details.</p>

<p>Versions are useful when making major changes and you have the need to retain the status of your old test plan.</p>
9 changes: 9 additions & 0 deletions app/views/help/tasks/index.html
@@ -0,0 +1,9 @@
<h2>Tasks</h2>

<p>The tasks index page shows tasks assigned to all users. If you want, click the My Tasks button to limit the listings to your own.</p>

<h3>Highlighting</h3>

<p>Tasks highlighted in red are overdue and need to be looked at.</p>

<h3>Overview</h3>
18 changes: 18 additions & 0 deletions app/views/help/test_cases/index.html
@@ -0,0 +1,18 @@
<h2>Test Cases</h2>

<p>Test Cases are the heart of application testing.</p>

<p>Test Cases include the steps and details required to verify that an item is working.</p>

<p>Test Cases are linked to products and categories.</p>

<h3>Editing</h3>
<p>When editing test plans, the results can be dragged and dropped into place.</p>

<h3>New Version</h3>
<p>The new version button will make a clone of the current test plan. The current plan will be marked as deprecated and the new version will contain the previous versions details.</p>

<p>Versions are useful when making major changes and you have the need to retain the status of your old test plan.</p>

<h3>Copy</h3>
<p>The copy funtion makes a new copy of the test plan. The plans starting version will be 1 and the source test plan will not be altered.</p>
22 changes: 22 additions & 0 deletions app/views/help/test_plans/index.html
@@ -0,0 +1,22 @@
<h2>Test Plans</h2>
<p>Test Plans are collections of test cases to be executed in one round.</p>

<h3>Editing</h3>
<p>When editing test plans, the results can be dragged and dropped into place.</p>

<h3>New Version</h3>
<p>The new version button will make a clone of the current test plan. The current plan will be marked as deprecated and the new version will contain the previous versions details.</p>

<p>Versions are useful when making major changes and you have the need to retain the status of your old test plan.</p>

<h3>Copy</h3>
<p>The copy funtion makes a new copy of the test plan. The plans starting version will be 1 and the source test plan will not be altered.</p>

<h3>Export PDF</h3>
<p>A PDF including the test case details is generated.</p>

<h3>Export RTF</h3>
<p>An RTF document including the test case details is generated. This is useful if you want to edit the results in Microsoft Word</p>.

<h3>Assign</h3>
<p>Assign an execution of a test plan to a user.</p>
11 changes: 11 additions & 0 deletions app/views/layouts/application.html.erb
Expand Up @@ -14,6 +14,11 @@
<body>
<div id="wrap">
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner pull-right">
<ul class="nav">
<li><a href="/" id="help-link">Help</a></li>
</ul>
</div>
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
Expand Down Expand Up @@ -153,6 +158,12 @@
<p class="muted credit"><a href="http://www.testcasedb.com" target="_blank">TestCaseDB</a>. Copyright &copy; 2012 - 2013 <a href="http://www.msjit.ca" target="_blank">MSJ IT Services Inc</a>.</p>
</div>
</div>

<div id="help-modal">
<h1>Online Help</h1>
<div id="help-content">
</div>
</div>
</body>
</html>

Expand Down
3 changes: 2 additions & 1 deletion config/routes.rb
Expand Up @@ -162,7 +162,8 @@
# and then append the id in javascript. This should newver be called directly. Only the line above should be called
# you must use the :as path for new and edit forms
match 'update_version_select/', :controller=>'application', :action => 'update_version_select', :as => 'jquery_application_version_update'


match 'help', :controller => 'help', :action => 'index', :as => 'help'
# Guide root to the home module
root :to => "home#index", :as => 'home'

Expand Down

0 comments on commit bc282a5

Please sign in to comment.