ci: fix ios feature flow steps for the drawer, search, selection, calendar and contacts

This commit is contained in:
Linus Rath
2026-10-22 08:20:49 +02:00
parent 52975bd715
commit 8533bd4f99
6 changed files with 64 additions and 29 deletions
+3 -5
View File
@@ -14,7 +14,8 @@ tags:
- assertVisible: "Sent([ ,].*)?"
- assertVisible: "Drafts([ ,].*)?"
- assertVisible: "Archive([ ,].*)?"
- assertVisible: "Projects([ ,].*)?"
# Parent folders read "Collapse, Projects" (the chevron comes first).
- assertVisible: ".*Projects.*"
- tapOn: "Archive([ ,].*)?"
- extendedWaitUntil:
visible: ".*Invoice 2025-12.*"
@@ -26,10 +27,7 @@ tags:
when:
notVisible: "Alpha([ ,].*)?"
commands:
- tapOn:
text: "Expand"
rightOf: "Projects([ ,].*)?"
optional: true
- tapOn: "Expand, Projects.*"
- tapOn: "Alpha([ ,].*)?"
- extendedWaitUntil:
visible: ".*Project Alpha kickoff.*"
+1 -1
View File
@@ -14,6 +14,7 @@ tags:
- assertNotVisible: ".*Weekly digest.*"
- takeScreenshot: search-01-hit
- tapOn: "Clear search"
- tapOn: "Search mail..."
- inputText: "zzqx-no-such-mail"
- pressKey: Enter
- extendedWaitUntil:
@@ -24,4 +25,3 @@ tags:
- extendedWaitUntil:
visible: ".*Weekly digest.*"
timeout: 30000
- hideKeyboard
+11 -2
View File
@@ -55,7 +55,16 @@ tags:
timeout: 10000
- takeScreenshot: actions-04-selected
- tapOn: "Star"
- tapOn: "Clear selection"
# A bulk action ends selection mode by itself.
- runFlow:
when:
visible: "Clear selection"
commands:
- tapOn: "Clear selection"
- longPressOn: ".*Grüße aus München.*"
- tapOn: "Unstar|Star"
- tapOn: "Clear selection"
- runFlow:
when:
visible: "Clear selection"
commands:
- tapOn: "Clear selection"
+24 -9
View File
@@ -8,6 +8,15 @@ tags:
- evalScript: ${output.event = 'E2E event ' + DEVICE + ' ' + Date.now() % 100000}
- tapOn:
id: tab-calendar
# The first visit asks for notification permission (event reminders).
- extendedWaitUntil:
visible: ".*Would Like to Send You Notifications.*|Go to today"
timeout: 30000
- runFlow:
when:
visible: ".*Would Like to Send You Notifications.*"
commands:
- tapOn: "Allow"
- extendedWaitUntil:
visible: "Go to today"
timeout: 30000
@@ -36,7 +45,6 @@ tags:
timeout: 10000
- tapOn: "Title"
- inputText: ${output.event}
- hideKeyboard
- scrollUntilVisible:
element: "Add reminder"
direction: DOWN
@@ -64,22 +72,29 @@ tags:
- takeScreenshot: calendar-06-detail
- assertVisible: ".*15 minutes before.*"
# Edit the title
# Edit: add a location (an empty field, so no cursor games in the title)
- tapOn: "Edit"
- extendedWaitUntil:
visible: "Edit event"
timeout: 10000
- tapOn: ${output.event}
- inputText: " edited"
- hideKeyboard
- scrollUntilVisible:
element: "Place or address"
direction: DOWN
timeout: 10000
- tapOn: "Place or address"
- inputText: "Room 42"
- tapOn: "Save"
- extendedWaitUntil:
visible: ".*${output.event} edited.*"
visible: ".*Room 42.*"
timeout: 20000
- takeScreenshot: calendar-07-edited
# Delete
- tapOn: ".*${output.event} edited.*"
# Delete (the detail sheet is still open after saving)
- runFlow:
when:
notVisible: "Delete"
commands:
- tapOn: ".*${output.event}.*"
- extendedWaitUntil:
visible: "Delete"
timeout: 10000
@@ -91,7 +106,7 @@ tags:
text: "Delete"
below: "Delete this event.*"
- extendedWaitUntil:
notVisible: ".*${output.event} edited.*"
notVisible: ".*${output.event}.*"
timeout: 20000
- takeScreenshot: calendar-08-deleted
- tapOn:
+20 -11
View File
@@ -27,17 +27,26 @@ tags:
- extendedWaitUntil:
visible: "Save"
timeout: 10000
- tapOn:
text: "First name"
index: 1
- inputText: "E2E"
- tapOn:
text: "Last name"
index: 1
- inputText: ${output.last}
- tapOn: "email@example.com"
- inputText: "e2e.contact@example.net"
- hideKeyboard
- runFlow:
file: ../subflows/type.yaml
env:
FIELD: contact-first-name
TEXT: E2E
- runFlow:
file: ../subflows/type.yaml
env:
FIELD: contact-last-name
TEXT: ${output.last}
- scrollUntilVisible:
element:
id: contact-email-0
direction: DOWN
timeout: 10000
- runFlow:
file: ../subflows/type.yaml
env:
FIELD: contact-email-0
TEXT: e2e.contact@example.net
- takeScreenshot: contacts-03-form
- tapOn: "Save"
- extendedWaitUntil:
+5 -1
View File
@@ -287,9 +287,13 @@ async function sendMail({ from = 'userb', to, subject, text, html, attach }) {
async function findMail({ as = 'userb', subject, timeout = 30 }) {
const s = await jmapSession(as);
const deadline = Date.now() + timeout * 1000;
// Stalwart's subject filter finds nothing for "Re: x" or "Fwd: x" (it
// indexes the base subject), so search without the prefixes and compare
// the full subject below.
const base = subject.replace(/^((re|fwd?|aw|wg)\s*:\s*)+/i, '');
for (;;) {
const [[, q], [, got]] = await jmap(as, [
['Email/query', { accountId: s.accountId, filter: { subject }, sort: [{ property: 'receivedAt', isAscending: false }], limit: 5 }, '0'],
['Email/query', { accountId: s.accountId, filter: { subject: base }, sort: [{ property: 'receivedAt', isAscending: false }], limit: 10 }, '0'],
['Email/get', { accountId: s.accountId, '#ids': { resultOf: '0', name: 'Email/query', path: '/ids' }, properties: ['subject', 'attachments', 'mailboxIds', 'from'] }, '1'],
]);
const hit = got.list.find((m) => m.subject === subject);