# Test plan How to check that Federated Calendar works before a push to `main`, which publishes a new package to every CoreDesktop computer. There are two parts: the automated tests, which run on every build, and the manual tests below, which need a real Federated Computer Core. Run the automated tests for every change. Run the manual tests that cover what changed, and all of them before telling people about a new feature. ## Automated tests ```sh meson setup _build # once ninja -C _build meson test -C _build --print-errorlogs ``` The package build runs the same tests (`check()` in [build-aux/arch/PKGBUILD](build-aux/arch/PKGBUILD)), so a failing test stops the Gitea Actions workflow before it publishes anything. | Test | Covers | | --- | --- | | `federated-core` | Finding the Core of a CalDAV host from CoreDesktop's `cores/*.conf` and older `core.conf`; skipping incomplete files; the Core's Jitsi server | | `jitsi` | Room names; recognizing Jitsi room links; finding an event's conference; adding and removing the link in the description | | `event` | Events, including organizer, attendees and `CONFERENCE` properties surviving a round trip through iCalendar text; `CONFERENCE` written without `FEATURE` or `LABEL`; `SEQUENCE` and `DTSTAMP` on saving, and cloning an event right after its time changed | | `event-attendee` | Attendees and their roles | | `utils` | Helpers, including finding Google Meet, Teams and Jitsi links in descriptions | | `search`, `server`, `discoverer`, `range`, `range-tree`, `event-list`, `daylight-saving`, `internals` | GNOME Calendar's own tests | | `Validate appstream file` | The app's metadata | Add a unit test with every change to `src/federated/`, `src/core/` or `src/utils/`. The GUI has no automated tests, so changes there need the manual tests. Also check that it builds without the Federated Core features: ```sh meson configure _build -Dfederated_core=false && ninja -C _build meson configure _build -Dfederated_core=true ``` ## Setting up for manual tests You need: - A computer with CoreDesktop, where `configure` has connected a Core. There should be a file in `~/.config/coredesktop/cores/`, and the Core's Nextcloud calendars should be in GNOME Online Accounts. - A second email address that you can read, ideally in a different mail app (e.g. Gmail or Thunderbird), to receive invitations. Test with a Gmail address too: Gmail is the strictest about invitations. Invite the Gmail address itself, not an address forwarded to it, or Gmail shows "Unable to load event" whatever the invitation says. - A calendar that isn't on a Core, e.g. a local "On This Computer" calendar. - A read-only calendar, e.g. a subscribed holidays calendar. Run the build without installing it: ```sh GSETTINGS_SCHEMA_DIR=_build/data ./_build/src/federated-calendar ``` Or install the package that Gitea Actions built, to test what users get: ```sh sudo pacman -Syu federated-calendar ``` Note the results of each run: the commit, what passed, and what failed. ## Manual tests Each test lists its steps and, after **→**, what should happen. ### 1. Installing 1.1. Install the package on a computer that also has GNOME Calendar. → Both apps are in the app grid, with different names and icons, and each opens its own window. 1.2. Open **About Federated Calendar** from the main menu. → It names Federated Calendar, not GNOME Calendar. ### 2. Everyday calendar use The rest of the app is GNOME Calendar's. Check that it still works. 2.1. Switch between the Month, Week and Agenda views and move between dates. → Events show on the right days and times. 2.2. Create an event with Quick Add (click an empty day), then one with the full editor, changing its start and end times a few times before saving. Edit them, then delete them. → The app doesn't crash. Each change appears on the Core's Nextcloud calendar (check in the browser), and the deleted events are gone from it. 2.3. Create an event that repeats weekly. Edit one occurrence with "This event only", and delete another. → Only those occurrences change. 2.4. Search for an event by its title. → It's found, and a repeating event shows up once. 2.5. Import an `.ics` file. → Its events go into the chosen calendar. 2.6. Open an event in a read-only calendar. → The editor says it's read-only, and nothing can be changed. ### 3. Inviting people 3.1. Make an event on a Core calendar. → The editor has an **Invite by Email** row. 3.2. Make an event on a calendar that isn't on a Core. → There's no Invite by Email row. 3.3. On a Core calendar, invite your second address, change the event's time a few times, and save. → You're the organizer. The second address gets one email, titled "Invitation:" rather than "Invitation updated:", which it can accept. Its attached `event.ics` has `SEQUENCE:0`. Gmail shows a card with Yes, No and Maybe above the message. 3.4. Accept with the **Accept** link in the invitation email's text. → After the next sync, the event on your calendar shows the reply. The event isn't added to the second address's calendar: the link only tells the organizer's Nextcloud. 3.5. Accept another invitation from the second address's mail app instead: Nextcloud Mail's Accept at the top of the message, or Thunderbird's or Evolution's invitation bar. Or import the attached `event.ics` into its calendar. → The event is on the second address's calendar too. If that mail app also has your Core calendar, which already holds the event, it says the event has already been processed and offers no Accept. That's expected: use a mail app or account without the Core calendar. 3.6. Change the event's time and save. → The second address gets an update. Its `event.ics` has a `SEQUENCE` one higher than before and a newer `DTSTAMP`, and the mail app updates the event rather than saying it's already been processed. 3.6a. Change only the title and save. → The update keeps the same `SEQUENCE`, with a newer `DTSTAMP`. The mail apps still take it as an update. 3.7. Remove the attendee and save, or delete the event. → The second address gets a cancellation. 3.8. Open an event that someone else organized and invited you to. → You can't invite more people or remove anyone. 3.9. Invite someone, then remove them again before saving. → The event is saved without an organizer, and nobody gets email. ### 4. Video conferences 4.1. Make an event on a Core calendar. → There's an **Add Video Conference** row under Location. 4.2. Change the event's calendar to one that isn't on a Core. Then open an event in a read-only calendar. → There's no Add Video Conference row in either case. 4.3. On a Core calendar, click **Add Video Conference**. → A "Video Conference" row shows a link like `https://jitsi./BraveOttersSing-k3f9x2m7`, with Copy and Remove buttons. Notes ends with "Join the video conference: ". Location is unchanged. 4.4. Click **Copy** and paste somewhere. → The link is pasted. The button shows a check mark for a moment. 4.5. Open the link in a browser. → It's a room on your Core's Jitsi. 4.6. Invite your second address and save. → The invitation email shows the link in its description. The attached `event.ics` has the line `CONFERENCE;VALUE=URI:`, with no `FEATURE` or `LABEL` parameters. Gmail shows Yes, No and Maybe, not "Unable to load event". 4.7. Open the event's popover in the calendar. → There's a **Join** button that opens the room. If the event has a location, it shows too. 4.8. Reopen the event in the editor. → It shows the same link, and doesn't offer to add another. 4.9. Edit the title and save. → The link stays the same. 4.10. Delete the "Join the video conference" line from Notes, but leave the conference, and save. → The line is back after saving. 4.11. Click **Remove** and save. → The row and the line in Notes are gone. Add Video Conference is offered again. The second address gets an update without the link. 4.12. Paste a Jitsi link (e.g. `https://meet.jit.si/SomeRoom`) into an event's Location or Notes and save. → The editor shows it as the event's conference, and the popover has a Join button for it. 4.13. Open an event with a Google Meet or Microsoft Teams link. → The popover's Join button still works. ### 5. Repeating events with a conference 5.1. Make a weekly event on a Core calendar and save it. Open one occurrence, add a video conference, and save with **All events**. → Every occurrence has the same link, on this computer and in Nextcloud. 5.2. Open a later occurrence, remove the conference, and save with **This and future events**. → Earlier occurrences keep the link, and that one and later ones don't. Check in Nextcloud, too. 5.3. Edit one occurrence on its own ("This event only"), then add a conference to the series with **All events**. → Check whether the occurrence edited before gets the link. It may not; if so, note it in [PLAN.md](PLAN.md). ### 6. Accessibility 6.1. Use the event editor with the keyboard only. → Tab reaches every control, including Add Video Conference, Copy and Remove. Alt+V presses Add Video Conference. After adding or removing a conference, the focus stays in the same place in the editor. 6.2. Use the editor with Orca, the screen reader (Super+Alt+S). → Every button is read out with its name. Adding, copying and removing a conference are announced. 6.3. Turn on High Contrast and Large Text in Settings → Accessibility. → The editor and popover are readable, with nothing cut off. ### 7. Translations 7.1. Make the translation template, and check that it has the new strings. Delete `po/federated-calendar.pot` afterwards, as it isn't kept in git. → Every new label, tooltip and message is in it. ```sh ninja -C _build federated-calendar-pot ``` 7.2. Run the app in a language with longer words. → Labels fit, and any untranslated strings are in English. ```sh LANGUAGE=de GSETTINGS_SCHEMA_DIR=_build/data ./_build/src/federated-calendar ``` ### 8. Publishing 8.1. After pushing to `main`, check the run in the repository's Actions tab on Gitea. → It builds, the tests pass, and the package is published. 8.2. On a CoreDesktop computer, update with `sudo pacman -Syu`. The app keeps running in the background after its window closes, so quit the old one with `pkill -f federated-calendar` before opening it again. → The new version installs and opens, with the new features. ## Checking an invitation's iCalendar When a mail app shows an invitation without Accept or Yes / No / Maybe, look at the `event.ics` that Nextcloud attached: - **Get it:** in Gmail, the message's ⋮ menu → **Download message**; in Thunderbird, **File → Save As**. The `text/calendar` part is base64; save the attachment or decode it. - **Check it with Google's parser:** import the `.ics` in Google Calendar, Settings → Import & export. "Imported 0 out of 0 events" means Google can't read the file at all, which is why Gmail says "Unable to load event". To find the cause, import copies that each change one thing. That's how we found that Google rejects `FEATURE=AUDIO,VIDEO` on `CONFERENCE`. - **What the mail apps compare:** an invitation's `UID` matches it to an event the reader already has. A higher `SEQUENCE`, or the same `SEQUENCE` with a newer `DTSTAMP`, makes it an update; otherwise Thunderbird says it has already been processed. - **What's fine:** Nextcloud sends the file with bare LF line endings, not the CRLF that RFC 5545 asks for, and in our time zone as `US/Mountain`. Gmail and Thunderbird accept both. ## Before telling people about a release - [ ] The automated tests pass, with and without `-Dfederated_core`. - [ ] Tests 1 to 8 pass, or their failures are known and in [PLAN.md](PLAN.md). - [ ] [NEWS](NEWS) and [README.md](README.md) describe what changed. - [ ] The Gitea Actions run published the package.