-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
chore: Cypress all selectors refactor #11134
Conversation
c4e047e
to
3bee7b7
Compare
d321c5a
to
35d618a
Compare
Codecov Report
@@ Coverage Diff @@
## master #11134 +/- ##
==========================================
- Coverage 65.88% 61.33% -4.55%
==========================================
Files 827 391 -436
Lines 39046 24483 -14563
Branches 3673 0 -3673
==========================================
- Hits 25725 15017 -10708
+ Misses 13214 9466 -3748
+ Partials 107 0 -107
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
@adam-stasiak this PR is huge and hard to review. Could you break this down into multiple smaller PRs? |
@willbarrett I did this big PR because my partials were outdated and it was hard to rebase them when I was adding module by module. I can split this by Cypress module fraction so split into PR for Dashboard, PR for Explore module, but I am afraid it would be hard to seperate changes in components. Is it ok to just make this smaller with cypress part not TSX? |
@rusackas do you have any suggestions here? |
}); | ||
|
||
it('should work with multiple groupby and multiple metrics', () => { | ||
it.only('should work with multiple groupby and multiple metrics', () => { |
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.
I don't believe we want the .only
here, right?
@@ -78,11 +78,6 @@ const StyledModal = styled(BaseModal)` | |||
margin-left: 8px; | |||
} | |||
} | |||
|
|||
// styling for Tabs component |
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.
Curious if/how this is relevant to the PR... looks like it would be a visual change... is it something @kgabryje is aware of?
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.
It looks like a rebasing mistake to me. Adam, can you please bring it back?
@@ -271,15 +276,16 @@ export default function TableCollection({ | |||
const columnCellProps = cell.column.cellProps || {}; | |||
return ( | |||
<td | |||
className={cx('table-cell', { | |||
data-test="row-cell" | |||
className={cx('row-cell', { |
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.
The table-cell
class removed here appears to have CSS styles that were applied to it. Is there a reason to cahge it?
I'm just slogging through it, a few files here and a few files there, making comments as I go. Looks like it needs a rebase currently, but I'll keep revisiting, and we can just shove it across the line. |
How would you split this? I would vote for PR for TSX changes and then PRs for cypress modules? |
> | ||
<span className={className} /> | ||
<span {...{ 'data-test': 'icon-button-span' }} className={className} /> |
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.
Curious why the spread syntax here instead of the usual attribute.
<StyledHeader | ||
id="slice-header" | ||
className="clearfix panel-title-large" | ||
ref |
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.
Why the 'ref' prop?
@@ -159,7 +159,7 @@ function PropertiesModal({ slice, onHide, onSave }: InternalProps) { | |||
|
|||
return ( | |||
<form onSubmit={onSubmit}> | |||
<Modal.Header closeButton> | |||
<Modal.Header data-test="edit-modal" closeButton> |
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.
Could be more specific (i.e. 'edit-properties-modal') if you can expect there to be more than one instance of modal in the code with data-test="edit-modal"
- it just makes it easier to find the instance in the codebase.
<div style={{ margin: '5px 0' }}> | ||
<Datetime | ||
inputProps={{ 'data-test': 'date-from-input' }} |
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.
Hmm... I wonder if that babel extension will manage strip out data-test attributes added like this. ¯\_(ツ)_/¯
@@ -293,7 +293,10 @@ function DashboardList(props: DashboardListProps) { | |||
className="action-button" | |||
onClick={confirmDelete} | |||
> | |||
<Icon name="trash" /> | |||
<Icon | |||
{...{ 'data-test': 'dashboard-list-trash-icon' }} |
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.
Wondering again about the need spread syntax over the attribute, which could be stripped out by babel for sure.
@@ -432,7 +435,11 @@ function DashboardList(props: DashboardListProps) { | |||
className="action-button" | |||
onClick={confirmDelete} | |||
> | |||
<ListViewCard.MenuIcon name="trash" /> Delete | |||
<ListViewCard.MenuIcon | |||
{...{ 'data-test': 'dashboard-card-view-trash-icon' }} |
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.
same spread question here :D
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.
Ok, I went through and added lots of little questions/comments/concerns. I think this is quite close to mergeable, but would like to resolve those conversations in the thread first.
fixed port fixed tests review changes
b5a238f
to
7dc243e
Compare
Codecov Report
@@ Coverage Diff @@
## master #11134 +/- ##
==========================================
- Coverage 65.60% 60.77% -4.84%
==========================================
Files 832 394 -438
Lines 39400 24716 -14684
Branches 3593 0 -3593
==========================================
- Hits 25849 15021 -10828
+ Misses 13442 9695 -3747
+ Partials 109 0 -109
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
@adam-stasiak should this PR be closed in favor of the newer ones? |
SUMMARY
This PR contains merged changes from outddated but reviewed branches. I resolved most of accuracy issues included in review notes. Not everywhere it was possible to add data-test selector to make some cypress steps more specific.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION