Index: tests/component-tests/artifactView/html/ArtifactView-test.html
===================================================================
--- tests/component-tests/artifactView/html/ArtifactView-test.html	(revision 0)
+++ tests/component-tests/artifactView/html/ArtifactView-test.html	(revision 0)
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />        
+        <title>Artifact</title>
+        
+        <link rel="Stylesheet" media="screen" href="../../../../../fluid-infusion/src/webapp/tests/lib/qunit/css/testsuite.css" />        
+        
+        <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/lib/jquery/core/js/jquery.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/lib/json/js/json2.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/tests/lib/qunit/js/testrunner.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/tests/test-core/jqUnit/js/jqUnit.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/framework/core/js/Fluid.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/framework/core/js/FluidDOMUtilities.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/framework/core/js/DataBinding.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/framework/renderer/js/fluidParser.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/framework/renderer/js/fluidRenderer.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/lib/fastXmlPull/js/fastXmlPull.js"></script>
+        
+        <script type="text/javascript" src="../../../../../fluid-engage-core/lib/jquery/plugins/cookie/js/jquery.cookie.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/framework/js/user.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/framework/js/kettleCore.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/framework/js/URLUtilities.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/framework/js/engageRenderUtils.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/components/navigationBar/js/NavigationBar.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/components/navigationList/js/NavigationList.js"></script>  
+        <script type="text/javascript" src="../../../../../fluid-engage-core/components/cabinet/js/Cabinet.js"></script>
+        
+        <script type="text/javascript" src="../../../../../fluid-engage-core/components/artifactView/js/ArtifactCollectView.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/components/artifactView/js/ArtifactView.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/components/moreLess/js/MoreLess.js"></script>
+
+        <script type="text/javascript" src="../../../../../fluid-engage-core/lib/jquery/datepicker/ui.datepicker-stub.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/lib/jquery/datepicker/i18n/jquery.ui.datepicker-en-GB.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/lib/jquery/datepicker/i18n/jquery.ui.datepicker-fr.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/framework/js/dateUtils.js"></script>
+        <script type="text/javascript" src="../../../../../fluid-engage-core/components/guestbook/js/guestbook.js"></script>
+        
+        <!--  javascript tests here -->
+        <script type="text/javascript" src="../js/ArtifactViewTests.js"></script>
+                 
+    </head>   
+    <body id="body">
+    
+        <h1 id="header">Artifact View Tests</h1>
+	    <h2 id="banner"></h2>
+	    <h2 id="userAgent"></h2>
+	    <ol id="tests"></ol>
+     
+        <!-- Test HTML -->
+        <div id="main" style="display: none;"></div>
+    </body>
+</html>
\ No newline at end of file
Index: tests/component-tests/artifactView/js/ArtifactViewTests.js
===================================================================
--- tests/component-tests/artifactView/js/ArtifactViewTests.js	(revision 0)
+++ tests/component-tests/artifactView/js/ArtifactViewTests.js	(revision 0)
@@ -0,0 +1,103 @@
+/*
+Copyright 2010 University of Toronto
+
+Licensed under the Educational Community License (ECL), Version 2.0 or the New
+BSD license. You may not use this file except in compliance with one these
+Licenses.
+
+You may obtain a copy of the ECL 2.0 License and BSD License at
+https://source.fluidproject.org/svn/LICENSE.txt 
+*/
+
+/*global jQuery, fluid, jqUnit*/
+"use strict";
+
+(function ($) {
+
+    var container = ".flc-artifact";
+    var artifactViewComponent;
+    
+    var compareSectionHeaders = function (component, postfix) {
+        var headers = ["artifactMedia", "artifactComments", "artifactRelated"];
+        var sections = component.locate("sections");
+        var options = component.options;
+        $.each(headers, function (index, header) {
+            var sectionSize = header === "artifactComments" ? 
+                options.comments.options.model.comments.length : component.model[header + "Count"];
+            header += postfix || "";
+            jqUnit.assertEquals("Ensure that the header for section header is correct when " + 
+                (postfix ? postfix.toLowerCase() : "closed"),
+                fluid.stringTemplate(options.strings[header], {size: sectionSize}), 
+                $(options.selectors.sectionHeader, sections[index]).text());
+        });
+    };
+    
+    var testSectionHeadersUpdated = function (component) {
+        compareSectionHeaders(component);
+        $.each(component.cabinet.locate("handle"), function (index, handle) {
+            $(handle).click();
+        });
+        compareSectionHeaders(component, "Opened");    
+    };
+    
+    var artifactViewTests = function () {
+        
+        var tests = jqUnit.testCase("Artifact View Tests",  function () {
+            tests.fetchTemplate("../../../../components/artifactView/html/view.html", container);
+            artifactViewComponent = fluid.engage.artifactView(container, {
+                model: {
+                    artifactMediaCount: 1,
+                    artifactRelatedCount: 2
+                },
+                "comments": {
+                    "options": {
+                        "model": {
+                            "comments": [
+                                {
+                                    "_id": "892ab6669da75f1d9354755e7b706389",
+                                    "_rev": "2-0d359d238454389a5a873e603645f6c3",
+                                    "text": "Dhdjskjdh",
+                                    "date": "2010-02-19T14:04:10.000Z",
+                                    "authorId": "9bd16015e7edfe7ab743ca6c684f279e",
+                                    "userName": "Anonymous",
+                                    "type": "fluid.guestbook.comment",
+                                    "authorName": "Anonymous CATT",
+                                    "targetType": "artifact",
+                                    "targetId": "M976.188.1",
+                                    "abuseReported": {
+                                        "07ca7651e7d7baf63d6d43d4bf23a5cc": true
+                                    }
+                                }
+                            ],
+                            "totalComments": 1
+                        },
+                        "strings": {
+                            "addNote": "Add Note",
+                            "delete": "Delete",
+                            "reportAbuse": "Report Abuse",
+                            "abuseReported": "Abuse reported. Pending moderator review",
+                            "cancel": "Cancel",
+                            "submit": "Submit",
+                            "commentEntry": "Comment Entry",
+                            "title": "Guestbook for This Exhibition"
+                        },
+                        "addNoteTarget": "../guestbook/comment.html?type=artifact&id=M976.188.1&db=mccord&lang=en",
+                        "postURL": "../guestbook/comment.json?db=mccord",
+                        "locale": "en",
+                        "templateSource": "\r\n        <div class=\"flc-guestbook-container fl-guestbook\" >\r\n                        <!-- Navigation Bar and Header -->\r\n            <div class=\"flc-navigationBar fl-navbar fl-col-mixed\">\r\n                <!-- Back button -->\r\n                <div class=\"fl-col-fixed fl-force-left\">\r\n                    <a class=\"flc-navigationBar-back fl-button fl-backButton\" href=\"#\">\r\n                        <img class=\"fl-button-inner fl-button-icon\" src=\"../../../../fluid-engage-core/shared/images/back.png\" alt=\"Go back\"/>\r\n                    </a>\r\n                </div>\r\n                <!-- Home button -->\r\n                <div class=\"fl-col-fixed fl-force-left\">\r\n                    <a class=\"flc-navigationBar-home fl-button\" href=\"#\">\r\n                        <img class=\"fl-button-inner fl-button-icon\" src=\"../../../../fluid-engage-core/shared/images/home.png\" alt=\"Go home\"/>\r\n                    </a>\r\n                </div>\r\n                <!-- Page header -->\r\n                <h1 class=\"flc-guestbook-title fl-navbar-title fl-col-flex\">Guestbook for This Exhibition</h1>\r\n            </div>\r\n            \r\n            <div class=\"flc-guestbook-addnote fl-guestbook-addnote\">\r\n               <div class=\"fl-centered\">\r\n                   <a class=\"flc-guestbook-addnote-control\" href=\"comment.html\">\r\n                       <label for=\"fl-addnote\" class=\"flc-guestbook-addnote-text fl-guestbook-title\">Add a note</label>\r\n                       <span id=\"fl-addnote\" class=\"fl-guestbook-addnote-control\"></span>\r\n                   </a>\r\n               </div>\r\n            </div>\r\n            <div class=\"flc-guestbook-comment-cell fl-guestbook-comment-cell\">\r\n              <div class=\"fl-guestbook-header fl-push\">\r\n                <span class=\"flc-guestbook-author fl-guestbook-author fl-guestbook-slash-after\">Robert Brown</span>\r\n                <span class=\"flc-guestbook-location fl-guestbook-location fl-guestbook-slash-after\">Washington, DC</span>\r\n                <span class=\"flc-guestbook-date fl-guestbook-date\">July 16, 2009</span>\r\n              </div>\r\n                <span class=\"flc-guestbook-text fl-guestbook-text fl-push\">I had such an amazing time at this\r\n                exhibit! Really loved the red sleigh especially. I had one just like it growing up</span>\r\n              <div class=\"fl-push\"> </div>\r\n              <div class=\"fl-guestbook-actions fl-force-right\">\r\n                <a class=\"flc-guestbook-action fl-guestbook-action\">REPORT ABUSE</a>\r\n              </div>\r\n              <div class=\"fl-push\"> </div>\r\n            </div>\r\n        </div>\r\n        "
+                    }
+                }
+            });
+        });
+        
+        tests.test("Artifact sections' headers updated", function () {
+            testSectionHeadersUpdated(artifactViewComponent);            
+        });
+        
+    };
+    
+    $(document).ready(function () {
+        artifactViewTests();
+    });
+        
+}(jQuery));
\ No newline at end of file
