Skip to content

Commit

Permalink
- Creating feature test for dashboard, education, monitoring, and ach…
Browse files Browse the repository at this point in the history
…ievement page
  • Loading branch information
ianriizky committed Jan 31, 2022
1 parent 557cfae commit 907d711
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/Feature/AchievementTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

use App\Models\User;
use function Pest\Laravel\actingAs;

beforeEach(function () {
$this->user = User::factory()->forBranch()->create();
});

it('has achievement index page', function () {
actingAs($this->user)->get(route('achievement.index'))->assertOk();
});

it('has achievement dashboard-pencapaian page', function () {
actingAs($this->user)->get(route('achievement.dashboard-pencapaian'))->assertOk();
});

it('has achievement dashboard-growth-new-cin page', function () {
actingAs($this->user)->get(route('achievement.dashboard-growth-new-cin'))->assertOk();
});

it('has achievement dashboard-penutupan-cin page', function () {
actingAs($this->user)->get(route('achievement.dashboard-penutupan-cin'))->assertOk();
});
12 changes: 12 additions & 0 deletions tests/Feature/DashboardTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

use App\Models\User;
use function Pest\Laravel\actingAs;

beforeEach(function () {
$this->user = User::factory()->forBranch()->create();
});

it('has dashboard page', function () {
actingAs($this->user)->get(route('dashboard'))->assertOk();
});
46 changes: 46 additions & 0 deletions tests/Feature/EducationTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

use App\Models\User;
use function Pest\Laravel\actingAs;

beforeEach(function () {
$this->user = User::factory()->forBranch()->create();
});

it('has education index page', function () {
actingAs($this->user)->get(route('education.index'))->assertOk();
});

#region webinar-literasi-keuangan
it('has education webinar-literasi-keuangan index page', function () {
actingAs($this->user)->get(route('education.webinar-literasi-keuangan.index'))->assertOk();
});

it('has education webinar-literasi-keuangan template-surat-penawaran-webinar page', function () {
actingAs($this->user)->get(route('education.webinar-literasi-keuangan.template-surat-penawaran-webinar'))->assertOk();
});

it('has education webinar-literasi-keuangan template-presentasi-webinar-literasi-keuangan page', function () {
actingAs($this->user)->get(route('education.webinar-literasi-keuangan.template-presentasi-webinar-literasi-keuangan'))->assertOk();
});

it('has education webinar-literasi-keuangan template-rundown-webinar-literasi-keuangan page', function () {
actingAs($this->user)->get(route('education.webinar-literasi-keuangan.template-rundown-webinar-literasi-keuangan'))->assertOk();
});

it('has education webinar-literasi-keuangan pemetaan-sekolah-kampus-potensi-webinar page', function () {
actingAs($this->user)->get(route('education.webinar-literasi-keuangan.pemetaan-sekolah-kampus-potensi-webinar'))->assertOk();
});

it('has education webinar-literasi-keuangan input-rencana-penyelenggaraan-webinar page', function () {
actingAs($this->user)->get(route('education.webinar-literasi-keuangan.input-rencana-penyelenggaraan-webinar'))->assertOk();
});
#endregion webinar-literasi-keuangan

it('has education pembukaan-rekening-online page', function () {
actingAs($this->user)->get(route('education.pembukaan-rekening-online'))->assertOk();
});

it('has education employee-get-cin page', function () {
actingAs($this->user)->get(route('education.employee-get-cin'))->assertOk();
});
16 changes: 16 additions & 0 deletions tests/Feature/MonitoringTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

use App\Models\User;
use function Pest\Laravel\actingAs;

beforeEach(function () {
$this->user = User::factory()->forBranch()->create();
});

it('has monitoring index page', function () {
actingAs($this->user)->get(route('monitoring.index'))->assertOk();
});

it('has monitoring create page', function () {
actingAs($this->user)->get(route('monitoring.create'))->assertOk();
});

0 comments on commit 907d711

Please sign in to comment.