This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add cashier role in roles * change capabilities in navigation bar * add unit test for cashier role and finalize the role
- Loading branch information
Showing
9 changed files
with
74 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,3 +133,29 @@ test('add deposit', function(assert) { | |
}); | ||
}); | ||
}); | ||
|
||
test('cashier role', function(assert) { | ||
runWithPouchDump('billing', function() { | ||
authenticateUser({ | ||
name: '[email protected]', | ||
roles: ['Cashier', 'user'], | ||
role: 'Cashier', | ||
prefix: 'p1' | ||
}); | ||
visit('/invoices'); | ||
andThen(function() { | ||
assert.equal(currentURL(), '/invoices'); | ||
assert.equal(find('.primary-section-link').length, 2, 'Should have 2 navigations'); | ||
assert.equal(find('.primary-section-link:contains(Scheduling)').length, 1, 'should see Scheduling navigation'); | ||
assert.equal(find('.primary-section-link:contains(Billing)').length, 1, 'should see Billing navigation'); | ||
|
||
assert.equal(find('li:contains(Billed)').length, 1, 'should see Billed selection'); | ||
assert.equal(find('li:contains(Drafts)').length, 1, 'should see Drafts selection'); | ||
assert.equal(find('li:contains(All Invoices)').length, 1, 'should see All Invoices selection'); | ||
}); | ||
click('a:contains(Billing)'); | ||
andThen(function() { | ||
assert.equal(find('.category-sub-item').length, 3, 'Should have 3 sub navigations'); | ||
}); | ||
}); | ||
}); |