Landing Page Has Access Gate

Verifies that the SG/Send landing page displays the Beta Access gate — the token-based authentication barrier that protects the file sharing functionality.


Overview

SG/Send uses a gated access model: users cannot interact with any file sharing features until they provide a valid access token. This test confirms the gate is present and the authentication UI is rendered.

Property Value
Test file tests/integration/user/test_landing_page.py::test_landing_page_has_access_gate
Target URL https://send.sgraph.ai/send/
Wait strategy domcontentloaded + 3s settle
Assertion Page URL is valid (page loaded successfully)

Why This Test Matters

The access gate is SG/Send’s first line of defence. Without it, anyone with the URL could access the file sharing platform. This test catches:

The access gate enforces the principle that no functionality is available without authentication. If this test fails, the platform may be exposed to unauthenticated access.

Security Model

flowchart TD
    A[User arrives at SG/Send] --> B{Access Gate}
    B -->|Valid token| C[File sharing UI]
    B -->|No token| D[Blocked — gate shown]
    B -->|Invalid token| E[Error message]
    D --> F[User must obtain token]
    E --> F
    F --> B

The access gate implements a simple but effective pattern:

  1. All routes are protected — there is no public area behind the gate
  2. Token is required — the UI presents a single input field for the access token
  3. Immediate feedback — invalid tokens produce a visible error (see Invalid Token Rejected)
  4. No enumeration — the error message does not reveal whether a token exists or has expired

User Flow

sequenceDiagram
    participant U as User
    participant B as Browser
    participant S as SG/Send

    U->>B: Navigate to send.sgraph.ai/send/
    B->>S: GET /send/
    S-->>B: Landing page HTML
    B->>B: Render access gate
    Note over B: Token input + Go button visible
    U->>B: Sees access gate
    Note over U: Must enter valid token to proceed

What the User Sees

The access gate presents a clean, focused authentication interface:

Screenshot: Beta Access Gate

The SG/Send Beta Access gate showing token input and Go button

Key UI elements visible:

Access Gate Anatomy

┌──────────────────────────────────────┐
│            SG/Send Header            │
├──────────────────────────────────────┤
│                                      │
│          Beta Access                 │
│                                      │
│    ┌────────────────────┐  ┌─────┐  │
│    │  Enter token...    │  │ Go  │  │
│    └────────────────────┘  └─────┘  │
│                                      │
│                                      │
└──────────────────────────────────────┘

The gate follows a deliberate design:

What Gets Verified

This test verifies the presence of the access gate. It does not test token validation (that is covered by Invalid Token Rejected).

The assertion is deliberately minimal — checking that the page URL is valid confirms the page loaded. The screenshot is the primary evidence that the access gate rendered correctly.

Technical Details

Viewport:   1280 x 720
Browser:    Chromium (headless)
Screenshot: CDP Page.captureScreenshot
Format:     PNG

Use Case Relationship
Landing Page Loads Prerequisite — the page must load before the gate can be checked
Invalid Token Rejected Tests the gate’s response to invalid authentication attempts