Skip to content

test(e2e): Section 1 connection form scenarios (#1050) - #1256

Merged
ZhuchkaTriplesix merged 7 commits into
devfrom
issue/1050-e2e-connection-lifecycle
Oct 10, 2026
Merged

ZhuchkaTriplesix merged 7 commits into
devfrom
issue/1050-e2e-connection-lifecycle

Conversation

@ZhuchkaTriplesix

@ZhuchkaTriplesix ZhuchkaTriplesix commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Restores the connection-form scenarios of Section 1 (e2e_connection_form_test.dart), dropped in 8b876c1, and makes them pass: a connection is created through the New connection dialog and the form of each type (PostgreSQL, MySQL, Redis, MongoDB by URI; SQLite through its fields).

Why they failed (all five with Bad state: No element in enterText):

  • No type was ever selected. The test opened the Database type dropdown and tapped find.text(label).hitTestable().last. The menu's items come before the grid cards in the element tree, so that was a card; the open MenuAnchor has consumeOutsideTap: true, so the tap only closed the menu. Next stayed disabled, the form never opened, and waitFor timed out silently.
  • The card's label is covered. At the test window size the type grid is shorter than a card and the dialog footer covers the label, so the scenario taps the card itself.
  • MongoDB is in the second row, not built until the grid scrolls: scrollUntilVisible first.
  • MongoDB's URI field is behind "Use connection string": the scenario checks it.
  • Wrong expectations for MySQL / Redis: for a URI connection they keep host empty and do not name it after the URI's host. Every form moves the URI to the secure store, so the scenario checks it there, and waits for the new name in the sidebar.

waitFor now asserts what it waited for and pickType checks that Next left the type dialog, so a future break names its step.

Refs #1050 (folders and moving connections into them are still not covered).

Test plan

  • CI: all five form scenarios and the whole suite pass on the PR head (no local runs, per team rule)

…e the form scenarios

enterText needs the EditableText under the TextField, not the TextField
itself; the URI and SQLite scenarios failed on it. Restores the scenarios
dropped in 8b876c1 for #1050.
@github-actions github-actions Bot added tests Theme parser epic core Core library logic and services connections Database connections, URI parsing, pools P3 Low priority / Polish & Enhancements labels Oct 10, 2026
Fixes the no_leading_underscores_for_local_identifiers analyzer info that
failed Code Analysis on the form scenarios.
@ZhuchkaTriplesix
ZhuchkaTriplesix marked this pull request as draft October 10, 2026 06:09
…breaks

The open Database type dropdown consumes taps outside its menu, and its
items come before the type cards in the element tree, so tapping the last
visible label hit a card and only closed the menu. Nothing was selected,
Next stayed disabled and the form never opened; waitFor timed out silently
and enterText failed with 'No element'.

waitFor now asserts what it waited for, and pickType checks that Next left
the type dialog. The EditableText finder is gone: enterText already looks
for the EditableText under the field.
At the test window size the type grid is shorter than a card and the
dialog footer covers the card's label, so a tap on the label hit the footer
and nothing was selected. The card's centre is visible.
…stage type cards

MySQL and Redis keep host empty for a URI connection and name it without
the URI's host; every form moves the URI itself to the secure store, so
that is where the scenario looks for the address. The MongoDB card is in
the grid's second row, built in the cache extent and offstage for a
default finder.
… the sidebar

The MongoDB card is not built until the grid scrolls, so scrollUntilVisible
brings its label in before the tap. The sidebar reloads from the database
after the save, so the scenario waits for the new name instead of checking
once.
… the URI

The MongoDB form shows its URI field only after 'Use connection string' is
checked.
@ZhuchkaTriplesix
ZhuchkaTriplesix marked this pull request as ready for review October 10, 2026 06:40
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit a028b67 into dev Oct 10, 2026
14 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1050-e2e-connection-lifecycle branch October 11, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connections Database connections, URI parsing, pools core Core library logic and services P3 Low priority / Polish & Enhancements tests Theme parser epic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant