         it 'should toggle the chart/table display', ->
           page.imageProfileFormatButton().then (button) ->
             # The format button exists.
-            expect(button, 'The imaging profile format button is missing')
+            expect(button, 'The modeling format button is missing')
               .to.exist
-            # When the button is clicked, then the imaging profile table
-            # panel is displayed.
+            expect(page.modelingCharts(), 'The modeling charts are initially hidden')
+              .to.eventually.not.be.empty
+            expect(page.modelingTables(), 'The modeling tables are initially visible')
+              .to.eventually.be.empty
+            # When the button is clicked, then the modeling tables
+            # are displayed.
             button.click().then ->
-              tablePanel.isDisplayed().then (displayed) ->
-                expect(displayed, 'The modeling table panel is hidden after the' +
-                                  ' format button is clicked').to.be.true
-              # The chart is hidden.
-              chart.isDisplayed().then (displayed) ->
-                expect(displayed, 'The modeling chart is displayed after the' +
-                                  ' format button is clicked').to.be.false
-              # When the button is clicked again, then the table is hidden and
-              # the chart is displayed.
+              expect(page.modelingCharts(), 'The modeling charts are visible after the' +
+                                            ' format button is clicked')
+                .to.eventually.be.empty
+              expect(page.modelingTables(), 'The modeling tables are hidden after the' +
+                                            ' format button is clicked')
+                .to.eventually.not.be.empty
+              # When the button is clicked again, then the modeling charts
+              # are displayed.
               button.click().then ->
-                tablePanel.isDisplayed().then (displayed) ->
-                  expect(displayed, 'The modeling table panel is displayed' +
-                                    ' after the format button is clicked twice')
-                    .to.be.false
+                expect(page.modelingCharts(), 'The modeling charts are hidden after the' +
+                                              ' format button is clicked twice')
+                  .to.eventually.not.be.empty
+                expect(page.modelingTables(), 'The modeling tables are visible after the' +
+                                              ' format button is clicked twice')
+                  .to.eventually.be.empty
 
       describe 'Chart', ->
-        it 'should display the imaging chart', ->
-          # The chart exists.
-          expect(chart, 'The modeling chart is missing').to.eventually.exist
-          # The chart is displayed.
-          chart.isDisplayed().then (displayed) ->
-            expect(displayed, 'The modeling chart is initially hidden')
-              .to.be.true
+        it 'should display the imaging charts', ->
+          page.modelingCharts().then (charts) ->
+            # The chart exists.
+            expect(charts, 'The modeling charts are missing')
+              .to.exist.and.not.be.empty
+            # The charts are displayed.
+            for chart, i in charts
+              expect(chart.isDisplayed(), 
+                     "The modeling chart #{ i } is initially hidden")
+                .to.eventually.be.true
 
       describe 'Table', ->
-        it 'should hide the table', ->
-          # The modeling tables panel exists.
-          expect(tablePanel, 'The modeling table panel is missing').to.eventually.exist
-          # The panel is hidden.
-          tablePanel.isDisplayed().then (displayed) ->
-            expect(displayed, 'The modeling table panel is initially displayed')
-              .to.be.false
-
+        modelingTables = null
+        
+        before ->
+          # The tables are only added to the DOM if the format button
+          # is clicked.
+          modelingTables = page.imageProfileFormatButton().then (button) ->
+            button.click().then ->
+              page.modelingTables()
+        
+        after ->
+          # Restore the format to chart.
+          page.imageProfileFormatButton().then (button) ->
+            button.click()
+
+        # There are three modeling tables, one for each PK modeling
+        # property.
+        it 'should have three tables', ->
+          modelingTables.then (tables) ->
+            # The modeling tables exists.
+            expect(tables, 'The modeling tables are missing')
+              .to.exist.and.not.be.empty
+            expect(tables.length, 'The modeling table count is incorrect')
+              .to.equal(3)
+        
         describe 'Properties', ->
-          tables = null
-
-          before ->
-            page.imagingProfileTables().then (elts) ->
-              tables = elts
-
-          it 'should show the imaging profile table panel when the format button is clicked', ->
-            expect(tables, 'The imaging profile table panel is not shown')
-              .to.exist
-
-          # There are three imaging profile tables, one for each
-          # PK modeling property.
-          it 'should have three imaging profile tables', ->
-            expect(tables.length, 'The imaging profile table count is incorrect')
-              .to.equal(3)
-
-
           it 'should display the column headers', ->
-            for table, tblNdx in tables
-              table.header.then (headings) ->
-                for heading, hdgNdx in headings 
-                  expect(heading, "Table #{ tblNdx + 1 } is missing column" +
-                                  " heading #{ hdgNdx + 1 }")
-                    .to.exist.and.not.be.empty
-
+            modelingTables.then (tables) ->
+              for table, tblNdx in tables
+                table.header.then (headings) ->
+                  for heading, hdgNdx in headings 
+                    expect(heading, "Table #{ tblNdx + 1 } is missing column" +
+                                    " heading #{ hdgNdx + 1 }")
+                      .to.exist.and.not.be.empty
+        
           it 'should have four Breast patient visits', ->
-            for table, tblNdx in tables
-              table.body.then (rows) ->
-                expect(rows.length, "Table #{ tblNdx + 1 } row count is incorrect")
-                  .to.equal(4)
-
+            modelingTables.then (tables) ->
+              for table, tblNdx in tables
+                table.body.then (rows) ->
+                  expect(rows.length,
+                         "Table #{ tblNdx + 1 } row count is incorrect")
+                    .to.equal(4)
+                  
           it 'should show the visit dates', ->
-            # The expected visit dates are the first column of the first table.
-            referenceTable = _.first(tables)
-            expected = null
-            referenceTable.body.then (rows) ->
-              expected = ((_.first(columns) for columns in rows))
-            # The date values for every remaining table should be
-            # consistent with those of the first table.
-            for table, tblNdx in _.rest(tables)
-              table.body.then (rows) ->
-                for columns, rowNdx in rows
-                  visitDate = _.first(columns)
-                  expect(visitDate, "The table #{ tblNdx + 2 } visit date is incorrect")
-                    .to.equal(expected[rowNdx])
-
+            modelingTables.then (tables) ->
+              # The expected visit dates are the first column of the first table.
+              referenceTable = _.first(tables)
+              expected = null
+              referenceTable.body.then (rows) ->
+                expected = ((_.first(columns) for columns in rows))
+              # The date values for every remaining table should be
+              # consistent with those of the first table.
+              for table, tblNdx in _.rest(tables)
+                table.body.then (rows) ->
+                  for columns, rowNdx in rows
+                    visitDate = _.first(columns)
+                    expect(visitDate,
+                           "The table #{ tblNdx + 2 } visit date is incorrect")
+                      .to.equal(expected[rowNdx])
+                  
           it 'should have seven Ktrans table columns', ->
-            # The KTrans table is the first table.
-            table = _.first(tables)
-            table.body.then (rows) ->
-              for row, rowNdx in rows
-                expect(row.length, "The Ktrans table row #{ rowNdx + 1 } column" +
-                                   " count is incorrect").to.equal(7)
-
-          it 'should have three non-Ktrans table columns', ->
-            # The KTrans table is the first table.
-            tables = _.rest(tables)
-            for table, tblNdx in tables
+            modelingTables.then (tables) ->
+              
+              # The KTrans table is the first table.
+              table = _.first(tables)
               table.body.then (rows) ->
                 for row, rowNdx in rows
-                  expect(row.length, "The table #{ tblNdx + 2 } row #{ rowNdx + 1 }" +
-                                     " column count is incorrect").to.equal(3)
-
+                  expect(row.length, "The Ktrans table row #{ rowNdx + 1 } column" +
+                                     " count is incorrect").to.equal(7)
+                  
+          it 'should have three non-Ktrans table columns', ->
+            modelingTables.then (tables) ->
+              # The KTrans table is the first table.
+              tables = _.rest(tables)
+              for table, tblNdx in tables
+                table.body.then (rows) ->
+                  for row, rowNdx in rows
+                    expect(row.length,
+                           "The table #{ tblNdx + 2 } row #{ rowNdx + 1 }" +
+                           " column count is incorrect").to.equal(3)
+                  
           it 'should not have a blank non-percent change value', ->
-            for table, tblNdx in tables
-              table.body.then (rows) ->
-                for columns, rowNdx in rows
+            modelingTables.then (tables) ->
+              for table, tblNdx in tables
+                table.body.then (rows) ->
+                  for columns, rowNdx in rows
+                    # The odd columns hold non-percent change values.
+                    for colNdx in _.range(1, columns.length, 2)
+                      value = columns[colNdx]
+                      expect(value, "Imaging Profile table #{ tblNdx + 1 } body" +
+                                    " row #{ rowNdx + 1 } percent change column" +
+                                    " #{ colNdx + 1 } is not blank")
+                        .to.not.be.empty
+                  
+          it 'should have blank percent values in the first row', ->
+            modelingTables.then (tables) ->
+              for table, tblNdx in tables
+                table.body.then (rows) ->
+                  columns = _.first(rows)
+                  expect(columns, "Imaging Profile table #{ tblNdx + 1 } body" +
+                                  " row 0 has no columns")
+                    .to.exist.and.not.be.empty
+                  # The percent change is in the third, fifth and seventh column.
+                  # The percent changes of the first row are blank.
                   # The odd columns hold non-percent change values.
-                  for colNdx in _.range(1, columns.length, 2)
-                    value = columns[colNdx]
-                    expect(value, "Imaging Profile table #{ tblNdx + 1 } body" +
-                                  " row #{ rowNdx + 1 } percent change column" +
-                                  " #{ colNdx + 1 } is not blank")
-                      .to.not.be.empty
-
-          it 'should have blank percent values in the first row', ->
-            for table, tblNdx in tables
-              table.body.then (rows) ->
-                columns = _.first(rows)
-                expect(columns, "Imaging Profile table #{ tblNdx + 1 } body" +
-                                " row 0 has no columns")
-                  .to.exist.and.not.be.empty
-                # The percent change is in the third, fifth and seventh column.
-                # The percent changes of the first row are blank.
-                # The odd columns hold non-percent change values.
-                for colNdx in _.range(2, columns.length, 2)
-                  value = columns[colNdx]
-                  expect(value, "Imaging Profile table #{ tblNdx + 1 } body" +
-                                " row 0 percent change column #{ colNdx + 1 }" +
-                                " is not blank").to.be.empty
-
-
-          it 'should not have a blank percent value in the remaining rows', ->
-            for table, tblNdx in tables
-              table.body.then (rows) ->
-                for columns, rowNdx in _.rest(rows)
                   for colNdx in _.range(2, columns.length, 2)
                     value = columns[colNdx]
                     expect(value, "Imaging Profile table #{ tblNdx + 1 } body" +
-                                  " row #{ rowNdx + 2 } percent change column" +
-                                  " #{ colNdx + 1 } is blank")
-                      .to.not.be.empty
-
+                                  " row 0 percent change column #{ colNdx + 1 }" +
+                                  " is not blank").to.be.empty
+                  
+          it 'should not have a blank percent value in the remaining rows', ->
+            modelingTables.then (tables) ->
+              for table, tblNdx in tables
+                table.body.then (rows) ->
+                  for columns, rowNdx in _.rest(rows)
+                    for colNdx in _.range(2, columns.length, 2)
+                      value = columns[colNdx]
+                      expect(value, "Imaging Profile table #{ tblNdx + 1 } body" +
+                                    " row #{ rowNdx + 2 } percent change column" +
+                                    " #{ colNdx + 1 } is blank")
+                        .to.not.be.empty
 
     describe 'Clinical Profile', ->
-      panel = null
-
+      clinicalProfile = null
+      
       before ->
-        page.clinicalProfileTablePanel().then (elt) ->
-          panel = elt
-
-      it 'should show the clinical profile table', ->
-          # The clinical tables panel exists.
-          expect(panel, 'The clinical table panel is missing')
-            .to.eventually.exist
-          # The panel is displayed.
-          panel.isDisplayed().then (displayed) ->
-            expect(displayed, '
-            The clinical table panel is initially displayed')
-              .to.be.true
+        clinicalProfile = page.clinicalProfile()
+
+      it 'should show the clinical profile', ->
+        expect(clinicalProfile, 'The clinical profile is missing')
+          .to.eventually.exist
 
       describe 'Demographics', ->
-        table = null
-
+        demographics = null
+        
         before ->
-          panel.demographics().then (elt) ->
-            table = elt
-
+          demographics = clinicalProfile.then (profile) ->
+            profile.demographics()
 
         it 'should show the demographics table', ->
-          expect(table, 'The demographics table is missing')
-            .to.eventually.exist
-          table.isDisplayed().then (displayed) ->
-            expect(displayed, 'The demographics table is not displayed')
-              .to.be.true
-        
+          demographics.then (table) ->
+            expect(table, 'The demographics table is missing').to.exist
+            expect(table.isDisplayed(), 'The demographics table is not displayed')
+              .to.eventually.be.true
+      
         # Validate the demographics values.
         it 'should show the age', ->
-          table.age().then (age) ->
-            expect(age, 'The age is missing').to.exist.and.to.not.be.empty
-            expect(age, 'The age is not an integer').to.match(/^\d+$/)
-            expect(parseInt(age), 'The age is not positive')
-              .to.be.greaterThan(0)
-
+          demographics.then (table) ->
+            table.age().then (age) ->
+              expect(age, 'The age is missing').to.exist.and.to.not.be.empty
+              expect(age, 'The age is not an integer').to.match(/^\d+$/)
+              expect(parseInt(age), 'The age is not positive')
+                .to.be.greaterThan(0)
+      
         it 'should show the race', ->
-          table.races().then (races) ->
-            expect(races, 'The race is missing').to.exist.and.to.not.be.empty
-
+          demographics.then (table) ->
+            table.races().then (races) ->
+              expect(races, 'The race is missing').to.exist.and.to.not.be.empty
+      
         it 'should show the ethnicity', ->
-          table.ethnicity().then (ethnicity) ->
-            expect(ethnicity, 'The ethnicity is missing')
-              .to.exist.and.to.not.be.empty
-
+          demographics.then (table) ->
+            table.ethnicity().then (ethnicity) ->
+              expect(ethnicity, 'The ethnicity is missing')
+                .to.exist.and.to.not.be.empty
+      
       describe 'Outcomes', ->
           describe 'Biopsy', ->
             # TODO - Add test cases for the date and every outcome table.
-
+      
           describe 'Assessment', ->
             # TODO - Add test cases for the date and every outcome table.
 
   describe 'Sarcoma', ->
     beforeEach ->
       page = new SubjectDetailPage '/quip/sarcoma/subject/1?project=QIN_Test'
+
+  it 'should load the page', ->
+    expect(page.content, 'The page was not loaded')
+      .to.eventually.exist
 
     # The Sarcoma-specific page header test cases.
     describe 'Header', ->

    before ->
      page = new SubjectDetailPage '/quip/breast/subject/1?project=QIN_Test'

    # The page header test cases.
    describe 'Header', ->
      it 'should display the billboard', ->
        expect(page.billboard, 'The billboard is incorrect').to.eventually.equal('Breast Patient 1')

      it 'should have a home button', ->
        pat = /.*\/quip\?project=QIN_Test$/

            sbjBinding = 'subject.' + binding
            # Make the field element search selector.
            selector = By.binding(sbjBinding)
            findText(selector)

        addTextField(prop, binding) for prop, binding of bindings

      # Find the table.
      #
      # Note: A better solution is to perform the field selects below
      # against the table rather than the page. However,
      # panel.findElement('qi-demographics-table')
      # results in an error, since the untyped panel object has most, but
      # not all, of the WebElement function properties. In particular, it
