lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [6069] Rectify test specification


From: Greg Chicares
Subject: [lmi-commits] [6069] Rectify test specification
Date: Fri, 12 Dec 2014 23:36:13 +0000

Revision: 6069
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6069
Author:   chicares
Date:     2014-12-12 23:36:13 +0000 (Fri, 12 Dec 2014)
Log Message:
-----------
Rectify test specification

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/wx_test_paste_census.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2014-12-12 21:07:09 UTC (rev 6068)
+++ lmi/trunk/ChangeLog 2014-12-12 23:36:13 UTC (rev 6069)
@@ -34858,3 +34858,8 @@
   wx_test_default_input.cpp
 Further rectify test specification.
 
+20141212T2336Z <address@hidden> [516]
+
+  wx_test_paste_census.cpp
+Rectify test specification.
+

Modified: lmi/trunk/wx_test_paste_census.cpp
===================================================================
--- lmi/trunk/wx_test_paste_census.cpp  2014-12-12 21:07:09 UTC (rev 6068)
+++ lmi/trunk/wx_test_paste_census.cpp  2014-12-12 23:36:13 UTC (rev 6069)
@@ -1,4 +1,4 @@
-// Test pasting data into a census.
+// Test pasting spreadsheet data into a census.
 //
 // Copyright (C) 2014 Gregory W. Chicares.
 //
@@ -135,56 +135,51 @@
 
 } // Unnamed namespace.
 
-/*
-    Test for pasting data into a census.
+// ERASE THIS BLOCK COMMENT WHEN IMPLEMENTATION COMPLETE. The block
+// comment below changes the original specification, and does not
+// yet describe the present code. Desired changes:
+//  - Save pastable data inline; don't extract from user manual.
+//  - Validate all columns after each step (after initial pasting).
+//  - Test change in class defaults (in addition to case defaults).
+//  - Place the saved file in 'gui_test_path'.
 
-    This implements the following item of the testing specification:
+/// Test pasting spreadsheet data into a census.
+///
+/// Create a set of data that might reasonably be copied from a
+/// spreadsheet. Initially at least, use the data in the user manual:
+///   file:///C:/lmi/src/web/lmi/pasting_to_a_census.html
+/// Hardcode the data here; don't read them from the user manual.
+/// (That didactic example was designed mainly to fit on a web page
+/// and to make sense to end users. Some day we might want to make
+/// this automated test more comprehensive, without changing the web
+/// page.)
+///
+/// Place that data set on the clipboard and simulate
+///   File | New | Census
+///   Census | Paste census
+/// Make sure it has the expected number of rows. Also check that all
+/// the columns pasted are shown by verifying each header: some time
+/// ago, the "Payment" and "Death Benefit Option" columns were lost
+/// due to a defect. All pasted columns should be shown, along with
+/// several others that vary in step with issue-age differences.
+///
+/// The census manager shows only columns that vary across cells,
+/// notably taking into account the case and class default cells.
+/// Test this in two ways. First:
+///   Census | Edit class defaults [requires focusing a row]
+///   change gender to "Unisex"
+///   apply to every cell: Yes
+/// Verify the expected result: the gender column is still shown
+/// (because "Unisex" is not yet the class default), and its value is
+/// "Unisex" in every row. Second:
+///   Census | Edit case defaults
+///   change underwriting class to any different value
+///   apply to every cell: Yes
+/// Verify the expected result: the underwriting-class column is no
+/// longer shown.
+///
+/// Then save the file in 'gui_test_path'; verify that it exists.
 
-        7. Verify help file sample works, using the paste census feature.
-           Confirm 'Edit case' and 'Save as' work.
-
-          A. Press 'F1' for help file. Select 'Pasting a census from a
-             spreadsheet'. Copy this sample from the help file webpage:
-
-        Gender  UnderwritingClass       IssueAge        Payment 
DeathBenefitOption
-        Female  Preferred       30      sevenpay,7;0    b,7;a
-        Male    Preferred       35      sevenpay,7;0    b,7;a
-        Female  Standard        40      sevenpay,7;0    b,7;a
-        Male    Standard        45      sevenpay,7;0    b,7;a
-        Female  Preferred       50      sevenpay,7;0    b,7;a
-        Male    Preferred       55      sevenpay,7;0    b,7;a
-        Female  Standard        60      sevenpay,7;0    b,7;a
-
-             Then do:
-             File | New | Census
-             Census | Paste census data
-             Expected result:
-               Seven new cells are populated with the individual data
-
-          B. Census | Edit case defaults | Change 'UnderwritingClass'
-             to 'Preferred' | OK
-             This message box appears:
-
-               ---------------------------
-               Confirm changes
-               ---------------------------
-               Apply all changes to every cell?
-               ---------------------------
-               Yes   No
-               ---------------------------
-             Select 'Yes'. The 'UnderwritingClass' column should disappear
-             from the census editor.
-
-          C. File | 'Save as'
-             Name the file 'PasteCensus.cns' and press 'Save' button.
-             The working directory will be the default location.
-             Expected result:
-               A file named 'PasteCensus.cns' exists in default directory.
-
-    All checks are implemented exactly as specified, but the data to be pasted
-    into the census is extracted from pasting_to_a_census.html file itself 
instead
-    of being copied from an on-screen window showing it.
- */
 LMI_WX_TEST_CASE(paste_census)
 {
     // Put the data to paste on clipboard.
@@ -195,7 +190,7 @@
 
     // Paste data into it.
     wxUIActionSimulator ui;
-    ui.Char('s', wxMOD_CONTROL | wxMOD_SHIFT); // "Census|Paste census data"
+    ui.Char('s', wxMOD_CONTROL | wxMOD_SHIFT); // "Census | Paste census"
     wxYield();
 
     // Find the model containing the cells and check that it was filled in
@@ -285,3 +280,4 @@
 
     census.close();
 }
+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]