Skip to content

Commit

Permalink
Merge pull request #7 from UKHomeOffice/feature/people-directory
Browse files Browse the repository at this point in the history
Add "Named people and licence holders" page
  • Loading branch information
joefitter authored May 24, 2018
2 parents 24eac44 + e3bf765 commit 9454824
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 50 deletions.
8 changes: 7 additions & 1 deletion lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const {
establishment,
details,
places,
people,
profile
} = require('@asl/service/pages');

Expand All @@ -26,7 +27,7 @@ module.exports = settings => {
profile(),
crumbs([
{ href: '/establishment/{{establishment.id}}', label: '{{establishment.name}}' },
{ href: '/establishment/{{establishment.id}}/profiles', label: 'Profiles' },
{ href: '/establishment/{{establishment.id}}/people', label: 'Named people and licence holders' },
'{{profile.name}}'
])
);
Expand All @@ -36,6 +37,11 @@ module.exports = settings => {
crumbs([{ href: '/establishment/{{establishment.id}}', label: '{{establishment.name}}' }, 'Licenced Premises'])
);

app.use('/establishment/:id/people',
people(),
crumbs([{ href: '/establishment/{{establishment.id}}', label: '{{establishment.name}}' }, 'Named people and licence holders'])
);

app.use('/establishment/:id/details',
details(),
crumbs([{ href: '/establishment/{{establishment.id}}', label: '{{establishment.name}}' }, 'Establishment Details'])
Expand Down
77 changes: 29 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/UKHomeOffice/asl-inspector-ui#readme",
"dependencies": {
"@asl/service": "^2.1.1"
"@asl/service": "^2.4.1"
},
"devDependencies": {
"@ukhomeoffice/asl-functional-testing": "^1.1.0",
Expand Down
8 changes: 8 additions & 0 deletions tests/functional/specs/smoke-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ describe('Smoke tests', () => {
assert.equal(title, 'Licensed premises');
});

it('can access named people page', () => {
browser.withUser('inspector');
browser.click('a[href*="/establishment/8201"]');
browser.click('a[href*="/people"]');
const title = browser.getText('h1');
assert.equal(title, 'Named people and licence holders');
});

it('can access establishment details page', () => {
browser.withUser('inspector');
browser.click('a[href*="/establishment/8201"]');
Expand Down

0 comments on commit 9454824

Please sign in to comment.