Skip to content

Prefer test units in UI tests#66876

Merged
davidsbailey merged 23 commits into
stagingfrom
prefer-test-units-in-ui-tests
Jan 7, 2026
Merged

Prefer test units in UI tests#66876
davidsbailey merged 23 commits into
stagingfrom
prefer-test-units-in-ui-tests

Conversation

@davidsbailey

@davidsbailey davidsbailey commented Jul 2, 2025

Copy link
Copy Markdown
Member

This PR updates several UI tests to use levels in the allthethings course rather than levels used by our end users, with the end goal of eliminating our dependency on user-facing curriculum in UI tests.

The following levels were added to the end of the specified lessons in the allthethings unit:

lesson levels position
Artist Standalone_Artist_9 10
Bounce bounce_12 2
Flappy flappy_11 2
Minecraft MC_HOC_2017_FP20x20 4
Minecraft Overworld Free Play 20x20 5
Minecraft MC HOC 2016 Level 10 6

Then individual UI tests were updated to refer to the newly added levels.

Testing story

Since this change affects only test code and curriculum, I am relying on the passing drone run on existing tests for test coverage.

@davidsbailey davidsbailey force-pushed the version-redirect-modular-ui-tests branch from e7cff57 to 75f187b Compare August 4, 2025 16:02
@davidsbailey davidsbailey force-pushed the prefer-test-units-in-ui-tests branch from 0f00c3e to 1e7694d Compare August 4, 2025 16:32
Base automatically changed from version-redirect-modular-ui-tests to staging August 6, 2025 04:48
@davidsbailey davidsbailey force-pushed the prefer-test-units-in-ui-tests branch 2 times, most recently from 29c3b73 to 903e7b5 Compare August 6, 2025 23:23
@davidsbailey davidsbailey force-pushed the prefer-test-units-in-ui-tests branch from 11562c0 to 44bdced Compare January 5, 2026 19:22
@davidsbailey davidsbailey marked this pull request as ready for review January 5, 2026 20:40
@davidsbailey

Copy link
Copy Markdown
Member Author

CC @bethanyaconnor since this touches course2 which you were working on deprecating

Comment on lines -19 to -20
| http://studio.code.org/courses/20-hour/units/1/lessons/2/levels/1?noautoplay=true | first maze level |
| http://studio.code.org/courses/course2/units/1/lessons/7/levels/2?noautoplay=true | artist level |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure how these were still working 😬 thanks for updating!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ooo the whole test is skipped (PR)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ahh ok, that explains it. I see just one other reference to course1-4, which is also skipped:

And I am on "http://studio.code.org/courses/course3/units/1/lessons/21/levels/15?noautoplay=true"

It seems like it should be safe to stop seeding course1 thru course4 in test entirely, then. can you remind me what other courses I should maybe be checking for? it seems like 20-hour still has some references in other UI tests, and I don't recall what other courses got deprecated if any.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's just courses 1-4 and 20-hour. One of my next cleanups was to remove them from seeding, though when I tried to do that before I even deprecated the courses, Drone still passed, so I'm not sure how to gain confidence...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I can help you with that! It has to do with the fact that .drone.yml is configured to generate a cached build (including seeded content) from the most recent staging branch, and then use that as the basis for each drone run. I'm glad you mentioned it because I should really be running it against this PR. So that I don't have to jump through hoops twice, I can just take care of removing course1-4 from the seed steps in this PR.

I'm confused about 20-hour though. are you just still in the process of removing that course from our UI tests?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

20-hour should be deprecated, but I mostly looked at what failed when I removed it and I'm realizing tests like dashboard/test/ui/features/student_learning/hour_of_code/hour_of_code.feature actually just check that the progress in the header is there, which is still is even with the deprecation screen 🙃
Screenshot 2026-01-05 165256

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I see. IIRC you replaced 20-hour with Unit.hoc_2014_unit as the default unit in a bunch of places, possibly including the progress view. if we want to restore the usefulness of those tests, the current references could be updated to point to the new default unit instead. however, I'm ostensibly going to go through and try to eliminate all references to user-facing units, so I think it's probably best to just punt on that for now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

the seeding-without-cache check is complete, ready for another look.

@davidsbailey davidsbailey requested a review from a team as a code owner January 5, 2026 21:50
@davidsbailey

Copy link
Copy Markdown
Member Author

Looks like artist is still needed here:


Screenshot 2026-01-05 at 3 57 12 PM

I could change the test to point to a different unit, but since the only visible units are user-facing, that won't help me in the long run, so I'm just going to keep seeding artist for now.

@davidsbailey davidsbailey removed the request for review from a team January 6, 2026 15:53
@davidsbailey

Copy link
Copy Markdown
Member Author

^ just noting that I went ahead and made the updates to allthethings via levelbuilder, to reduce risk of merge conflicts on allthethings while this PR is in review.

@alex-m-brown alex-m-brown left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks like some great steps towards cleaning this up!

@bethanyaconnor bethanyaconnor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎉 thanks for doing this cleanup!

@davidsbailey davidsbailey merged commit 18a7486 into staging Jan 7, 2026
7 checks passed
@davidsbailey davidsbailey deleted the prefer-test-units-in-ui-tests branch January 7, 2026 03:16
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.

3 participants