mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Some tests and a rename.
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
/**
|
||||
* Class BillControllerCest
|
||||
*
|
||||
* @SuppressWarnings("CamelCase")
|
||||
* @SuppressWarnings("short")
|
||||
*/
|
||||
class BillControllerCest
|
||||
{
|
||||
@@ -147,6 +150,9 @@ class BillControllerCest
|
||||
$I->see('Could not store bill');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function storeRecreate(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('validate a bill and create another one');
|
||||
|
@@ -2,6 +2,10 @@
|
||||
|
||||
/**
|
||||
* Class PreferencesControllerCest
|
||||
*
|
||||
* @SuppressWarnings("CamelCase")
|
||||
* @SuppressWarnings("short")
|
||||
*
|
||||
*/
|
||||
class PreferencesControllerCest
|
||||
{
|
||||
|
@@ -2,6 +2,9 @@
|
||||
|
||||
/**
|
||||
* Class ProfileControllerCest
|
||||
*
|
||||
* @SuppressWarnings("CamelCase")
|
||||
* @SuppressWarnings("short")
|
||||
*/
|
||||
class ProfileControllerCest
|
||||
{
|
||||
|
@@ -2,6 +2,9 @@
|
||||
|
||||
/**
|
||||
* Class ReminderControllerCest
|
||||
*
|
||||
* @SuppressWarnings("CamelCase")
|
||||
* @SuppressWarnings("short")
|
||||
*/
|
||||
class ReminderControllerCest
|
||||
{
|
||||
@@ -21,6 +24,9 @@ class ReminderControllerCest
|
||||
$I->amLoggedAs(['email' => 'thegrumpydictator@gmail.com', 'password' => 'james']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function act(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('act on a reminder');
|
||||
@@ -28,6 +34,9 @@ class ReminderControllerCest
|
||||
$I->see('Money for Weekly reminder for clothes');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function dismiss(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('dismiss a reminder');
|
||||
@@ -35,6 +44,9 @@ class ReminderControllerCest
|
||||
$I->see('Reminder dismissed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function notNow(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('ignore a reminder');
|
||||
@@ -42,6 +54,9 @@ class ReminderControllerCest
|
||||
$I->see('Reminder dismissed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function show(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a reminder');
|
||||
@@ -50,6 +65,9 @@ class ReminderControllerCest
|
||||
$I->see('your piggy bank labelled "Weekly reminder for clothes"');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function actOnInvalid(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('act on an invalid reminder');
|
||||
|
@@ -2,7 +2,12 @@
|
||||
|
||||
/**
|
||||
* Class RepeatedExpenseControllerCest
|
||||
*
|
||||
* @SuppressWarnings("CamelCase")
|
||||
* @SuppressWarnings("short")
|
||||
*/
|
||||
|
||||
|
||||
class RepeatedExpenseControllerCest
|
||||
{
|
||||
/**
|
||||
@@ -20,6 +25,9 @@ class RepeatedExpenseControllerCest
|
||||
$I->amLoggedAs(['email' => 'thegrumpydictator@gmail.com', 'password' => 'james']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function create(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('create a recurring transaction');
|
||||
@@ -27,6 +35,9 @@ class RepeatedExpenseControllerCest
|
||||
$I->see('Create new repeated expense');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function delete(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('delete a recurring transaction');
|
||||
@@ -34,6 +45,9 @@ class RepeatedExpenseControllerCest
|
||||
$I->see('Delete "Nieuwe kleding"');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function destroy(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('destroy a recurring transaction');
|
||||
@@ -42,6 +56,9 @@ class RepeatedExpenseControllerCest
|
||||
$I->dontSeeInDatabase('piggy_banks', ['id' => 5]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function edit(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('edit a recurring transaction');
|
||||
@@ -50,6 +67,9 @@ class RepeatedExpenseControllerCest
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function index(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see all recurring transactions');
|
||||
@@ -58,6 +78,9 @@ class RepeatedExpenseControllerCest
|
||||
$I->see('Nieuwe kleding');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function show(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('view a recurring transaction');
|
||||
@@ -65,6 +88,9 @@ class RepeatedExpenseControllerCest
|
||||
$I->see('Nieuwe kleding');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function store(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('store a recurring transaction');
|
||||
@@ -86,6 +112,9 @@ class RepeatedExpenseControllerCest
|
||||
$I->see('Piggy bank "TestRepeatedExpense" stored.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function update(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('update a recurring transaction');
|
||||
@@ -107,6 +136,9 @@ class RepeatedExpenseControllerCest
|
||||
$I->see('Repeated expense "Nieuwe kleding!" updated.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function updateAndReturnToEdit(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('update a recurring transaction and return to edit screen');
|
||||
@@ -128,6 +160,9 @@ class RepeatedExpenseControllerCest
|
||||
$I->see('Repeated expense "Nieuwe kleding!" updated.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function updateFail(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('try to update a recurring transaction and fail');
|
||||
|
79
tests/functional/ReportControllerCest.php
Normal file
79
tests/functional/ReportControllerCest.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class ReportControllerCest
|
||||
*
|
||||
* @SuppressWarnings("CamelCase")
|
||||
* @SuppressWarnings("short")
|
||||
*
|
||||
*/
|
||||
class ReportControllerCest
|
||||
{
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function _after(FunctionalTester $I)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function _before(FunctionalTester $I)
|
||||
{
|
||||
$I->amLoggedAs(['email' => 'thegrumpydictator@gmail.com', 'password' => 'james']);
|
||||
}
|
||||
|
||||
public function budget(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a budget report');
|
||||
$I->amOnPage('/reports/budget/2014/9');
|
||||
$I->see('Budget report for September 2014');
|
||||
}
|
||||
|
||||
public function budgetInvalidDate(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a budget report for an invalid date');
|
||||
$I->amOnPage('/reports/budget/XXXX/XX');
|
||||
$I->see('Invalid date');
|
||||
}
|
||||
|
||||
public function index(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see all possible reports');
|
||||
$I->amOnPage('/reports');
|
||||
$I->see('Reports');
|
||||
$I->see('Monthly reports');
|
||||
$I->see('Budget reports');
|
||||
}
|
||||
|
||||
public function month(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a monthly report');
|
||||
$I->amOnPage('/reports/2014/9');
|
||||
$I->see('Report for September 2014');
|
||||
}
|
||||
|
||||
public function monthInvalidDate(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a monthly report for an invalid month');
|
||||
$I->amOnPage('/reports/XXXX/XX');
|
||||
$I->see('Invalid date');
|
||||
}
|
||||
|
||||
public function year(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a yearly report');
|
||||
$I->amOnPage('/reports/2014');
|
||||
$I->see('Income vs. expenses');
|
||||
$I->see('Account balance');
|
||||
}
|
||||
|
||||
public function yearInvalidDate(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a yearly report for an invalid year');
|
||||
$I->amOnPage('/reports/XXXX');
|
||||
$I->see('Invalid date');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user