-
Notifications
You must be signed in to change notification settings - Fork 63
Wizard: fix root not removable when duplicate #3614
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
base: main
Are you sure you want to change the base?
Conversation
Better safe than sorry. 🎉 The bug is here: Screencast.From.2025-09-04.16-00-54.mp4 |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #3614 +/- ##
==========================================
- Coverage 82.58% 82.53% -0.06%
==========================================
Files 204 204
Lines 24674 24694 +20
Branches 2550 2559 +9
==========================================
+ Hits 20378 20382 +4
- Misses 4269 4285 +16
Partials 27 27
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
fb08d6a
to
958abb6
Compare
/retest |
958abb6
to
cec74a0
Compare
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.
Nice!
/retest |
cec74a0
to
a73a0a2
Compare
Great! I just wonder why in your bug video there wasn't an exclamation mark next to the FS configuration step in nav bar 🤔 Was is just a slow load? Maybe that's worth investigating if our validation is not set correctly for that step, but that's a different PR kinda thing. Nice work! |
Yeah, the validation happens for some reason only on click of the next button. 😄 |
@avitova very nice, is it possible to add unit test to check this change? |
8974b71
to
3387288
Compare
Good point, @mgold1234 . However, I decided to do Playwright tests, as they are more easy to write and read. What do you think about this way of importing blueprints that we define in a file, @tkoscieln ? |
We allow adding more root mountpoints via import feature, which should not be possible. This fix allows users to remove extra root partition, but keeps it in the wizard so that users know about it.
3387288
to
0494874
Compare
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.
@avitova this way of importing blueprints LGTM. Added some additional comments.
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 would maybe create a subdirectory fixtures/data
to separate these files from the fixture functions. But this is a nitpick.
playwright/Import/Import.spec.ts
Outdated
const frame = await ibFrame(page); | ||
|
||
await test.step('Import BP', async (step) => { | ||
step.skip(!isHosted(), 'Importing is not available in the plugin'); |
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 should propably skip the entire test if the importing is not avaiable in Cockpit plugin at all. You can use test.skip
for that.
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.
This is also what is failing the cockpit tests in Schutzbot. It expects the wizard to be open from the Import helper function, but it is not.
playwright/helpers/wizardHelpers.ts
Outdated
@@ -143,3 +146,17 @@ export const importBlueprint = async ( | |||
await page.getByRole('button', { name: 'Review and Finish' }).click(); | |||
} | |||
}; | |||
|
|||
export const importDynamicFixture = 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.
We should propably change the name of this helper function to something else since it just creates a file 🤔 Also please add docstring 🥺
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 just realized this test is not running in the CI at all. Since I've introduced the Boot tests, the playwright action for the other tests that should run on PRs need to have the directory specified for the playwright command here. So since you placed the test in a new directory, it needs to be added there. I should propably document this, my bad 😬
playwright/Import/Import.spec.ts
Outdated
await registerLater(frame); | ||
}); | ||
|
||
await test.step('Select the Locale step', 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.
Could you divide this one big step into several smaller steps that encapsulate every wizard step that is being checked?
This commits adds a constant with blueprint in order for us to test different cases of errors that might ocurr out of a blueprint.
0494874
to
e1f4186
Compare
Thank you, Tomas! I tried to address your comments. |
e1f4186
to
2503f5d
Compare
We allow adding more root mountpoints via import feature, which should not be possible. This fix allows users to remove extra root partition, but keeps it in the wizard so that users know about it.