Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

fosmvvm-ui-tests-generator

bởi foscomputerservices

Coding Agents & IDEs
317Lượt tải do clawskills.sh công bố
0Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Generate UI tests for FOSMVVM SwiftUI views using XCTest and FOSTestingUI.

Mô tả

Kỹ năng này làm gì

Generates XCTest-based UI tests for SwiftUI views built with the FOSMVVM architecture. Handles both interactive views that verify ViewModelOperations and display-only views that only check UI state. Produces base test infrastructure and per-view test files with element accessors.

Generates the full test scaffolding, including operations stubs and test data transport wiring, that FOSMVVM's architecture requires but is tedious to write by hand.

Khi nào nên dùng

  • Writing UI tests for a new form view that calls backend APIs
  • Verifying button interactions invoke the correct ViewModelOperations
  • Testing display-only cards render the right data from stub ViewModels
  • Setting up base XCTest infrastructure for a new FOSMVVM project
  • Covering navigation flows between ViewModelViews with accessibility identifiers

Quy trình ví dụ

ĐẦU VÀO

User asks: Generate UI tests for TaskFormView, which has submit and cancel buttons that call TaskFormViewOps

AGENT
  1. 1

    Identifies TaskFormView as an interactive view requiring ViewModelOperations verification

  2. 2

    Generates base test case class inheriting from ViewModelViewTestCase if not already present

  3. 3

    Creates TaskFormViewUITests with UI state tests for button enabled/disabled states

  4. 4

    Adds operation tests that tap submit and cancel, then assert on stubOps.submitCalled and stubOps.cancelCalled

  5. 5

    Emits XCUIApplication extension with submitButton and cancelButton element accessors using uiTestingIdentifier values

ĐẦU RA

TaskFormUITests.swift with full test class, XCUIApplication extension, and notes on required .uiTestingIdentifier and .testDataTransporter additions to the view

Cài đặt

clawhub install foscomputerservices/fosmvvm-ui-tests-generator

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết