openedx / cypress-e2e-tests

Cypress E2E Tests for Open edX applications
GNU Affero General Public License v3.0
15 stars 25 forks source link

enroll user #2

Closed kashifch closed 5 years ago

kashifch commented 5 years ago

@bill-filler @ziafazal

Here is the enrollment process, I have one question though, there is no link on receipt page to take user to journal, are we planning to add the link?

Also journal does not appear on dashboard when user clicks the dashboard link from receipt button, shouldn't there be a way for user to move to journals after payment?

bill-filler commented 5 years ago

@kashifch re: link the only link on the receipt page currently just takes you to the dashboard. If journals integration is turned on for the LMS (see below), their will be a "My Journals" section as part of the dashboard and the purchased journal will be displayed there..

journalsdash

Currently Journals integration is not enabled for stage.edx.org, but is enabled for stage.mitxpro.mit.edu. We might want to run the tests against stage.mitxpro.mit.edu for now and possible enabled for stage.edx.org in the future. Not sure we want to enable it for edx stage yet as we don't have any edx.org customers of Journals yet.

For future, steps to enable journals in LMS for a site in django_admin:

kashifch commented 5 years ago

Thanks @bill-filler

I have configured the tests to run both on MIT and stage, in cypress we can pass a configure file which contains all vars on run time like "cypress open --env configFile=journals_mit_stage" or "cypress open --env configFile=journals_edx_stage"

I will add all this information in readme

bill-filler commented 5 years ago

@kashifch @ziafazal I figured out the issue with journals not showing up on dashboard. Turns out ecommerce was not configured correctly on stage and prod. There is a setting in ecommerce SiteConfiguration for "Journals Service API URL" which was not set.

See: https://stage-edx-ecommerce-internal.edx.org/admin/core/siteconfiguration/8/change/

Both stage and prod should be configured correctly now for edx and mitxpro.

This was preventing ecommerce from communicating with Journal Service to fufill the order. The user should NOT have had access to the Journal in this case as Journal Service never created an access_record. So perhaps in your test you are using a Staff user? That would explain why the user could still access their Journal even though fulfillment failed. You should be testing with a non-staff user.

kashifch commented 5 years ago

Yes, Zia and myself looked into this and figured out the same issue, my user was also a staff so he could see the journal, for normal users the purchase is not happening.

Thanks for fixing it