-
Notifications
You must be signed in to change notification settings - Fork 367
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
test: [M3-8688, M3-9039] - Autocomplete component tests #11408
Conversation
cf7b7fc
to
37bdedf
Compare
import { checkComponentA11y } from 'support/util/accessibility'; | ||
import { componentTests, visualTests } from 'support/util/components'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only eslint changes in this file and region-select.spec.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of that!
@@ -0,0 +1,685 @@ | |||
import { Autocomplete } from '@linode/ui'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we've decided to go with cypress component tests, should we now move everything out of the poc package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coliu-akamai we definitely should! I just opened M3-9039 for this (not well refined right now), but you're welcome to move this spec now or we can just handle it with M3-9039.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the heads up! created a components
package in place of poc to put everything in (since there's an existing features package) - would it make sense to create individual packages for each component as well? I didn't yet bc those packages would all just have one file
also would we want to create a ui package for the components that have been moved to linode/ui
? 😅
Coverage Report: ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dwiley-akamai hmm I don't seem to be getting that issue when I run any of the component tests - is this happening only for autocomplete, or does it also happen for beta-chip and region-select? @jdamore-linode any chance you know what might be causing this? |
7febdef
to
183a569
Compare
@coliu-akamai I haven't seen it while testing your PR locally, but I have seen it intermittently on other branches, in CI, etc. When I've experienced it, it's always been a fluke and has succeeded on reattempts, but curious if @dwiley-akamai is seeing this consistently. Happy to take a closer look if so! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @coliu-akamai, these tests look really great!
// figure out how to confirm multi selections | ||
// input value doesn't work anymore... (this feels hacky) | ||
const MultiSelect = () => { | ||
const [selectedOptions, setSelectedOptions] = React.useState< | ||
Option[] | ||
>([]); | ||
return ( | ||
<> | ||
<div>Number of selected options: {selectedOptions.length}</div> | ||
<Autocomplete | ||
label="Linodes" | ||
multiple | ||
onChange={(_, value) => setSelectedOptions(value)} | ||
options={options} | ||
value={selectedOptions} | ||
/> | ||
</> | ||
); | ||
}; | ||
|
||
mount(<MultiSelect />); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're still trying to figure out guidelines and conventions for these tests, but at a glance I think this is a smart and pretty clear way to ensure that the Autocomplete does what it's supposed to. Curious if anyone has any other thoughts!
import { checkComponentA11y } from 'support/util/accessibility'; | ||
import { componentTests, visualTests } from 'support/util/components'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of that!
183a569
to
62532d6
Compare
It's still happening unfortunately and it is happening for all three on my end @coliu-akamai @jdamore-linode Confirmed that it is only the Component Specs failing to run though (not E2E Specs). Are you aware of any config adjustments needed to run these successfully? Maybe I'm missing something locally |
Co-authored-by: jdamore-linode <97627410+jdamore-linode@users.noreply.github.com>
78f1181
to
1384cf5
Compare
Cloud Manager UI test results🎉 471 passing tests on test run #11 ↗︎
|
@dwiley-akamai - I don't remember having any config adjustments, but can't say for sure... @jdamore-linode do you remember? creating a follow up ticket [M3-9062] to investigate further if needed |
No issues on my end when testing with |
Ah I'm sorry, I meant to take a closer look at this @coliu-akamai and never did. It doesn't sound like this is specific to your Autocomplete tests though so I don't think it should hold up merging this |
sounds good, will be merging - thanks for the help everyone |
Cloud Manager E2E Run #7043
Run Properties:
|
Project |
Cloud Manager E2E
|
Branch Review |
develop
|
Run status |
Passed #7043
|
Run duration | 29m 12s |
Commit |
2e4dabfc31: test: [M3-8688, M3-9039] - Autocomplete component tests (#11408)
|
Committer | Connie Liu |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
2
|
Pending |
2
|
Skipped |
0
|
Passing |
474
|
View all changes introduced in this branch ↗︎ |
* autocomplete tests * eslint * cleanup tests * Added changeset: Add cypress component tests for Autocomplete * address feedback @jdamore-linode * Update packages/manager/cypress/component/poc/autocomplete.spec.tsx Co-authored-by: jdamore-linode <97627410+jdamore-linode@users.noreply.github.com> * create components package within ...component... package --------- Co-authored-by: jdamore-linode <97627410+jdamore-linode@users.noreply.github.com>
Description 📝
Adds component tests for autocomplete component
How to test 🧪
yarn cy:debug
and selecting component tests to check these testsAuthor Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅