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 a test for the login flow when there is a teamserver #4315

Merged
merged 2 commits into from Jun 15, 2017

Conversation

@richvdh
Copy link
Member

richvdh commented Jun 15, 2017

  • just to check it keeps working.

Requires matrix-org/matrix-react-sdk#1098

- just to check it keeps working.
@@ -343,6 +346,40 @@ describe('loading:', function () {
}).done(done, done);
});

it("registers correctly with a Riot Team Server", function() {

This comment has been minimized.

Copy link
@lukebarnard1

lukebarnard1 Jun 15, 2017

Contributor

This should really be "logs in to the Riot Team Server". I would be awesome to test the slightly more important flow of a user registering with a team email address and being tracked as a referral! (this is already done as unit test but the entire flow isn't yet tested)

@@ -343,6 +346,40 @@ describe('loading:', function () {
}).done(done, done);
});

it("registers correctly with a Riot Team Server", function() {
sdk.setFetch(httpBackend.fetchFn); // XXX: ought to restore this!

This comment has been minimized.

Copy link
@lukebarnard1

lukebarnard1 Jun 15, 2017

Contributor

Also, I haven't convinced myself how this is getting used but I shall look when I get in this morning!

This comment has been minimized.

Copy link
@lukebarnard1

lukebarnard1 Jun 15, 2017

Contributor

So I'm pretty convinced that sdk should be RtsClient

This comment has been minimized.

Copy link
@richvdh

richvdh Jun 15, 2017

Author Member

no... it goes through here.

(it turns out that if I import RtsClient directly, then I get a different RtsClient to that being used by the react-sdk, which means that replacing its fetchFn doesn't work. I think that's due to webpack/webpack#2740. In the end I decided it probably makes sense to replace the fetchfn for the whole of the sdk anyway.)

This comment has been minimized.

Copy link
@lukebarnard1

lukebarnard1 Jun 15, 2017

Contributor

Ah, in which case I'd suggest renaming the one exported in the sdk to be setRtsFetchFn. and it doesn't look like you're replacing fetchfn for the whole of the sdk ...

This comment has been minimized.

Copy link
@richvdh

richvdh Jun 15, 2017

Author Member

well, I'm not, but it's only used in RtsClient and autocomplete/DuckDuckGoProvider.js for now. The thinking is that we can add more things to sdk.setFetch if and when it is useful.

This comment has been minimized.

Copy link
@lukebarnard1

lukebarnard1 Jun 15, 2017

Contributor

ah ok, np

@lukebarnard1 lukebarnard1 assigned richvdh and unassigned lukebarnard1 Jun 15, 2017
logs in, not registers
@richvdh richvdh merged commit a7a7ffd into develop Jun 15, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@richvdh richvdh deleted the rav/test_rts_login branch Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.