Skip to content

[CFU] Add eyes tests for summary view - #51414

Merged
rshipp merged 5 commits into
stagingfrom
summary-eyes
Apr 21, 2023
Merged

[CFU] Add eyes tests for summary view#51414
rshipp merged 5 commits into
stagingfrom
summary-eyes

Conversation

@rshipp

@rshipp rshipp commented Apr 19, 2023

Copy link
Copy Markdown
Contributor

Add some feature tests for the summary view on a few Free Response levels, so we can collect visual baselines in advance of refactoring.

Since I just want the visual diffs, I didn't have any specific test cases in mind; open to feedback on whether I should add some verify steps or something to these.

Ran locally:
image

@rshipp
rshipp requested a review from a team April 19, 2023 18:04

@hannahbergam hannahbergam 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.

The difference between ui and eyes test is this funky wording that I think you still need to add here. An example:

@eyes
Scenario: Stage Locking Dialog
Given I create an authorized teacher-associated student named "bobby"
When I open my eyes to test "stage locking"
...
And I see no difference for "selected section"
...
And I see no difference for "stage lock dialog"
...
And I see no difference for "course overview for authorized teacher"
And I close my eyes

I think 'I see no difference' is the actual baseline check!

@rshipp

rshipp commented Apr 19, 2023

Copy link
Copy Markdown
Contributor Author

🤯 thanks! i didn't realize that's what those were doing

@rshipp

rshipp commented Apr 19, 2023

Copy link
Copy Markdown
Contributor Author

Is there any way to test the eyes part without deploying?

@bethanyaconnor

Copy link
Copy Markdown
Contributor

@rshipp you can follow the directions at https://github.com/code-dot-org/code-dot-org/blob/staging/docs/testing-with-applitools-eyes.md to see the baselines that will be generated

@eyes
Feature: Level summary

Scenario: Free Response level 1

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.

At the beginning of eyes tests, you need a line like When I open my eyes to test "Free Response Level Summary", like in this test

And I see no difference for "level summary"
And I close my eyes

Scenario: Free Response level 2

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.

What's the difference between level 1, level 2, and level 3. Do we need all three?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I picked these 3 because one has a level.title that gets rendered as an h1, one has no level.title but an h2 in the markdown, and one has no heading at all. i expect some heading differences with my next PR because of the application.css styles, and wanted to be sure to have baselines for that. the first allthethings also has more features used than the other 2, like the teacher instructions. other than that, I don't know what the best way to test this stuff is. it doesn't feel great to have such a wide variety of content in these levels with no way to find example levels that use each feature, I've just been asking Bryan or stumbling across levels by accident that have new things i've never seen before

@rshipp
rshipp requested review from a team, bethanyaconnor and hannahbergam April 21, 2023 20:08

@hannahbergam hannahbergam 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.

LGTM! I'm way less well-versed on how to update the allthethings script, but as long as it's still passing all the other tests then I say ✅

Then I see no difference for "free response level summary 2"
And I close my eyes

Scenario: Free Response level 3

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.

Yay! Good work covering several different views.

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