component-view-test

Create and fix MetaMask Mobile component view tests in TypeScript.

3.0k|1.6k|Updated Jul 18, 2018
One-click install
npx skills add https://github.com/MetaMask/metamask-mobile --skill component-view-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-view-test
Source: https://github.com/MetaMask/metamask-mobile/tree/main/.agents/skills/component-view-test
Command: npx skills add https://github.com/MetaMask/metamask-mobile --skill component-view-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Component view tests are essential for validating UI behavior in MetaMask Mobile, but maintaining them across component changes is error-prone and time-consuming.

Core Features & Use Cases

  • Write new component-view tests (*.view.test.tsx) using the tests/component-view framework.
  • Fix failing tests by following the provided reference workflows and tooling.
  • Update tests after component changes or new presets/renderers are added.
  • Create or update navigational tests using navigation-mocking.
  • Read the documentation references for writing tests and diagnosing failures.

Quick Start

Read the target component and existing tests, then create or fix a *.view.test.tsx using the tests/component-view framework.

Frequently Asked Questions about component-view-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write component view tests for MetaMask Mobile?

To write component view tests, create a *.view.test.tsx file using the tests/component-view framework, leveraging provided presets, renderers, and mocks to validate UI behavior accurately.

How do I fix failing React Native component view tests in Jest?

Fix failing React Native component view tests by following provided reference workflows and tooling to diagnose failures, update navigation-mocking, and adjust renderer practices within the framework.

What is the best way to update integration tests after component changes?

Update integration tests after component changes by adjusting existing *.view.test.tsx files to support new presets, renderers, and mocks using the component-view framework rules.

How do navigation-mocking practices work when testing MetaMask Mobile components?

Navigation-mocking practices work by simulating navigational interactions within component view tests, allowing you to validate routing behavior without triggering actual navigation events in the React Native environment.

Do I need specific renderers and presets to run component view tests?

Yes, component view tests require specific renderers and presets provided by the tests/component-view framework to ensure consistent UI behavior validation and accurate mocking of dependencies.

Why does my component view test fail after adding new presets?

Component view tests fail after adding new presets because the framework rules require updating existing renderer and mock configurations to support the newly introduced component view test dependencies.