From: Mark Wells Date: Mon, 31 Aug 2015 21:55:34 +0000 (-0700) Subject: one more repeatability fix + documentation, #37340 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=653b350d0f8cc69e66e265537a3775f512fd5dda one more repeatability fix + documentation, #37340 --- diff --git a/FS-Test/README b/FS-Test/README index b1518bd6f..8e9681cef 100644 --- a/FS-Test/README +++ b/FS-Test/README @@ -2,42 +2,36 @@ FS-Test INSTALLATION -To install this module, install Freeside as usual. Then run the following -commands: - - perl Makefile.PL - make - make install - -INITIALIZATION - -Run "freeside-test-start" from an account that can sudo to root. This will -create a database with the test image and set the system clock to one day -after the last bill. If there's an existing Freeside database, it will be -renamed to "freeside_YYYYMMDD" (the current date). - -To restore the system clock and put the existing database back in place, -run "freeside-test-stop". +This module no longer needs to be installed. Run it directly from the source +tree. RUNNING TESTS -"freeside-test-run" is the main test script. Currently there's only one -test plan, "ui_tests". freeside-test-run will: +"freeside-test-run" is the main test script. Currently there's only one test +plan, "ui_tests". freeside-test-run will: - download all the URLs listed in the test plan into a directory in /tmp - compare them to the reference versions with "diff -ur" - write the output to "freeside_test.YYYYMMDD.diff" -- display the results of "diffstat" on that diff The raw output directory will not be deleted, so you can examine the results -yourself. This is recommended for files that don't diff nicely like Excel -versions of reports and PDF invoices. +yourself. + +If you want to do anything with the database besides compare the test results +to reference, run "freeside-test-start" by hand first. This will create a +database with the test image and start Apache with a fake time of one day after +the last bill. If there's an existing Freeside database, it will be renamed to +"freeside_YYYYMMDD" (the current date). + +To put the existing database back in place, run "freeside-test-stop", then +restart Apache and any Freeside services. UPDATING THE REFERENCE PAGES The simplest way to update the reference copies of the test pages is -freeside-test-fetch -d ./share/output +bin/freeside-test-start +bin/freeside-test-fetch -d ./share/output (from the FS-Test source directory). If you're installing from a git repo, this will overwrite the working tree with the newly downloaded test pages. diff --git a/FS-Test/share/output/edit/part_pkg.cgi/2 b/FS-Test/share/output/edit/part_pkg.cgi/2 index 9aba1583e..798351f2d 100644 --- a/FS-Test/share/output/edit/part_pkg.cgi/2 +++ b/FS-Test/share/output/edit/part_pkg.cgi/2 @@ -4720,9 +4720,9 @@ spawn_supp_dst_pkgpart(this);" Calculate usage based on the duration field instead of the billsec field Rewrite these (comma-separated) destination numbers to 411 for rating purposes (also ignore any carrierid check): CDR display format for invoices - CDR display format for selfservice - Inbound CDR display format for selfservice - Always put usage details in separate section. The section is defined in the next option. + CDR display format for selfservice + Inbound CDR display format for selfservice + Always put usage details in separate section. The section is defined in the next option. Section in which to place usage charges (whether separated or not): Include usage summary with recurring charges when usage is in separate section Show details for included / no-charge calls. @@ -4775,7 +4775,7 @@ spawn_supp_dst_pkgpart(this);" Do not charge for CDRs where the lastapp matches this value Calculate usage based on the duration field instead of the billsec field CDR invoice display format - Always put usage details in separate section + Always put usage details in separate section Include usage summary with recurring charges when usage is in separate section Section in which to place usage charges (whether separated or not) Generate an invoice immediately for every call. Useful for prepaid. @@ -4834,9 +4834,9 @@ spawn_supp_dst_pkgpart(this);" Calculate usage based on the duration field instead of the billsec field Rewrite these (comma-separated) destination numbers to 411 for rating purposes (also ignore any carrierid check): CDR display format for invoices - CDR display format for selfservice - Inbound CDR display format for selfservice - Always put usage details in separate section. The section is defined in the next option. + CDR display format for selfservice + Inbound CDR display format for selfservice + Always put usage details in separate section. The section is defined in the next option. Section in which to place usage charges (whether separated or not): Include usage summary with recurring charges when usage is in separate section Show details for included / no-charge calls. @@ -4872,7 +4872,7 @@ spawn_supp_dst_pkgpart(this);" When prorating first month, also bill for one full period after that Show prorate details on the invoice CDR invoice display format - Section in which to place separate usage charges + Section in which to place separate usage charges Include usage summary with recurring charges when usage is in separate section Always put usage details in separate section Credit the customer for the unused portion of service at cancellation @@ -4992,7 +4992,7 @@ spawn_supp_dst_pkgpart(this);" When prorating first month, also bill for one full period after that Show prorate details on the invoice CDR invoice display format - Section in which to place separate usage charges + Section in which to place separate usage charges Include usage summary with recurring charges when usage is in separate section Always put usage details in separate section Credit the customer for the unused portion of service at cancellation diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index 1a3666099..775c79114 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -1463,7 +1463,7 @@ as keys (for use with part_pkg::voip_cdr) and "pretty" format names as values. sub invoice_formats { map { ($_ => $export_names{$_}->{'name'}) } grep { $export_names{$_}->{'invoice_header'} } - keys %export_names; + sort keys %export_names; } =item invoice_header FORMAT