KingStalker
KingStalker
FFilament
Created by WEBMAS on 7/6/2024 in #❓┊help
How to manage only your records (user_id)?
30 replies
FFilament
Created by KingStalker on 6/18/2024 in #❓┊help
Help with table action test
@Leandro Ferreira thank you
12 replies
FFilament
Created by KingStalker on 6/18/2024 in #❓┊help
Help with table action test
thanks il give it a shot
12 replies
FFilament
Created by KingStalker on 6/18/2024 in #❓┊help
Help with table action test
i think this is fine enough do you agree?
public function test_table_actions()
{
Livewire::test(ListUsers::class)
->assertTableActionExists('view');

Livewire::test(ListUsers::class)
->assertTableActionExists('edit');

Livewire::test(ListUsers::class)
->assertTableActionExists('delete')
->callTableAction(DeleteAction::class, $this->user)
->assertHasNoTableActionErrors();

$this->assertSoftDeleted('users', ['id' => $this->user->id]);

Livewire::test(ListUsers::class)
->assertTableActionExists('restore');

}
public function test_table_actions()
{
Livewire::test(ListUsers::class)
->assertTableActionExists('view');

Livewire::test(ListUsers::class)
->assertTableActionExists('edit');

Livewire::test(ListUsers::class)
->assertTableActionExists('delete')
->callTableAction(DeleteAction::class, $this->user)
->assertHasNoTableActionErrors();

$this->assertSoftDeleted('users', ['id' => $this->user->id]);

Livewire::test(ListUsers::class)
->assertTableActionExists('restore');

}
12 replies
FFilament
Created by KingStalker on 6/18/2024 in #❓┊help
Help with table action test
no just that it appears with corect url its a EditAction \ ViewAction
12 replies
FFilament
Created by KingStalker on 6/18/2024 in #❓┊help
Help with table action test
@Leandro Ferreira for now im using this so it can just pass
public function test_table_actions()
{
Livewire::test(ListUsers::class)
->assertTableActionExists('view');

Livewire::test(ListUsers::class)
->assertTableActionExists('edit');

Livewire::test(ListUsers::class)
->assertTableActionExists('delete')
->callTableAction(DeleteAction::class, $this->user)
->assertHasNoTableActionErrors();

$this->assertSoftDeleted('users', ['id' => $this->user->id]);

Livewire::test(ListUsers::class)
->assertTableActionExists('restore');

}
public function test_table_actions()
{
Livewire::test(ListUsers::class)
->assertTableActionExists('view');

Livewire::test(ListUsers::class)
->assertTableActionExists('edit');

Livewire::test(ListUsers::class)
->assertTableActionExists('delete')
->callTableAction(DeleteAction::class, $this->user)
->assertHasNoTableActionErrors();

$this->assertSoftDeleted('users', ['id' => $this->user->id]);

Livewire::test(ListUsers::class)
->assertTableActionExists('restore');

}
12 replies
FFilament
Created by KingStalker on 6/18/2024 in #❓┊help
Help with table action test
@Leandro Ferreira yes
12 replies
FFilament
Created by KingStalker on 6/18/2024 in #❓┊help
Help with table action test
any one can help?
12 replies
FFilament
Created by KingStalker on 6/16/2024 in #❓┊help
Github Action Test Failing with brand logo on
Tests: 32 passed (176 assertions) Duration: 12.02s you are a lifesaver thank you
5 replies
FFilament
Created by KingStalker on 6/16/2024 in #❓┊help
Github Action Test Failing with brand logo on
.env.testing ```env APP_NAME="myapp" APP_ENV=testing APP_KEY=base64:iSgW1vFSRF9ieXJpLps9+IvET2U8vcG7iw0NLE2yRvM= APP_DEBUG=true APP_URL=http://localhost DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=test DB_USERNAME=root DB_PASSWORD=
5 replies
FFilament
Created by KingStalker on 6/16/2024 in #❓┊help
Github Action Test Failing with brand logo on
name: Testing
on: [push, pull_request]
jobs:
tests:
name: Test Application
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_ROOT_PASSWORD:
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mbstring, dom, fileinfo, pdo, mysql
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install -n --prefer-dist
- name: Prepare the application
run: |
php -r "file_exists('.env') || copy('.env.testing', '.env');"
- name: clear config
run: php artisan config:clear
- name: clear views
run: php artisan view:clear
- name: Run Migration
run: php artisan migrate -v
- name: Test with phpunit
run: php artisan test
name: Testing
on: [push, pull_request]
jobs:
tests:
name: Test Application
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_ROOT_PASSWORD:
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mbstring, dom, fileinfo, pdo, mysql
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install -n --prefer-dist
- name: Prepare the application
run: |
php -r "file_exists('.env') || copy('.env.testing', '.env');"
- name: clear config
run: php artisan config:clear
- name: clear views
run: php artisan view:clear
- name: Run Migration
run: php artisan migrate -v
- name: Test with phpunit
run: php artisan test
5 replies