Skip to content

Add tests for Connections Pane including accessing data sources and managing #18429

Closed

Description

@ronblum

Problem Statement

The goal is to test the Connections Pane. This include

  • Making connections
  • Checking the database tree UI
  • Managing drivers
  • Installing drivers (this is a pro-only feature)

Proposed Behaviour

Create Playwright tests for these. The challenge will be in having a live test database available.

QA Notes

Once you have opened a PR, add additional information for QA on how to validate the change, paying special attention to the level of risk, adjacent areas that could be affected by the change, and any important contextual information not present in the original description.

Activity

  1. self-assigned this
    on Aug 12, 2026
  2. ronblum commented on Aug 13, 2026

    @ronblum
    ContributorAuthor

    Opened #12262 to cover the pro features, focusing on open-source for this issue:

    Making connections
    Checking the database tree UI
    Managing drivers

  3. changed the title [-]Add tests for Connections Pane including managing and installing drivers[/-] [+]Add tests for Connections Pane including accessing data sources and managing[/+] on Aug 13, 2026
  4. ronblum commented on Aug 28, 2026

    @ronblum
    ContributorAuthor

    Running locally

    macOS

    SQLite

    1. brew install unixodbc sqliteodbc
    2. npm ci (skip if already done)
    3. npx playwright test tests/panes/connections/

    No server, no manual database creation -- the driver just opens a file the suite creates itself.

    PostgreSQL

    1. brew install unixodbc psqlodbc postgresql@17 (any postgresql@N works -- it's just for the server binaries)
    2. If Postgres won't start with a postmaster became multithreaded during startup error, set export LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 in your shell profile
    3. npm ci (skip if already done)
    4. npx playwright test tests/panes/connections/

    The suite starts and stops its own throwaway server on port 55432 -- you never run pg_ctl/brew services start yourself.

    Windows

    SQLite

    1. Download and silently install the driver: https://ch-werner.hier-im-netz.de/sqliteodbc/sqliteodbc_w64.exe (SQLite itself has no official ODBC driver; this third-party project is the de facto standard, and the same source this repo's own CI scripts use)
    2. npm ci (skip if already done)
    3. npx playwright test tests/panes/connections/

    No server needed -- the driver just opens a file the suite creates itself. (Windows has a built-in ODBC driver manager, so there's no unixODBC-equivalent to install.)

    PostgreSQL

    1. Install the server and driver: choco install postgresql psqlodbc (or the EDB installer from postgresql.org, which bundles both)
    2. npm ci (skip if already done)
    3. npx playwright test tests/panes/connections/

    The suite starts and stops its own throwaway server using the installed binaries -- you never start the Windows service yourself. If initdb.exe isn't found via PATH or a PGBIN environment variable, it falls back to searching Program Files\PostgreSQL.

    Linux (Debian/Ubuntu)

    SQLite

    1. sudo apt-get install unixodbc libsqliteodbc
    2. npm ci (skip if already done)
    3. npx playwright test tests/panes/connections/

    No server, no manual database creation -- the driver just opens a file the suite creates itself.

    PostgreSQL

    1. sudo apt-get install unixodbc odbc-postgresql postgresql (skip postgresql if a server is already installed -- only the binaries are needed, the service can stay stopped)
    2. npm ci (skip if already done)
    3. npx playwright test tests/panes/connections/

    The suite starts and stops its own throwaway server -- you never run systemctl start postgresql yourself.

    Fedora

    SQLite

    1. sudo dnf install -y unixODBC unixODBC-devel sqlite-devel gcc make tar
    2. Build the driver from source (Fedora's own packaged sqliteodbc crashes R at runtime):
      curl -fsSL -o sqliteodbc.tar.gz https://ch-werner.hier-im-netz.de/sqliteodbc/sqliteodbc-0.99991.tar.gz
      tar -xzf sqliteodbc.tar.gz && cd sqliteodbc-0.99991
      CFLAGS="-std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion" \
        ./configure --prefix=/usr --libdir=/usr/lib64 --build="$(uname -m)-unknown-linux-gnu"
      make && sudo make install
    3. npm ci (skip if already done)
    4. npx playwright test tests/panes/connections/

    PostgreSQL

    1. sudo dnf install -y --allowerasing unixODBC unixODBC-devel postgresql-odbc gcc make tar (add postgresql-server if no server binaries exist yet)
    2. npm ci (skip if already done)
    3. npx playwright test tests/panes/connections/

    RHEL / Rocky

    Same as Fedora, but drop --allowerasing (Fedora-only, for a container-image conflict) -- and note there's no packaged sqliteodbc at all here either, so the same source-build steps apply.

    If both drivers are installed for a platform, the same command run in either section exercises both engines; a target skips with a reason if its driver isn't found.

  5. ronblum commented on Aug 28, 2026

    @ronblum
    ContributorAuthor

    Completed by #18648 .

    (The link to #12262 was a mistake.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions