# Promote Handover Test

> |

- **Type:** Skill
- **Install:** `agentstack add skill-agentmantis-test-skills-promote-handover-test`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [agentmantis](https://agentstack.voostack.com/s/agentmantis)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [agentmantis](https://github.com/agentmantis)
- **Source:** https://github.com/agentmantis/test-skills/tree/main/skills/promote-handover-test

## Install

```sh
agentstack add skill-agentmantis-test-skills-promote-handover-test
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Promote Handover Test

Move a completed handover test from `tests/handover/` to `tests/regression/` or `tests/smoke/`.

---

## Workflow

1. **Locate the handover test** — search `e2e/tests/handover/` for the ticket key or file path
2. **Determine the target suite** — regression (default) or smoke (if user specifies)
3. **Check for an existing spec** in the target directory for the same feature
   - If one exists, merge the tests into the existing `test.describe` block
   - If not, create a new spec file
4. **Apply the promotion changes** (see checklist below)
5. **Delete the original handover spec** from `tests/handover/`
6. **Run the test** in its new location:
   ```bash
   npx playwright test --project="chromium:regression" {feature}.spec.ts
   ```

---

## Promotion Checklist

### 1. Rename the File

Remove the ticket key prefix:

```
BEFORE: e2e/tests/handover/PROJ-456-bulk-export.spec.ts
AFTER:  e2e/tests/regression/bulk-export.spec.ts
```

If the feature already has a regression spec (e.g., `vault.spec.ts`), merge the tests into that file instead of creating a new one.

### 2. Update `test.describe`

Remove the ticket key from the describe block:

```typescript
// BEFORE
test.describe('PROJ-456: Bulk Export', () => {

// AFTER
test.describe('Bulk Export', () => {
```

If merging into an existing spec, add the tests inside the existing `test.describe` block (or create a nested `test.describe` if the feature area is distinct).

### 3. Verify POM JSDoc

Ensure all POM methods added for this ticket have complete JSDoc:
- Summary line
- Steps block (numbered)
- @param tags for all parameters

### 4. Run Tests

Verify the tests pass in their new location:

```bash
# For regression
npx playwright test --project="chromium:regression" {feature}.spec.ts

# For smoke
npx playwright test --project="chromium:smoke" {feature}.spec.ts

# Across all browsers
npx playwright test --project="*:regression" {feature}.spec.ts
```

### 5. Delete the Original

Remove the handover spec from `tests/handover/` after confirming the promoted version passes.

---

## Decision: Promote, Merge, or Delete?

| Scenario | Action |
| -------- | ------ |
| Feature is permanent, no existing regression spec | Promote to `tests/regression/{feature}.spec.ts` |
| Feature is permanent, regression spec already exists | Merge tests into the existing regression spec |
| Feature is on the critical path | Promote to `tests/smoke/{feature}.spec.ts` |
| Feature is fully covered by existing tests | Delete the handover spec |
| Feature was reverted | Delete the handover spec |

---

## Example: Full Promotion

### Before (handover)

File: `e2e/tests/handover/MANT-123-vault-bulk-delete.spec.ts`

```typescript
import { test } from '../../fixtures/base';
import { getAuthFilePath } from '../../helpers/env-config';
import { VaultPage } from '../../poms/vault.page';

const authFile = getAuthFilePath();

test.describe('MANT-123: Vault Bulk Delete', () => {
    test.beforeAll(async ({ browser }) => {
        const context = await browser.newContext({
            storageState: authFile,
        });
        const page = await context.newPage();
        const vault = new VaultPage(page);
        await vault.setUp();
        await page.close();
        await context.close();
    });

    test('should select and delete multiple items', async ({ page, testData }) => {
        // ...
    });
});
```

### After (regression)

File: `e2e/tests/regression/vault.spec.ts` (merged into existing spec, or new file)

```typescript
import { test } from '../../fixtures/base';
import { getAuthFilePath } from '../../helpers/env-config';
import { VaultPage } from '../../poms/vault.page';

const authFile = getAuthFilePath();

test.describe('Vault Tests', () => {
    test.beforeAll(async ({ browser }) => {
        const context = await browser.newContext({
            storageState: authFile,
        });
        const page = await context.newPage();
        const vault = new VaultPage(page);
        await vault.setUp();
        await page.close();
        await context.close();
    });

    // ... existing tests ...

    test('should select and delete multiple items', async ({ page, testData }) => {
        // ... (promoted from MANT-123)
    });
});
```

Original file `e2e/tests/handover/MANT-123-vault-bulk-delete.spec.ts` is deleted.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [agentmantis](https://github.com/agentmantis)
- **Source:** [agentmantis/test-skills](https://github.com/agentmantis/test-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-agentmantis-test-skills-promote-handover-test
- Seller: https://agentstack.voostack.com/s/agentmantis
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
