Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

Manual testing suite

This document contains the manual testing suite for a Lino core developer.

Editing a Lockable data row

The clients in avanti are lino.modlib.system.Lockable to prevent having them edited by two users at the same time.

  • Sign in as robin on avanti1.

  • Open the detail of a client. Start editing. Change the “Legacy file number” field. Hit Ctrl+S or click the Save button. Modify a second time. Verify that the edit and save and abort buttons are displayed correctly in each state.

  • Start editing a client. Do not save your changes. Sign out. Sign in as another user. Try to edit the same client. Lino should say “BEK-MURZIN Agápiiá (61/romain) is being edited by Robin Rood. Please try again later.”

  • Sign out and back in as robin. You should have a welcome message “You have a dangling edit lock on BEK-MURZIN Agápiiá (61/romain).”

Printing

Payment reminder

The following trail uses the contacts/Partner/payment_reminder.weasy.html template.

  • Sign in as robin on noi1r or noi1e.

  • Select Contacts ‣ Organizations in the main menu, then click on Bäckerei Ausdemwald.

  • Select the “Accounting” tab. The “Movements” panel shows 9 open movements (-23216.00 €). Click on the print button in the toolbar. Lino opens a PDF file. The document title is Payment reminder.

  • Select the “Payments” tab. Look at the “Payment reminders” field. It has three clickable links: “Last, All (1), Create”.

    • “Last” shows the detail view for the reminder you just created. Clicking here on the print button will open the same document again, without re-generating it.

    • “All (1)” opens a table with one row.

Sales invoice

The following trail uses the trading/VatProductInvoice/default.weasy.html template.

  • Sign in as robin on cosi1.

  • Click on the SLS tile in the dashboard to open the list of sales invoices. Click on any of them to show it in a detail window.

  • Click on the print button in the toolbar. Lino opens a PDF file.

  • The document title is Invoice 10/2015 (or whatever invoice number).

  • The footer shows “Number One, Peppolstraße 12, 4700 Eupen” on the left and “Rechnung 7/2025 Seite 1 von 1” on the right.

    ../_images/top-right.jpg ../_images/bottom-left.png
  • Now print a sales invoice in cosi1. The printed invoices in cosi1 have the image on the right in the top-right corner and the image on the left in the bottom-left corner.

    ../_images/page-background.png
  • Print yet another invoice in cosi3. The printed invoices in cosi3 have an extra-large left margin (40 mm) and the background image shown here:

Service report

  • Sign in as robin on noi1r or noi1e.

  • Select Sales ‣ Service reports (SRV) in the main menu, then hit on 12/2015 (which is dated 01.03.2015, partner is Bäckerei Mießen).

  • Click on the print button in the toolbar. Lino opens a PDF file. The document title is Service report. The footer says (a) on the left: “Rumma & Ko OÜ, Uus tn 1, Vigala vald, 78003 Rapla maakond, Estonia” and (b) on the right: “Service report 12/2015 n Page 1 of 1”

This uses the storage/DeliveryNote/service_report.weasy.html template.

Agenda meeting

  • Sign in as robin on noi2.

Song sheet

  • Sign in as robin on noi2.

  • Publisher ‣ Public pages

  • Find the “My little songsheet” page and open the detail window.

  • Click on the print button in the toolbar. Lino opens a pdf file with 3 songs on 2 pages. The footer contains a copyright notice “Laulik OÜ / www.laulik.ee”. It does not have page numbering.

School certificate

  • Sign in as robin on prima1.

  • Print a certificate

  • Check the footer.

Multiple addresses

Here are some tests for the lino_xl.lib.addresses plugin.

  • Sign in as robin in a Lino Amici (e.g. go amici1).

  • Click on the Persons quicklink.

  • Enter “dob” in the Quick search field.

  • Select the first Dorothée Dobbelstein

  • Hit the (Merge) button in the toolbar. In the into… field, type “dob” and select the second Dorothée (Dobbelstein-Demeulenaere). Leave the other fields unchanged. Hit ENTER to submit. Lino should ask “Are you sure you want to merge Dorothée Dobbelstein into Dorothée Dobbelstein-Demeulenaere? 1 Addresses, 1 List memberships will be deleted. Dorothée Dobbelstein will be deleted.”

  • Open the detail window on Dorothée. Click on the Manage addresses link. Modify the Street field of the primary address (add “n” at the end). Go back to the detail view (hit Alt+ArrowLeft or the Back button of your browser). Verify that the partner’s address in the overview field has been updated correctly.

  • Same as above, but mark another address as primary

  • Same as above, but edit the non-primary address. The overview field should not change.

  • Same as above, but uncheck the primary checkbox of the primary address so that there is no primary address. The partner’s address in the overview field should become empty.

  • In the grid view for Persons, make the Street column visible and directly edit the Street fields of a partner. The primary address in Manage addresses should get updated accordingly.

Verify #5777 (ParameterStore … expects a list of 3 values but got 5)

  • Sign in as robin on a Lino Così site.

  • Open the list of sales invoices

  • Click on the in front of any partner.

  • Lino should display the detail of the partner.

Avanti

  • Sign in as robin on any Lino Avanti site (e.g. avanti1)

  • Select Contacts ‣ Clients, open the parameter panel, change the “State” field from “Coached” to blank. On one of the yellow rows that just became visible, click the in the first column. Verifies #5751 (Invalid primary key 4968 for avanti.Clients).

  • In the detail view a client, activate the Person tab, click (+) of the “Upload files” panel, select a file to upload, hit “Create”. Verifies #6680 (Cannot upload files after upgrade).

Verify #5818 (Chooser context for comboboxes in the phantom row)

  • Sign in as robin on prima1.

  • In the dashboard click on the “Science” behind “1A”

  • In the “Exams of Science in 1A” panel, click on the detail arrow of first exam. Lino shows the first exam in detail view.

  • Activate the “More” panel of the exam.

  • In the “Challenges of test” panel, click on the “Skill” cell of the phantom row and expand the combobox. The combobox should show only the three skills defined for the Science subject, not all skills.

  • When you expand the combo in an existing row of the grid, Lino correctly shows only the skills defined for the subject of the test.

  • In the settings.py of prima1, comment out the default_ui setting and try the same under ExtJS where it works correctly.

Webforms

Register a new user

  • Start runserver on noi2.

  • Without signing in:

    • Click on “Register” in the menu, fill out the form and submit. Try with an invalid email address, invalid password, existing username (does Lino complain correctly?) Try to submit a second time within a minute.

    • Repeat the previous step, but using the “Or register as a new user” link in the Admin page instead of the “Contacts” page.

  • Start the daemon: LINO_LOGLEVEL=debug pm linod

  • Sign in as robin

Request contact form

Subscribe to newsletter

As anonymous in noi2, click on Admin, then on “Or subscribe to newsletter”.

Fill the form fields (“Tom”, “Test”, “tom@test.com”) and submit.

Try to submit a second time: Lino should refuse saying “You already submitted this form from 127.0.0.1. Please try again in ….”

Run pm linod in a separate window:

go noi2
pm linod

Sign in as robin, open Configuration -> System -> Users and verify that a user with username “tom@test.com” has been created and is member of the Newsletter list.

Run pm prep and try the same again, this time using the “Subscribe” link in the footer.

Bonus

Stop the linod process, run pm prep,

Submit the subscribe form three times with the same email address. Either wait a minute between submitting the forms, or set lino.modlib.webforms.submit_delay to None in the settings.py of noi2. Lino will accept the second submit because linod is not running and thus the users haven’t yet been created. You can see the pending subscription requests by saying:

$ go noi2; pm show lists.SubscribeToListRequests
==== ================ ========== ================================== ============ ============= ====== ============ ============ =========== ===================
 ID   e-mail address   Language   Created                            IP address   Session key   Keep   Done since   First name   Last name   Newslist
---- ---------------- ---------- ---------------------------------- ------------ ------------- ------ ------------ ------------ ----------- -------------------
 1    tom@test.com     en         2024-05-12 20:08:33.750346+00:00   127.0.0.1                  No                  tom          test        Weekly newsletter
 2    tom@test.com     en         2024-05-12 20:10:54.675758+00:00   127.0.0.1                  No                  tom          test        Weekly newsletter
 3    tom@test.com     en         2024-05-12 20:11:03.031586+00:00   127.0.0.1                  No                  tom          test        Weekly newsletter
==== ================ ========== ================================== ============ ============= ====== ============ ============ =========== ===================

Now start linod. The first webform will execute without problem and create the user and the subscription, and the second and third webform will cause a traceback because the user already exists:

$ pm linod
Running worker for channels ['linod_noi2']
Start task runner using <Logger lino (INFO)>...
Execute 3 SubscribeToList request
Send email 'Welcome on noi2' from root@localhost to ['tom test <tom@test.com>']
send_mail() failed : [Errno -5] No address associated with hostname
Error while excuting webform Subscribe  tom test <tom@test.com> to Weekly newsletter: {'username': ['User with this Username already exists.']}
Traceback (most recent call last):
...
django.core.exceptions.ValidationError: {'username': ['User with this Username already exists.']}
Error while excuting webform Subscribe tom  test <tom@test.com> to Weekly newsletter: {'username': ['User with this Username already exists.']}
Traceback (most recent call last):
...
django.core.exceptions.ValidationError: {'username': ['User with this Username already exists.']}

The tracebacks have been logged, but otherwise Lino doesn’t make a big fuss about thes incidents, it marks all three webforms as done:

$ go noi2; pm show lists.SubscribeToListRequests
==== ================ ========== ================================== ============ ============= ====== ================================== ============ =========== ===================
 ID   e-mail address   Language   Created                            IP address   Session key   Keep   Done since                         First name   Last name   Newslist
---- ---------------- ---------- ---------------------------------- ------------ ------------- ------ ---------------------------------- ------------ ----------- -------------------
 1    tom@test.com     en         2024-05-12 20:08:33.750346+00:00   127.0.0.1                  No     2024-05-12 20:14:38.236786+00:00   tom          test        Weekly newsletter
 2    tom@test.com     en         2024-05-12 20:10:54.675758+00:00   127.0.0.1                  No     2024-05-12 20:14:38.245665+00:00   tom          test        Weekly newsletter
 3    tom@test.com     en         2024-05-12 20:11:03.031586+00:00   127.0.0.1                  No     2024-05-12 20:14:38.252348+00:00   tom          test        Weekly newsletter
==== ================ ========== ================================== ============ ============= ====== ================================== ============ =========== ===================

Keep linod running, sign in as robin an run the clear_old_webforms() system task.

This will remove all three webforms (lino.modlib.webforms.remove_after is set to 1 minute instead of the default 7 days for this test:

$ go noi2; pm show lists.SubscribeToListRequests
No data to display