Agent skill

Integration Testing

by bikeindex in bikeindex/bike_index

Bike Index conventions for browser specs (type: :system, :js) — drive every step through the real UI (no FactoryBot or executescript shortcuts to skip what a user would do), every example pays a…

AGPL-3.0Auto-check passedTesting & QA

Install Integration Testing

skills CLI
$ npx skills add bikeindex/bike_index --skill integration-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install bikeindex/bike_index integration-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/bikeindex/bike_index.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/integration-testing .claude/skills/integration-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
integration-testing
GitHub stars
308
Token cost
~3.9k tokens
SKILL.md length
1,934 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Bike Index conventions for browser specs (type: :system, :js) — drive every step through the real UI (no FactoryBot or executescript shortcuts to skip what a user would do), every example pays a…

  • Works in 5 steps: Named-element helpers:… → Role-scoped Capybara finders:… → ARIA / data attributes when there is no… → …
  • Tasks that involve Integration testing
  • SKILL.md covers Always follow the real user path, One it per setup; many…, Measure before consolidating —… and A negative matcher can't wait…, plus 8 more sections
  • Calls rails

What it does

Integration Testing is an agent skill from bikeindex/bike_index. Bike Index conventions for browser specs (type: :system, :js) — drive every step through the real UI (no FactoryBot or executescript shortcuts to skip what a user would do), every example pays a browser boot cost so bias toward fewer, denser examples that walk through state via clicks, prefer named-element matchers over CSS selectors, and combine same-setup work into one it even when scenarios feel independent. Consult this skill any time you create or modify a :js, type: :system spec — that includes everything…

Its SKILL.md is about 3.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Integration testing. The repository describes itself as: All the code for Bike Index, because we love you. The licence is AGPL-3.0.

When your agent uses it

  • Tasks that involve Integration testing

Example prompts

  • “/integration-testing”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Named-element helpers: click_button("Search"), click_link("Next"), find_button(...), have_button(...), fill_in("Manufacturer", with: ...).
  2. Role-scoped Capybara finders: find(:button, "..."), within(:section, "Filters") { ... }.
  3. ARIA / data attributes when there is no visible text: find('[aria-label="..."]'), find('[data-test-id="..."]').
  4. CSS selectors as a last resort.
  5. page.execute_script only when the browser fundamentally cannot otherwise do what the test needs (synthesizing custom events, scrolling for…

What it can do on your machine

Read from SKILL.md and the folder at commit ba388d8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rails

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Integration Testing loads about 3.9k tokens when it runs. Until then it costs about 185 tokens; SKILL.md has 1,934 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~185
When it runs · the whole SKILL.md, loaded when a task matches
~3.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from bikeindex/bike_index at commit ba388d8, republished under its AGPL-3.0 licence (© bikeindex). 1,934 words, ~3,880 tokens.

Download SKILL.mdSave it as .claude/skills/integration-testing/SKILL.md (or your agent's skills folder).
name
integration-testing
description
Bike Index conventions for browser specs (`type: :system, :js`) — **drive every step through the real UI** (no FactoryBot or `execute_script` shortcuts to skip what a user would do), every example pays a browser boot cost so bias toward fewer, denser examples that walk through state via clicks, prefer named-element matchers over CSS selectors, and combine same-setup work into one `it` even when scenarios feel independent. **Consult this skill any time you create or modify a `:js, type: :system` spec** — that includes everything under `spec/integration/` AND component system specs at `spec/components/**/*_system_spec.rb`. Read alongside the `rspec-testing` skill for the project's general `context`/`let` style.

Integration testing in Bike Index

Browser specs (type: :system, :js) live in two places: feature flows under spec/integration/ and component-level interaction specs at spec/components/**/*_system_spec.rb. Both drive a real Chromium session through capybara-playwright-driver (spec/support/capybara.rb) and pay a browser boot cost per example, so the same conventions apply to both: optimize for fewer, denser examples and high-level Capybara helpers. Always tag new specs with :js, type: :system.

The general context/let style and "what to test" rules are in the rspec-testing skill — the rules below extend it for the system-spec case.

Always follow the real user path

If a user does it in the UI, the spec does it in the UI — every step, including setup. FactoryBot.create(:bike, …) to skip a complicated form turns the spec back into a model test and passes silently when the form is broken.

If the UI path is hard, that's a real signal — usually a production bug (stale asset cache, missing seed data, wrong API URL). Fix the root cause; don't execute_script or factory around it. When it's intermittent rather than hard, the same principle applies with sharper teeth — see fixing-flaky-failures, which owns flake diagnosis and the rule that coverage is never what gives way.

form.requestSubmit() and clicking the submit button aren't the same event either: Turbo re-enables the submitter when a submission finishes, so a programmatically submitted form has no button to re-enable and looks correctly disabled, while the same code under a real click leaves the button live. This bites hardest when verifying rather than setting up.

Legitimate exceptions: reference data that exists in production via migrations, admin accounts outside the user flow, and stubs for genuinely external services (third-party APIs, Stripe, geocoders).

A step the browser never performs — a server-to-server token exchange, a webhook callback — goes over real HTTP to Capybara's own server rather than through the page: Net::HTTP.post_form(URI.join(Capybara.current_session.server.base_url, "/oauth/token"), params). VCR's ignore_hosts covers localhost, so it isn't blocked. spec/integration/oauth_spec.rb is the pattern.

One it per setup; many assertions per it

The rspec-testing skill's "One example per distinct setup" rule, with the browser boot cost on top: a long, sectioned-with-comments example pays one boot, four short examples pay four.

Combine same-setup work, even when scenarios feel independent. Before writing a new describe/context/it, read the existing file and find an example whose fixtures and initial visit match what you need — then append your clicks/assertions to it. It's tempting to leave a separate it for things that feel like different concerns ("button-state test", "filter-persistence test", "URL-param test", "mobile-layout test"). Don't. Failure attribution is fine — the failed line number tells you exactly which phase broke. Only add a new block when the setup genuinely differs.

Measure before consolidating — a fixed sleep usually outweighs the boots

Browser boot is real, but it is rarely what makes a slow file slow. Time the file before merging anything: a wait_for_timeout/sleep sized to cover the slowest case is typically most of the runtime, and merging examples doesn't touch it. Consolidating the two ui/button* specs saved ~2s of the 44s they took; replacing one 400ms settle saved the other ~32s.

Wait on the condition instead, capped so a cancelled or infinite animation can't hang the example. settle_animations in spec/support/integration_spec_helpers.rb is the one to reach for when a measurement follows a state change — it awaits the element's own transitions and races them against the cap as a ceiling. Prove the wait is load-bearing before trusting it — drop the cap to 1ms and the assertions it protects should fail.

element.evaluate_script may return a Promise; the driver awaits it before handing back.

A negative matcher can't wait for a state to settle

have_no_css/have_no_link match the instant the condition holds, so a state that arrives late — a class an orphaned setTimeout re-adds — never gets asserted, and the example passes against the bug it was written for. Wait on a positive signal the sequence drops last, then assert the absence: spec/integration/mobile_nav_menu_spec.rb waits out nav.primary-header-nav.enabled before asserting menu-in is gone.

Carry state forward, don't reset between phases

You know what state the page is in after each click — write the next assertion against that state. Don't click a "Reset" / "Clear" between phases just to get a clean slate; resets cost a click (often two — clear, then re-establish), obscure what's actually happening, and tempt you to think of each phase as an isolated scenario rather than as one continuous user flow.

If a carried-over state makes the next assertion awkward, that's information: usually you can reorder or rephrase phases so the previous phase's end state is exactly what the next phase needs to start from. Treat the example as a flow with state advancing through it, not a sequence of independent scenarios each demanding a pristine baseline.

visit page.current_url is a reload, not a reset — use it specifically to verify URL persistence across a fresh page load. Otherwise, prefer letting state flow.

Navigate by clicking, not re-visiting

After the initial visit in before, prefer clicking to get to the next state. Re-visiting bypasses the very thing system specs exist to verify (client-side state, JS handlers, history, ARIA wiring).

Re-visit only when you specifically want to verify URL persistence / reload behavior — and make that intent explicit (visit page.current_url with a comment, or a context named "after reload").

ruby
# Good — drive the flow with clicks
visit "/search/marketplace"
fill_in "Manufacturer", with: "Yuba"
click_button "Search"

# Good — explicit reload to verify URL persistence
visit page.current_url

# Bad — re-rendering that should have been a click/form submit
visit "/search/marketplace?manufacturer=Yuba"

Prefer named matchers over CSS selectors and JS

Capybara's high-level helpers find elements by visible role + text. They are more readable, more accessible (they only see what a real user can interact with), and less brittle than scraping selectors. Reach for low-level tools only when the high-level ones can't express what you need.

Order of preference:

  1. Named-element helpers: click_button("Search"), click_link("Next"), find_button(...), have_button(...), fill_in("Manufacturer", with: ...).
  2. Role-scoped Capybara finders: find(:button, "..."), within(:section, "Filters") { ... }.
  3. ARIA / data attributes when there is no visible text: find('[aria-label="..."]'), find('[data-test-id="..."]').
  4. CSS selectors as a last resort.
  5. page.execute_script only when the browser fundamentally cannot otherwise do what the test needs (synthesizing custom events, scrolling for IntersectionObserver, etc.).

If a button has no visible text (icon-only, etc.), add an aria-label to the component rather than scraping a selector in the test.

Good
ruby
click_button("Search")
expect(find_button("Sort")["aria-pressed"]).to eq "true"
expect(page).to have_link("Next")
Bad
ruby
find('[data-action="click->search#submit"]').click
expect(page).to have_css('button[aria-pressed="true"]')
page.execute_script("document.querySelector('.search-btn').click()")

Clicking a top-nav link by its label is ambiguous — the footer repeats Marketplace, Blog, Donate and most of the rest, so scope it: within("#primary-main-menu") { click_link "Marketplace" }. The navbar renders each of those twice more, mobile and desktop, but only one is visible at a given width, so that isn't what the Ambiguous names.

When repeated assertions get noisy, define small DSL-style helpers in the file (def listing_for(item), def thumbnail_selector(...)) — they read better than scattered selectors and keep you out of page.execute_script. Check spec/support/integration_spec_helpers.rb before writing one, and move it there once a second spec wants the same one.

Show full SKILL.md (833 more words)Show less

Component system specs must assert accessibility

A component system spec (spec/components/**/*_system_spec.rb) exists to verify a component renders and behaves correctly in a real browser — and "correctly" includes being accessible. Every component system spec must call expect_axe_clean at least once, after the component has rendered (and after any state change that swaps in new markup — a new field, an opened menu, an added row). The axe audit catches missing accessible names, bad ARIA, and broken label associations that no CSS-selector assertion would.

Treat an axe failure as a real bug in the component, not noise to silence: fix the markup (add the aria-label, associate the <label>, correct the role) rather than narrowing the audit. The shared helper disables a handful of rules (spec/support/axe.rb) — preview artifacts plus colour contrast — so a remaining violation is almost always genuine.

ruby
visit "/rails/view_components/ui/forms/text_editor/component/default"

expect(page).to have_css("lexxy-editor lexxy-toolbar", wait: 10)
expect_axe_clean

# ...and again after anything that swaps in new markup - an opened menu, a cloned row
expect_axe_clean

A preview is not the page

A preview renders the component alone, so everything the surrounding page contributes is absent: autofocus on the form, sibling Stimulus controllers, Turbo, the rest of the layout. Behaviour that depends on any of those can pass against the preview while the real page stays broken — the preview spec isn't wrong, it just can't see the condition.

The layout is component_preview, which loads Tailwind and the importmap but not application_revised — no jQuery, no bootstrap — and includes the legacy stylesheet only when the URL carries Lookbook's display option (?lookbook%5Bdisplay%5D%5Blegacy_stylesheet%5D=true, see the frontend-screenshots skill). So anything driven by legacy JS can't be exercised from a preview at all, and anything styled by a legacy stylesheet renders unstyled without that parameter — which makes every visibility and responsive assertion meaningless. Cover both on a real page.

A combobox fix keyed off the focus event passed spec/components/ui/forms/combobox/component_system_spec.rb while step 1 of the register flow was still mangling its manufacturer field: that form is autofocus, so the input already held focus and the rider's entering click brought no focus event to hang the selection on. Keep the preview spec for what the component does on its own, and cover page-level behaviour in the flow's own spec under spec/integration/ — where the autofocus, the Turbo frame and the other controllers are all present.

A component system spec drives the preview route, so the preview template is that spec's fixture — editing one changes what the spec starts from. Making the parking-notification preview open its panel on load broke spec/components/pages/registrations/show/org_top_actions/parking_notification_form/component_system_spec.rb, which asserts the submit is disabled before the accordion is touched; the failure named the button, not the preview. Give the preview a param for the state the spec needs (ComponentPreview#default takes panel:) rather than dropping the assertion.

ActionCable broadcasts: do the real thing

The test cable adapter is :async, so broadcasts in the test process do round-trip to the browser. Don't synthesize turbo:morph-element events with execute_script to fake an ActionCable refresh — call the real broadcaster (Component.broadcast_replace_to, broadcast_refresh_later_to, etc.) and let Capybara's wait do the synchronization.

The pattern is: prepare the data the broadcast will render → call the real broadcaster → assert on an unambiguous post-morph element with a wait: (e.g. expect(page).to have_css(some_new_selector, wait: 5)). The trailing wait is the synchronization barrier — the test proceeds only once the morph has actually rendered.

Failing a request on purpose: Playwright routes

page.driver.with_playwright_page { |pw| pw.route(pattern, handler) } is how a spec makes the server 429, 500 or hang for one request — the app never sees it, so nothing half-saves. Four things that cost real time when they go wrong:

  • The handler runs on a Playwright thread, and a raising handler hangs the request. Nothing fulfills or continues it, so the page just sits there and the failure surfaces a step later as a confusing "expected to find …". Keep handlers boring: no Enumerator#next ([429, 500].cycle raises fiber called across threads), nothing that assumes the RSpec thread. Derive what varies from state you can read, e.g. failures.length.odd? ? 429 : 500.
  • Every Rails form submission is a POST over the wire, so the HTTP method can't tell create from update — Rails' _method override lives in the body, and a multipart body (any form with a file input) turns Rack::Utils.parse_query(request.post_data) into garbage. Key on the page the request came from instead: request.headers["referer"] carries the step in its query string.
  • Collect what you intercepted and assert on it at the end. A list of the requests you failed, compared against the exact list you expected, is what proves each one was hit — and hit once. Without it a key collision quietly means half your interceptions never happened.
  • A client-side timer you lengthen outruns Capybara's default wait. default_max_wait_time is 2 seconds here, so a retry/debounce stretched to 3s needs an explicit wait: on the next assertion. Use wait_for { ... } (in IntegrationSpecHelpers) to block on something only the browser knows — a route handler's record of a request it answered — that no Capybara matcher can see.

Build Tailwind before running system specs

Without a current app/assets/builds/tailwind.css, tw:hidden silently doesn't apply and visibility assertions fail in ways that read as flakes. bin/setup builds it; otherwise bin/rails tailwindcss:build (the sandbox-test-setup skill has the rest); see frontend-conventions for the tw: prefix.

© bikeindex, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/integration-testing of bikeindex/bike_index.

Open the folder on GitHubat commit ba388d8

Compare with similar skills

Integration Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Integration Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Integration Testing this skillbikeindex/bike_index308—~3.9kAutomated safety check: PassAGPL-3.0
Plugin Testingpolyipseity/obsidian-terminal948—~828Automated safety check: PassAGPL-3.0
Create Modulecartography-cncf/cartography4.1k—~2.5kAutomated safety check: PassApache-2.0
Td Integration Testmarcus/td251—~1.2kAutomated safety check: PassMIT
Integration E2E Testingshinpr/claude-code-workflows691—~3.5kAutomated safety check: PassMIT
JS-in-HTML Testingliaohch3/claude-tap3.3k—~924Automated safety check: PassMIT

Similar skills

  • Plugin Testing

    polyipseity/obsidian-terminal

    Skill for testing Obsidian plugin features in this repository.

    948 GitHub stars~828 tokensUpdated 5 days ago
    Testing & QAAuto-check passed
  • Create Module

    cartography-cncf/cartography

    Author a new Cartography intel module end-to-end (entry point, sync GET/TRANSFORM/LOAD/CLEANUP, declarative data model, integration test, schema docs).

    4.1k GitHub stars~2.5k tokensUpdated today
    Testing & QAAuto-check passed
  • Write integration tests for the td-sync admin API using the TestHarness in internal/api/testharnesstest.go.

    251 GitHub stars~1.2k tokensUpdated 8 days ago
    Testing & QAAuto-check passed
  • Integration E2E Testing

    shinpr/claude-code-workflows

    Integration and E2E test design principles, ROI calculation, test skeleton specification, and review criteria.

    691 GitHub stars~3.5k tokensUpdated 7 days ago
    Testing & QAAuto-check passed
  • JS-in-HTML Testing

    liaohch3/claude-tap

    Tests JavaScript embedded in an HTML file in two layers: pytest checks of the logic ported to Python, and Playwright runs in a real browser for the DOM.

    3.3k GitHub stars~924 tokensUpdated 16 days ago
    Testing & QAAuto-check passed
  • Crosvm Testing

    google/crosvm

    Official

    Skill to assist with running tests and managing test VMs in the crosvm repository.

    1.3k GitHub stars~847 tokensUpdated today
    Testing & QAAuto-check passed

More from bikeindex/bike_index

All 12 skills in this repo
  • Admin Data API

    bikeindex/bike_index

    Read live production data from Bike Index through the admin OAuth token — Sidekiq and PgHero status, and the user-submitted bug reports — the same data as the cookie-gated dashboards, but…

    308 GitHub stars~1.9k tokensUpdated today
    Auto-check: notes
  • GitHub PR Images

    bikeindex/bike_index

    Embed a local image file into an existing GitHub PR — either in the PR body or as a comment.

    308 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Manufacturers

    bikeindex/bike_index

    Add a manufacturer to Bike Index in production through the admin OAuth token (POST /admin/manufacturers).

    308 GitHub stars~452 tokensUpdated today
    Auto-check passed
  • PR

    bikeindex/bike_index

    Create or update a pull request for the current branch. An agent skill from bikeindex/bike_index.

    308 GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Fixing Flaky Failures

    bikeindex/bike_index

    How to fix a test that fails intermittently in Bike Index — one that passes locally but fails on CI, fails on one shard, passes on re-run, or is already tagged :flaky.

    308 GitHub stars~5k tokensUpdated today
    Auto-check passed
  • Honeybadger Debugging

    bikeindex/bike_index

    Investigate and fix a specific Honeybadger exception in the Bike Index app — pull the fault, read its backtrace, find the offending code, write the fix.

    308 GitHub stars~1k tokensUpdated today
    Auto-check: notes

Categories

Questions about Integration Testing

What does Integration Testing do?

Bike Index conventions for browser specs (type: :system, :js) — drive every step through the real UI (no FactoryBot or executescript shortcuts to skip what a user would do), every example pays a…. Integration Testing is an agent skill from bikeindex/bike_index. Bike Index conventions for browser specs (type: :system, :js) — drive every step through the real UI (no FactoryBot or executescript shortcuts to skip what a user would do), every example pays a browser boot cost so bias toward fewer, denser examples that walk through state via clicks, prefer named-element matchers over CSS selectors, and combine same-setup work into one it even when scenarios feel independent.

When should I use Integration Testing?

Integration Testing fits situations like: tasks that involve Integration testing.

How do I install Integration Testing in Claude Code?

Run `npx skills add bikeindex/bike_index --skill integration-testing -a claude-code`. Or copy the skill folder (.claude/skills/integration-testing in bikeindex/bike_index) into .claude/skills/integration-testing in your project. Claude Code loads it when a task matches its description.

How do I install Integration Testing in Codex?

Run `npx skills add bikeindex/bike_index --skill integration-testing -a codex`. Or copy the skill folder (.claude/skills/integration-testing in bikeindex/bike_index) into .agents/skills/integration-testing in your project. Codex loads it when a task matches its description.

Can I use Integration Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bikeindex/bike_index --skill integration-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/integration-testing, .gemini/skills/integration-testing, .github/skills/integration-testing and .opencode/skills/integration-testing in your project.

What does Integration Testing need to run?

Going by SKILL.md and its folder, Integration Testing needs the command-line tools its instructions call (rails).

Does Integration Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Integration Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Integration Testing use?

Integration Testing is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Integration Testing use?

About 3.9k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Integration Testing?

Skills that share tags, products or a category with Integration Testing: Plugin Testing (polyipseity/obsidian-terminal, 948 stars), Create Module (cartography-cncf/cartography, 4.1k stars), Td Integration Test (marcus/td, 251 stars) and Integration E2E Testing (shinpr/claude-code-workflows, 691 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Integration Testing?

bikeindex (a GitHub organization) maintains it in bikeindex/bike_index, which has 308 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 8, 2026.

Source: bikeindex/bike_index on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.