-
Notifications
You must be signed in to change notification settings - Fork 2
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
Functional/Integration tests #63
Conversation
fd9d987
to
0f8930a
Compare
var that = this; | ||
|
||
this.get(function () { | ||
that.fillForm(testUsername, testPassword, callback); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason not to have this just call this.signinWith(testUsername, testPassword, callback)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unnecessary as siginWith
is only calling fillForm
anyway? This skips having to call another method which just calls the fillForm
method anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I wonder if actually it'd be nicer as one function with default values for username and password? That way, the intent is much clearer and you're not spreading “sign in” functionality across two functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then you would end up with having to call the method with null values if you wanted to use the default creds: signin(null, null, callback)
.
Unless you flip the callback param to the front but that breaks the pattern being used elsewhere and by cucumber.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, god, yeah, of course it does. Roll on ES6, I guess? Leave it as-is, I suppose!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, would be much nicer with ES6. Was actually considering using coffee for some of this as it is a bit nicer for writing tests.
But assumed it might be better to not add too many more layers at this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, let's leave it as-is; less layers == better.
This is really good, @teneightfive! 🙌 Is it worth adding a test for something like:
|
@SteveMarshall sounds like it would be the same as the Maybe a case of just re-wording that if you're not happy with that wording? |
I think it's a different scenario, actually, or maybe in the tests for the dashboard (and other pages). Something like:
… or maybe |
Yeah, that could be a different scenario in that case. We need a separate story for writing out all the current scenarios too. |
retest this please |
f5ba440
to
b149b99
Compare
@SteveMarshall just had a thought about this...shall we get this working with Jenkins before we merge? |
@teneightfive I think the way to get it “working with Jenkins” is going to be to get it working with a pure docker-compose setup, then have a |
b149b99
to
305d44c
Compare
Scenario: Successful sign out | ||
Given I am signed in | ||
When I sign out | ||
Then I should see "Digital cashbook" as the page title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cashbook was capitalised since
@teneightfive @maxf One of you wanna fix the remaining bits on here? |
@SteveMarshall fixed some remaining bits. Note that one test currently fails because of #104729954 |
"money-to-prisoners-common": "ministryofjustice/money-to-prisoners-common#0.3.0" | ||
>>>>>>> origin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure you wanted to commit this, @maxf?
b90139b
to
46e6164
Compare
retest this please |
LGTM; rebase and merge? |
Setup using cucumberjs to run gherkin style feature tests
Don't install browser-sync and other dependent packages on non-local environments, as those packages are only useful on developer machines [updates #104986742]
cb7cfe9
to
e67e493
Compare
👍 |
User Story #103485730
As a developer,
I want the cashbook to be able to run integration/functional tests,
So that I know I haven't broken anything with my changes