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 console error when running tests #205

Merged
merged 3 commits into from
Jan 17, 2025
Merged

Conversation

jordanjones243
Copy link
Contributor

@jordanjones243 jordanjones243 commented Jan 14, 2025

Alaska Airlines Pull Request

Before Submitting this pull request:

  • Link all tickets in this repository related to this PR in the Development section
    note: all pull requests require at least one linked ticket
  • If this PR is Ready For Review, all ticket's linked under Development must have their status changed to Ready For Review as well

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I have performed a self-review of my own update.

Summary by Sourcery

Update auro-formkit dependencies to beta.6 and fix a bug where making an invalid selection programmatically results in the component resetting.

Bug Fixes:

  • Fix console error when making invalid selection programmatically.

Tests:

  • Update test to reflect the change in the components behavior.

@jordanjones243 jordanjones243 self-assigned this Jan 14, 2025
@jordanjones243 jordanjones243 requested a review from a team as a code owner January 14, 2025 00:39
Copy link

sourcery-ai bot commented Jan 14, 2025

Reviewer's Guide by Sourcery

This PR fixes a console error that occurred when making an invalid selection programmatically in the auro-select component. The fix changes the component's behavior so that it resets its state when an invalid selection is made, rather than displaying an error UI. Additionally, the versions of auro-checkbox, auro-combobox, auro-datepicker, auro-dropdown, auro-form, auro-input, auro-menu, auro-radio, and auro-select are updated to 2.0.0-beta.6.

Sequence diagram for updated auro-select error handling

sequenceDiagram
    participant User
    participant AuroSelect
    participant State

    User->>AuroSelect: Makes invalid selection programmatically
    AuroSelect->>State: Reset state
    Note over AuroSelect: No error UI shown
    AuroSelect-->>User: Continue with reset state
Loading

Class diagram showing updated component versions

classDiagram
    class AuroFormkit {
        +version: 2.0.0-beta.6
    }
    AuroFormkit <|-- AuroCheckbox
    AuroFormkit <|-- AuroCombobox
    AuroFormkit <|-- AuroDatepicker
    AuroFormkit <|-- AuroDropdown
    AuroFormkit <|-- AuroForm
    AuroFormkit <|-- AuroInput
    AuroFormkit <|-- AuroMenu
    AuroFormkit <|-- AuroRadio
    AuroFormkit <|-- AuroSelect

    note for AuroSelect "Updated error handling for invalid selections"
Loading

File-Level Changes

Change Details Files
Fix console error when making invalid selection programmatically
  • Changed test description to reflect the new behavior
  • Removed UI error check
  • Added check for the absence of the validity attribute
components/select/test/auro-select.test.js
Update component versions to 2.0.0-beta.6
  • Updated auro-checkbox from version 2.0.0-beta.4 to 2.0.0-beta.6
  • Updated auro-combobox from version 2.0.0-beta.4 to 2.0.0-beta.6
  • Updated auro-datepicker from version 2.0.0-beta.4 to 2.0.0-beta.6
  • Updated auro-dropdown from version 2.0.0-beta.4 to 2.0.0-beta.6
  • Updated auro-form from version 2.0.0-beta.4 to 2.0.0-beta.6
  • Updated auro-input from version 2.0.0-beta.4 to 2.0.0-beta.6
  • Updated auro-menu from version 2.0.0-beta.4 to 2.0.0-beta.6
  • Updated auro-radio from version 2.0.0-beta.4 to 2.0.0-beta.6
  • Updated auro-select from version 2.0.0-beta.4 to 2.0.0-beta.6
components/combobox/README.md
components/datepicker/README.md
components/select/README.md
components/checkbox/README.md
components/dropdown/README.md
components/form/README.md
components/input/README.md
components/menu/README.md
components/radio/README.md
Add rootDir config to web test runner
  • Added rootDir property set to '../../'
  • Added include and exclude properties to coverageConfig
packages/config/src/web-test-runner.config.mjs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@jordanjones243 jordanjones243 linked an issue Jan 14, 2025 that may be closed by this pull request
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @jordanjones243 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@jordanjones243 jordanjones243 force-pushed the jjones/testingBugs branch 4 times, most recently from 6c99153 to f81fc34 Compare January 14, 2025 18:13
@jordanjones243 jordanjones243 marked this pull request as draft January 14, 2025 18:13
@jordanjones243 jordanjones243 marked this pull request as ready for review January 14, 2025 18:39
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @jordanjones243 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟡 Testing: 1 issue found
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

components/select/test/auro-select.test.js Show resolved Hide resolved
@jordanjones243 jordanjones243 force-pushed the jjones/testingBugs branch 2 times, most recently from 11e217a to 3d648dd Compare January 17, 2025 17:51
@jason-capsule42 jason-capsule42 merged commit e0b419d into beta Jan 17, 2025
4 checks passed
@jason-capsule42 jason-capsule42 deleted the jjones/testingBugs branch January 17, 2025 18:01
@jason-capsule42
Copy link
Member

🎉 This PR is included in version 2.0.0-beta.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Integrate Testing into Monorepo
2 participants