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

Fix #4076: Update end exploration (within collection) headers to better illustrate that the user should return to the collection #4130

Merged
merged 10 commits into from
Dec 4, 2017

Conversation

BenHenning
Copy link
Member

@BenHenning BenHenning commented Dec 1, 2017

New behavior:

When ending an exploration within the context of a collection:
end_exp_in_collection

When ending an exploration outside the context of a collection:
end_exp_out_collection

Changes illustrated in text form:

  • Remove 'Go to Library' button
  • Use 'Next Lesson' instead of 'Suggested next' for explorations ended in the context of a collection
  • Added 'Return to Library' link for explorations ended outside a collection
  • Updated cases for headers & links to be more consistent

Note: This also updates the demo collection to be a bit more usable in testing scenarios (and adds 2 new simple explorations specifically for that purpose).

Note2: FYI that #4131 is tracking the incorrect globe placement; that doesn't seem to have been caused by these changes.

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks! Planning to add any e2e tests to prevent regression?

@BenHenning
Copy link
Member Author

BenHenning commented Dec 1, 2017

I'm not opposed, but what did you have in mind? We don't currently have screendiff testing, and since this PR does not include functional changes I'm not sure what meaningful aspect of this change we would test.

@seanlip
Copy link
Member

seanlip commented Dec 1, 2017

I think just checking that the correct text/items appear? Not so much in terms of layout/UI but that, e.g., as a logged out user coming to the end of an exp in a collection, the correct exp summary tile is recommended next and the correct link is shown below it.

@seanlip
Copy link
Member

seanlip commented Dec 1, 2017

Hi @BenHenning -- e2e tests are failing persistently. Not exactly sure what's going on, but I'm going to restart them. If the failure persists, please could you take a look at it? Thanks!

@seanlip
Copy link
Member

seanlip commented Dec 1, 2017

Backend tests are also failing.

@BenHenning
Copy link
Member Author

I fixed the backend test failures, but I have no clue yet why the protractor test is failing.

@BenHenning
Copy link
Member Author

There's apparently some jquery error being printed out on the collection viewer page:

jquery.min.js:3 Error: attribute d: Unexpected end of attribute. Expected number, "… 280, 250 300 S ".

Odd thing is, I didn't change anything related to that page in this PR.

@BenHenning
Copy link
Member Author

This seems to be an existing issue exposed by the changes to the example collection yaml file. This is probably an existing bug in the viewer that somehow wasn't hit before, and it's not yet clear what's actually broken.

@BenHenning
Copy link
Member Author

Note that hand-made collections don't seem to have this error in prod (e.g. https://www.oppia.org/collection/4UgTQUc1tala)

@BenHenning
Copy link
Member Author

This appears to be an error with the path generation in the collection player. Not yet clear why the new collection structure is causing this.

@BenHenning
Copy link
Member Author

Apparently the control points for the Bezier curve aren't being correctly computed when there are 3 nodes:

https://github.com/oppia/oppia/blob/develop/core/templates/dev/head/pages/collection_player/CollectionPlayer.js#L152

sParameterExtension is empty string after that loop since i is starting at 1 and 3/2=1

@BenHenning
Copy link
Member Author

/cc @kevintab95 original code introduced in #2526

@seanlip
Copy link
Member

seanlip commented Dec 2, 2017

Does that happen with manually-created 3-node collections as well? I'm surprised we haven't run into that problem before in practice.

@BenHenning
Copy link
Member Author

Haven't checked, but I'm working around this by adding a 4th test exploration to the demo collection. We can follow up with this issue separately.

@BenHenning
Copy link
Member Author

Yes, this does repro with a manually-created 3-node collection as well.

@BenHenning
Copy link
Member Author

Filed #4141 to track this issue (and #4140 which I found when trying to repro the issue with a manually-created collection).

@BenHenning
Copy link
Member Author

Issues fixed & repushed. Waiting on Travis now.

PTAL since there are a few new things that have been changed.

@codecov-io
Copy link

codecov-io commented Dec 2, 2017

Codecov Report

Merging #4130 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #4130   +/-   ##
========================================
  Coverage    43.88%   43.88%           
========================================
  Files          360      359    -1     
  Lines        22401    22401           
  Branches      3559     3559           
========================================
  Hits          9831     9831           
  Misses       12570    12570
Impacted Files Coverage Δ
...ev/head/pages/exploration_editor/EditorServices.js 39.03% <0%> (-0.89%) ⬇️
...tion_editor/StateEditorTutorialFirstTimeService.js

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e41ccc...eee88bc. Read the comment docs.

@@ -129,60 +129,58 @@ def test_welcome_collection(self):
self.assertEqual(
collection_dict['title'], 'Introduction to Collections in Oppia')

# Verify there are 5 explorations in this collection, the initial
# Verify there are 3 explorations in this collection, the initial
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, I had updated this once and missed it the second time. :( Done.

@@ -33,8 +33,6 @@ describe('Collections', function() {
adminPage.get();
adminPage.reloadCollection();
general.acceptAlert();
browser.waitForAngular();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just removed because it wasn't necessary? (Or was there some other reason?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't necessary; reloading a collection automatically reloads the explorations it refers to (otherwise there would be a load error).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this is necessary for the collection editor test. :) I didn't read through it carefully enough, and since I was testing the player test in isolation I didn't realize removing this lines broke the other test.

@seanlip
Copy link
Member

seanlip commented Dec 2, 2017

Hi @BenHenning -- e2e tests still failing, unfortunately!

@BenHenning
Copy link
Member Author

BenHenning commented Dec 2, 2017

Odd, it passed locally when I tried it yesterday. Will look into this.

@BenHenning
Copy link
Member Author

Fixed--readded the setup line to load all explorations.

@seanlip
Copy link
Member

seanlip commented Dec 3, 2017

Thanks! Still LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants