[Radio] Add visual regresion stories for Radio Widget#3802
Conversation
… Radio Widget added a regression story for the following scenarios: Issue: https://khanacademy.atlassian.net/browse/LEMS-4255 Test plan: TBD
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (681c6a1) and published it to npm. You Example: pnpm add @khanacademy/perseus@PR3802If you are working in Khan Academy's frontend, you can run the below command. ./dev/tools/bump_perseus_version.ts -t PR3802If you are working in Khan Academy's webapp, you can run the below command. ./dev/tools/bump_perseus_version.js -t PR3802 |
|
Size Change: 0 B Total Size: 517 kB ℹ️ View Unchanged
|
…o finish up last one for colors
…unt choices three regression
…egression tests for the radio widget
| images: choicesWithGraphieImages, | ||
| }, | ||
| }; | ||
| export const SingleSelectOneColor: Story = { |
There was a problem hiding this comment.
I'm not sure that a story with just 1 color adds value since the next story has all colors. Is there a need for just one color?
There was a problem hiding this comment.
The line of thinking was that maybe it could specifically error for multiple colors (and for the other one with multiple colors but not inline, similar idea, breaking for inline). Essentially, tests to narrow down the specific issue, though thinking of it in hindsight, I tend to agree with you. I don't think it would necessarily need to exist because of the multi in-line color test, I'll bring it up to Sarah P.
| ], | ||
| }, | ||
| }; | ||
| export const SingleSelectMultiInLineColor: Story = { |
There was a problem hiding this comment.
Nit: The title feels a bit vague to me. Would you consider something like SingleSelectWithColoredMath?
There was a problem hiding this comment.
Definitely, I think that would have some clarity
| ], | ||
| }, | ||
| }; | ||
| export const SingleSelectMultiColor: Story = { |
There was a problem hiding this comment.
Same question about value - Is there a need for a story that has just one color per choice versus the multi-color per choice in the preceding story?
…necessary test based on Sarah P & Mark's feedback
…ccording to talks with Mark and Sarah P. (Specifically, return the single select with rationale to initial state, removed choose 3, and converted many choices test to a story rather than a test
| }, | ||
| decorators: [mobileDecorator], | ||
| }; | ||
|
|
There was a problem hiding this comment.
Out of curiosity, why was this non-regression story added here? Generally I see these added if you're working on a related feature and want to manually test something.
There was a problem hiding this comment.
Yeah, so originally it was written down as a test but the intern was more to simulate a long multiple choice question on mobile, so Mark and Sarah P both agreed that it wouldn't need to be in the visual regression test, but rather as an example.
| "@khanacademy/perseus": patch | ||
| --- | ||
|
|
||
| Added multple regression tests for the radio widget |
There was a problem hiding this comment.
| Added multple regression tests for the radio widget | |
| Added multiple regression tests for the radio widget |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @khanacademy/perseus-core@30.1.0 ### Minor Changes - [#3854](#3854) [`4306c90`](4306c90) Thanks [@benchristel](https://github.com/benchristel)! - The Grapher widget is now marked **accessible** if it has a single available function type that is not `quadratic`, and no background image. ### Patch Changes - [#3859](#3859) [`eec5371`](eec5371) Thanks [@benchristel](https://github.com/benchristel)! - The now-unused feature flag "input-number-to-numeric-input" has been removed. - [#3855](#3855) [`8d25dbd`](8d25dbd) Thanks [@benchristel](https://github.com/benchristel)! - The `grapher-to-interactive-graph` feature flag has been removed. Graphers now render as Interactive Graphs if they have a single available function type that is not `quadratic`. ## @khanacademy/keypad-context@3.2.71 ### Patch Changes - Updated dependencies \[[`eec5371`](eec5371), [`4306c90`](4306c90), [`8d25dbd`](8d25dbd)]: - @khanacademy/perseus-core@30.1.0 ## @khanacademy/kmath@2.4.30 ### Patch Changes - Updated dependencies \[[`eec5371`](eec5371), [`4306c90`](4306c90), [`8d25dbd`](8d25dbd)]: - @khanacademy/perseus-core@30.1.0 ## @khanacademy/math-input@26.4.44 ### Patch Changes - Updated dependencies \[[`eec5371`](eec5371), [`4306c90`](4306c90), [`8d25dbd`](8d25dbd)]: - @khanacademy/perseus-core@30.1.0 - @khanacademy/keypad-context@3.2.71 ## @khanacademy/perseus@79.1.2 ### Patch Changes - [#3847](#3847) [`855f36d`](855f36d) Thanks [@Evelas78](https://github.com/Evelas78)! - Regression tests for sorter - [#3802](#3802) [`45feb6d`](45feb6d) Thanks [@Evelas78](https://github.com/Evelas78)! - Added multiple regression tests for the radio widget - [#3812](#3812) [`53b4221`](53b4221) Thanks [@nishasy](https://github.com/nishasy)! - [ColorSync][numeric input] Add more regression stories for the Numeric Input widget - [#3859](#3859) [`eec5371`](eec5371) Thanks [@benchristel](https://github.com/benchristel)! - The now-unused feature flag "input-number-to-numeric-input" has been removed. - [#3855](#3855) [`8d25dbd`](8d25dbd) Thanks [@benchristel](https://github.com/benchristel)! - The `grapher-to-interactive-graph` feature flag has been removed. Graphers now render as Interactive Graphs if they have a single available function type that is not `quadratic`. - [#3835](#3835) [`e5c4c92`](e5c4c92) Thanks [@jandrade](https://github.com/jandrade)! - Migrate Wonder Blocks font sizing from the deprecated `font.size` / `--wb-font-size` tokens to the newer `font.body.size` / `--wb-font-body-size` tokens. Sizes that have no `body` equivalent (`large`) now use the matching `font.heading.size` token. - Updated dependencies \[[`eec5371`](eec5371), [`4306c90`](4306c90), [`8d25dbd`](8d25dbd)]: - @khanacademy/perseus-core@30.1.0 - @khanacademy/keypad-context@3.2.71 - @khanacademy/kmath@2.4.30 - @khanacademy/math-input@26.4.44 - @khanacademy/perseus-linter@5.1.11 - @khanacademy/perseus-score@8.12.3 ## @khanacademy/perseus-editor@34.1.2 ### Patch Changes - [#3832](#3832) [`4f11360`](4f11360) Thanks [@nishasy](https://github.com/nishasy)! - Put the left and right sides of the editor in separate scroll areas - [#3828](#3828) [`ffc1dcd`](ffc1dcd) Thanks [@catandthemachines](https://github.com/catandthemachines)! - [Interactive Graph][editor] Fix invariant error in interactve graph editor. - [#3835](#3835) [`e5c4c92`](e5c4c92) Thanks [@jandrade](https://github.com/jandrade)! - Migrate Wonder Blocks font sizing from the deprecated `font.size` / `--wb-font-size` tokens to the newer `font.body.size` / `--wb-font-body-size` tokens. Sizes that have no `body` equivalent (`large`) now use the matching `font.heading.size` token. - Updated dependencies \[[`855f36d`](855f36d), [`45feb6d`](45feb6d), [`53b4221`](53b4221), [`eec5371`](eec5371), [`4306c90`](4306c90), [`8d25dbd`](8d25dbd), [`e5c4c92`](e5c4c92)]: - @khanacademy/perseus@79.1.2 - @khanacademy/perseus-core@30.1.0 - @khanacademy/keypad-context@3.2.71 - @khanacademy/kmath@2.4.30 - @khanacademy/math-input@26.4.44 - @khanacademy/perseus-linter@5.1.11 ## @khanacademy/perseus-linter@5.1.11 ### Patch Changes - Updated dependencies \[[`eec5371`](eec5371), [`4306c90`](4306c90), [`8d25dbd`](8d25dbd)]: - @khanacademy/perseus-core@30.1.0 - @khanacademy/kmath@2.4.30 ## @khanacademy/perseus-score@8.12.3 ### Patch Changes - Updated dependencies \[[`eec5371`](eec5371), [`4306c90`](4306c90), [`8d25dbd`](8d25dbd)]: - @khanacademy/perseus-core@30.1.0 - @khanacademy/kmath@2.4.30 Author: khan-actions-bot Reviewers: benchristel Required Reviewers: Approved By: benchristel Checks: ✅ 11 checks were successful Pull Request URL: #3861
Summary:
Added Regression Stories for the Radio widget for the following scenarios:
Demo Story
Initial State
Interactions
Issue: https://khanacademy.atlassian.net/browse/LEMS-4255
Test plan: