Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { defineConfig } from "vitepress"

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "OnChainTestKit",
description:
"End-to-end testing toolkit for blockchain applications, powered by Playwright",

head: [
// Vercel Web Analytics will be injected via theme setup
],

themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Home", link: "/" },
{ text: "Guide", link: "/guide" },
{ text: "Examples", link: "/examples" },
],

sidebar: [
{
text: "Getting Started",
items: [
{ text: "Introduction", link: "/guide" },
{ text: "Installation", link: "/installation" },
],
},
],

socialLinks: [
{
icon: "github",
link: "https://github.com/MunyayLLC/https-github.com-joe10832-onchaintestkit",
},
],
},
})
16 changes: 16 additions & 0 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { inject } from "@vercel/analytics"
import DefaultTheme from "vitepress/theme"
import type { Theme } from "vitepress"

// Inject Vercel Web Analytics
// Note: inject() runs on the client side and does not include route support
if (typeof window !== "undefined") {
inject()
}

export default {
extends: DefaultTheme,
enhanceApp() {
// App-level enhancements can go here
},
} satisfies Theme
26 changes: 26 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Examples

## Basic Usage

Here are some examples of using OnChainTestKit in your tests.

### Creating a Test

```typescript
import { createOnchainTest } from '@coinbase/onchaintestkit';

// Create your test configuration
const test = createOnchainTest({
wallet: 'metamask',
network: 'sepolia'
});

test('should connect wallet', async ({ page, wallet }) => {
await page.goto('http://localhost:3000');
await wallet.connect();
});
```

## More Examples

Check the [example directory](https://github.com/MunyayLLC/https-github.com-joe10832-onchaintestkit/tree/main/example) in the repository for more usage examples.
18 changes: 18 additions & 0 deletions docs/guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Introduction

Welcome to OnChainTestKit documentation.

## What is OnChainTestKit?

OnChainTestKit is an end-to-end testing toolkit for blockchain applications, powered by Playwright. It provides comprehensive testing utilities for Web3 applications with native wallet support.

## Features

- 🔗 **Blockchain Testing**: Complete E2E testing for blockchain applications
- 🎭 **Playwright Integration**: Built on Playwright for reliable automation
- 🔐 **Multiple Wallets**: Support for MetaMask, Coinbase Wallet, and Phantom
- 🚀 **Easy Setup**: Simple configuration and setup process

## Getting Started

Check out the [Installation Guide](/installation) to get started with OnChainTestKit.
23 changes: 23 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
layout: home

hero:
name: "OnChainTestKit"
text: "End-to-end testing toolkit for blockchain applications"
tagline: Powered by Playwright for robust blockchain testing
actions:
- theme: brand
text: Get Started
link: /guide
- theme: alt
text: View on GitHub
link: https://github.com/MunyayLLC/https-github.com-joe10832-onchaintestkit

features:
- title: 🔗 Blockchain Testing
details: Comprehensive E2E testing for blockchain applications with wallet support
- title: 🎭 Playwright Powered
details: Built on top of Playwright for reliable and fast test automation
- title: 🔐 Wallet Support
details: Native support for MetaMask, Coinbase Wallet, and Phantom
---
38 changes: 38 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Installation

## Prerequisites

- Node.js 14.0.0 or higher
- npm, yarn, or pnpm

## Install

Install OnChainTestKit using your preferred package manager:

::: code-group

```bash [npm]
npm install @coinbase/onchaintestkit
```

```bash [yarn]
yarn add @coinbase/onchaintestkit
```

```bash [pnpm]
pnpm add @coinbase/onchaintestkit
```

:::

## Peer Dependencies

Make sure you have Playwright Test installed:

```bash
npm install --save-dev @playwright/test
```

## Next Steps

Continue to the [Guide](/guide) to learn how to use OnChainTestKit.
Loading
Loading