-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feat(ui): added labels to buckets #16855
Merged
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0f659d1
chore(ui): moved logic into thunk reducer
asalem1 3aa182c
merged
asalem1 5f6b9c9
Merge branch 'master' of github.com:influxdata/influxdb
asalem1 da58370
feat(ui): added labels to buckets
asalem1 7acd2b7
fix(ui): addressed linter errors
asalem1 2f204cd
Merge branch 'master' of github.com:influxdata/influxdb
asalem1 73ab3d4
feat(ui): added labels to buckets
asalem1 1715d93
fix(ui): addressed linter errors
asalem1 0d7c60b
chore(ui): updated changelog to reflect changes
asalem1 94a192c
Merge branch 'bucket-labels' of github.com:influxdata/influxdb into b…
asalem1 b249de6
fix(ui): fixed broken e2e test
asalem1 811027a
fix(ui): fixed e2e test
asalem1 3d82f0d
fix(ui): updated e2e test
asalem1 a7b5ff3
fix(ui): updated breaking test
asalem1 a15a53f
feat(ui): made requested PR changes
asalem1 92081b8
fix(ui): 'you made the perfect test' --alex boatwright
asalem1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
still have to change this (and change
bucket + name
back tobucket
on the testid in the 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.
why is that? We changed it for greater specificity to access a specific bucket card.
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.
so use that specificity in the test by generating ids to look up (instead of evaluating the text value). i think we're still straddling two solutions right now and just need to pick one and push it through.
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.
@drdelambre i'm not quite sure I understand your solution, would you mind expanding upon that with an example of what you had in mind?
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.
yeah. so you have the name of the resource in both the test id and in the text content of the dom node you are trying to pinpoint. So you have two sources of truth, and two directions to go to unify them:
expect(val.text()).to.include(buckets[index])
) is equal to the resource name. that keeps things scoped to buckets (good) but also ties the representation of the key to the value of the key (bad).cy.getByTestId(`bucket ${cool name}`)
). this scopes it to the bucket (good) as well as decouples the representation from the state (good)seems like you're leaning towards #2. either one is fine, it's just that generic resource selector has got to go.
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.
but wouldn't the second solution defeat the purpose of the test? If we're trying to test the sorting mechanism to present a specific order, targeting a bucket by the name would only validate that the bucket exists. It wouldn't represent the order with which that bucket exists in the context of the page