<?php

it('artworks scout index settings include maturity filter fields used by search filters', function () {
    $indexName = (string) config('scout.prefix', '') . 'artworks';
    $settings = config('scout.meilisearch.index-settings', []);

    expect($settings)->toBeArray();
    expect($settings)->toHaveKey($indexName);

    $filterableAttributes = $settings[$indexName]['filterableAttributes'] ?? [];

    expect($filterableAttributes)->toContain('is_mature');
    expect($filterableAttributes)->toContain('is_mature_effective');
    expect($filterableAttributes)->toContain('maturity_level');
    expect($filterableAttributes)->toContain('maturity_status');
    expect($filterableAttributes)->toContain('published_as_type');
    expect($filterableAttributes)->toContain('categories');
    expect($filterableAttributes)->toContain('content_types');
});