PHPackages                             codicastudio/tests-admin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. codicastudio/tests-admin

ActiveLibrary

codicastudio/tests-admin
========================

A random Codica Studio package.

1.0.0(5y ago)04MITPHP

Since Sep 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/codicastudio/tests-admin)[ Packagist](https://packagist.org/packages/codicastudio/tests-admin)[ Docs](https://github.com/codicastudio/tests-admin)[ RSS](/packages/codicastudio-tests-admin/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Nova Assertions
===============

[](#nova-assertions)

Nova requests &amp; assertions for Laravel tests - [View examples](https://github.com/dillingham/nova-assertions/tree/master/examples)

[![testing tdd laravel nova](https://user-images.githubusercontent.com/29180903/63385407-e3f7d680-c36e-11e9-96f8-6ebbe48bd62b.png)](https://user-images.githubusercontent.com/29180903/63385407-e3f7d680-c36e-11e9-96f8-6ebbe48bd62b.png)

Assert: [Policies](https://github.com/dillingham/nova-assertions#assert-policies) | [Cards](https://github.com/dillingham/nova-assertions#assert-cards) | [Actions](https://github.com/dillingham/nova-assertions#assert-actions) | [Filters](https://github.com/dillingham/nova-assertions#assert-filters) | [Lenses](https://github.com/dillingham/nova-assertions#assert-lenses) | [Resources](https://github.com/dillingham/nova-assertions#assert-resources) | [Fields](https://github.com/dillingham/nova-assertions#assert-fields) | [Relations](https://github.com/dillingham/nova-assertions#assert-relations)

---

### Installation

[](#installation)

```
composer require dillingham/nova-assertions --dev

```

Enable by adding the `NovaAssertions` to a test

```
use NovaTesting\NovaAssertions;

class UserTest extends TestCase
{
    use NovaAssertions;
}
```

---

### Authentication

[](#authentication)

Log in a user that **[has access to Nova](https://nova.laravel.com/docs/2.0/installation.html#authorizing-nova)**

```
$this->be(factory(User::class)->create());
```

### Nova Requests

[](#nova-requests)

Request using a resource's uriKey to perform assertions:

```
$response = $this->novaIndex('users');

$response = $this->novaDetail('users', $user->id);

$response = $this->novaCreate('users');

$response = $this->novaEdit('users', $user->id);

$response = $this->novaLens('users', Lens::class);
```

### Request Filters

[](#request-filters)

You may also pass filters &amp; their values to indexes &amp; lenses

```
$response = $this->novaIndex('users', [
    StatusFilter::class => 'active'
]);
```

```
$response = $this->novaLens('users', Lens::class, [
    StatusFilter::class => 'active'
]);
```

### Assert Http

[](#assert-http)

You can call **[http response methods](https://laravel.com/docs/5.8/http-tests#available-assertions)** as usual:

```
$response->assertOk();
```

### Assert Resources

[](#assert-resources)

```
$response->assertResourceCount(3);
```

```
$response->assertResources(function($resources) {
    return $resources->count() > 0;
});
```

### Assert Cards

[](#assert-cards)

```
$response->assertCardCount(5);
```

```
$response->assertCardsInclude(Card::class);
```

```
$response->assertCardsExclude(Card::class);
```

```
$response->assertCards(function($cards) {
    return $cards->count() > 0;
});
```

### Assert Actions

[](#assert-actions)

```
$response->assertActionCount(5);
```

```
$response->assertActionsInclude(Action::class);
```

```
$response->assertActionsExclude(Action::class);
```

```
$response->assertActions(function($actions) {
    return $actions->count() > 0;
});
```

### Assert Filters

[](#assert-filters)

```
$response->assertFilterCount(5);
```

```
$response->assertFiltersInclude(Filter::class);
```

```
$response->assertFiltersExclude(Filter::class);
```

```
$response->assertFilters(function($filters) {
    return $filters->count() > 0;
});
```

### Assert Lenses

[](#assert-lenses)

```
$response->assertLensCount(5);
```

```
$response->assertLensesInclude(Lens::class);
```

```
$response->assertLensesExclude(Lens::class);
```

```
$response->assertLenses(function($lenses) {
    return $lenses->count() > 0;
});
```

### Assert Fields

[](#assert-fields)

```
$response->assertFieldCount(5);
```

Assert a specific field exists

```
$response->assertFieldsInclude('id');
```

Assert a specific field contains a value

```
$response->assertFieldsInclude('id', $user->id);
```

Assert multiple fields exist

```
$response->assertFieldsInclude(['id', 'email']);
```

Assert multiple fields with specific values exist

```
$response->assertFieldsInclude(['id' => 1, 'email' => 'example']);
```

Assert multiple values for one field exist

```
$response->assertFieldsInclude('id', $users->pluck('id'));
```

Make assertions against a collection of fields

```
$response->assertFields(function($fields) {
    return $fields->count() > 0;
});
```

Also `exclude` works in all of these scenarios

```
$response->assertFieldsExclude(['id' => 1, 'email' => 'example']);
```

### Assert Relations

[](#assert-relations)

```
// App\Nova\Post
// BelongsTo::make('Category'),
```

```
$response = $this->novaCreate('posts');

$response->assertRelation('categories', function($categories) {
    //
});
```

```
// App\Nova\Category
// HasMany::make('Posts'),
```

```
$response = $this->novaDetail('categories');

$response->assertRelation('posts', function($posts) {
    //
});
```

### Assert Policies

[](#assert-policies)

Assert **[Nova's use of policies](https://nova.laravel.com/docs/2.0/resources/authorization.html#authorization)** &amp; the authed user:

```
$response->assertCanView();

$response->assertCanCreate();

$response->assertCanUpdate();

$response->assertCanDelete();

$response->assertCanForceDelete();

$response->assertCanRestore();
```

Also can assert `cannot` for each:

```
$response->assertCannotView();
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2061d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a33b354bea681b74be49f37bbe9f3c4f145dbefe0f2b5cbb705b0731bf13fd3?d=identicon)[codicastudio](/maintainers/codicastudio)

### Embed Badge

![Health badge](/badges/codicastudio-tests-admin/health.svg)

```
[![Health](https://phpackages.com/badges/codicastudio-tests-admin/health.svg)](https://phpackages.com/packages/codicastudio-tests-admin)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
