-
Notifications
You must be signed in to change notification settings - Fork 6
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 affects impact and resolution ordering #517
Open
C-Valen
wants to merge
3
commits into
main
Choose a base branch
from
fix/OSIDB-3480-incorrect-affects-ordering
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+50
−3
Conversation
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
C-Valen
changed the title
🐛 Fix affects string columns ordering
🐛 Fix affects sotring columns ordering
Dec 12, 2024
C-Valen
changed the title
🐛 Fix affects sotring columns ordering
🐛 Fix affects impact and resolution ordering
Dec 12, 2024
C-Valen
force-pushed
the
fix/OSIDB-3480-incorrect-affects-ordering
branch
from
December 12, 2024 10:43
364ff56
to
3f7f88c
Compare
C-Valen
force-pushed
the
fix/OSIDB-3480-incorrect-affects-ordering
branch
from
December 16, 2024 15:15
3f7f88c
to
1d92228
Compare
MrMarble
reviewed
Dec 19, 2024
@@ -326,7 +326,7 @@ describe('flawAffects', () => { | |||
expect(affectsTableRows.length).toBe(6); | |||
}); | |||
|
|||
osimFullFlawTest('Affects can be sorted by clicking on the field column', async () => { | |||
osimFullFlawTest('Affects can be sorted by component column', async () => { |
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 think we can replace all this "sorting" tests with a parametrized test
osimFullFlawTest.each([
{ column: 'Module', columnIndex: 3, first: 'openshift-6', last: 'openshift-1' },
{ column: 'Component', columnIndex: 4, first: 'openshift-1-1', last: 'openshift-6-1' },
{ column: 'Affectedness', columnIndex: 5, first: 'AFFECTED', last: '' },
{ column: 'Resolution', columnIndex: 6, first: 'DELEGATED', last: 'WONTFIX' },
{ column: 'Impact', columnIndex: 7, first: 'CRITICAL', last: 'LOW' },
{ column: 'Trackers', columnIndex: 9, first: '0', last: '4' },
])('Affects can be sorted by $column column', async ({ column, columnIndex, first, last }) => {
const componentHeader = subject.find(`.affects-management table thead tr th:nth-of-type(${columnIndex})`);
expect(componentHeader.text()).toStrictEqual(expect.stringMatching(column));
// Ascending order
await componentHeader.trigger('click');
let affectsTableRows = subject.findAll('.affects-management table tbody tr');
let firstAffect = affectsTableRows[0];
let lastAffect = affectsTableRows.at(-1)!;
expect(firstAffect.find(`td:nth-of-type(${columnIndex}) span`).text()).toBe(first);
expect(lastAffect.find(`td:nth-of-type(${columnIndex}) span`).text()).toBe(last);
// Descending order
await componentHeader.trigger('click');
affectsTableRows = subject.findAll('.affects-management table tbody tr');
firstAffect = affectsTableRows[0];
lastAffect = affectsTableRows.at(-1)!;
expect(firstAffect.find(`td:nth-of-type(${columnIndex}) span`).text()).toBe(last);
expect(lastAffect.find(`td:nth-of-type(${columnIndex}) span`).text()).toBe(first);
});
MrMarble
approved these changes
Dec 19, 2024
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 only have a suggestion for the tests, otherwise LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
OSIDB-3480: Fix incorrect affects ordering
Checklist:
Summary:
Fix wrong sorting on affects table by Impact and Resolution
Changes:
Closes OSIDB-3480