Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add admin declaration feature #94

Merged
merged 9 commits into from
Oct 14, 2015
Merged

Conversation

robyoung
Copy link
Contributor

Add a feature testing supplier declaration editing from within the admin app.

This pull request also includes a few refactoring changes that are described in each of the commits.

Relates to

Depends on

This refactors two step definitions to use less complex XPath
selectors and introduce some new functionality.

When I click the ? link for the supplier ? is functionally the same but
changes large XPath into ruby code. The only addition it makes is to set
the supplier name into the session as it is used later.

I click the ? link for ? has changed to be closer to what the step
definition is saying. Previously is built an HREF and tried to find it.
This was brittle and did not transfer well to other uses. This change
first finds the correct summary section with the summary heading and
then finds the action link that follows it, checks it is correct and
then clicks it.
The contents of the step definition meant that it could only ever be for
the admin search page.
This step definition was parameterized but it could only be called with
with specific parameters. This change makes the step explicit about that
and refactors it contents.

In the changes to it's contents it makes broadly the same checks but
with less complex XPath. It also introduces the idea of different links
being visible to different user types.
This also slightly refactors the login steps and adds explicit failures
if unrecognised user types are used.
Now that we have features in subdirectories, if you want to fun a
feature on it's own you have to provide this additional flag. I've added
it here so that people don't have to remember to add it when they want
to run a single feature file.
Admin users are required for the functional tests but we want them to be
created manually to avoid the risk of creating admin users in production
environments.
@andrewchong
Copy link
Contributor

There is only one edit made in the tests. I think there should be at least two. One at the top and one in the middle as was discussed.

CCS sourcing admin user creation is missing?

Make another supplier declaration change in another section to show that
different sections can be changed.
@andrewchong
Copy link
Contributor

👍

robyoung added a commit that referenced this pull request Oct 14, 2015
@robyoung robyoung merged commit 04af640 into master Oct 14, 2015
@robyoung robyoung deleted the add-admin-declaration-feature branch October 14, 2015 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants