test-cotton-components

Community

Guide AI agents in testing Django Cotton components.

AuthorSamuelJennings
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill guides AI agents on how to effectively test Django Cotton components using pytest fixtures provided by django-cotton-bs5, streamlining test-writing and ensuring reliable UI component tests.

Core Features & Use Cases

  • Clear fixture usage guidance (cotton_render, cotton_render_soup, cotton_render_string, cotton_render_string_soup)
  • Testing patterns for single and multi-component scenarios
  • DOM assertions, context handling, and accessibility checks
  • Real-world examples and best practices for creating maintainable tests

Quick Start

Install and configure pytest, Django, and django-cotton-bs5 fixtures in your project, then write tests like:

  • Use cotton_render to render a single component, e.g., cotton_render('cotton_bs5.button', text='Click') and assert HTML.
  • Switch to cotton_render_soup when you need DOM traversal.
  • For inline markup, use cotton_render_string.
  • For complex structures, use cotton_render_string_soup.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: test-cotton-components
Download link: https://github.com/SamuelJennings/django-cotton-bs5/archive/main.zip#test-cotton-components

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.