cockpit-machines/1088.patch
Adam Majer 59b7d0d0ee - Update to 293
* Add manifest condition for the Python bridge
  * Vsock device support
  * Apply watchdog changes on next boot if hotplug fails
  * Option to use RAW volume during VM creation
  * Redesign VM’s CPU configuration
  * Indicate need for shutdown
  * Delete storage file upon disk detachment
  * Show an alert when virtualization is disabled in BIOS/EFI
  * Create VM based on cloud image and start it later
  * Option to forcefully revert a snapshot
  * Support dark theme
  * Translation updates
  * Stability and performance updates
- 1088.patch: WIP for PF5 changes in cockpit
- hide-docs.patch, load-css-overrides.patch: refreshed
- suse-vv-install.patch: upstreamed, removed

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit-machines?expand=0&rev=20
2023-06-16 12:39:53 +00:00

2528 lines
137 KiB
Diff

From 2bd9d01ae4c02cfaad2b3d910f7afd484faf3458 Mon Sep 17 00:00:00 2001
From: Martin Pitt <mpitt@redhat.com>
Date: Thu, 25 May 2023 06:53:36 +0200
Subject: [PATCH 1/2] Update default $TEST_OS to fedora-38
See https://github.com/cockpit-project/bots/pull/4775
---
HACKING.md | 2 +-
Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: cockpit-machines-292/HACKING.md
===================================================================
--- cockpit-machines-292.orig/HACKING.md
+++ cockpit-machines-292/HACKING.md
@@ -79,7 +79,7 @@ css or other issues:
# Running tests locally
Run `make vm` to build an RPM and install it into a standard Cockpit test VM.
-This will be `fedora-37` by default. You can set `$TEST_OS` to use a different
+This will be `fedora-38` by default. You can set `$TEST_OS` to use a different
image, for example
TEST_OS=centos-8-stream make vm
Index: cockpit-machines-292/Makefile
===================================================================
--- cockpit-machines-292.orig/Makefile
+++ cockpit-machines-292/Makefile
@@ -3,7 +3,7 @@ PACKAGE_NAME := $(shell awk '/"name":/ {
RPM_NAME := cockpit-$(PACKAGE_NAME)
VERSION := $(shell T=$$(git describe 2>/dev/null) || T=1; echo $$T | tr '-' '.')
ifeq ($(TEST_OS),)
-TEST_OS = fedora-37
+TEST_OS = fedora-38
endif
export TEST_OS
TARFILE=$(RPM_NAME)-$(VERSION).tar.xz
@@ -41,7 +41,7 @@ COCKPIT_REPO_FILES = \
$(NULL)
COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git
-COCKPIT_REPO_COMMIT = 355c0aa59e3991243e10a61183e62ea129d3261a # 292 + 8 commits
+COCKPIT_REPO_COMMIT = 3ca979d542a4d6cf865f2132e0bdf1b06c49d07f # 292 + 56 commits
$(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP)
COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}'
Index: cockpit-machines-292/package.json
===================================================================
--- cockpit-machines-292.orig/package.json
+++ cockpit-machines-292/package.json
@@ -45,12 +45,13 @@
"stylelint-formatter-pretty": "^3.1.1"
},
"dependencies": {
- "@patternfly/patternfly": "5.0.0-alpha.43",
- "@patternfly/react-console": "^5.0.0-alpha.1",
- "@patternfly/react-core": "5.0.0-alpha.83",
- "@patternfly/react-icons": "5.0.0-alpha.12",
- "@patternfly/react-styles": "5.0.0-alpha.8",
- "@patternfly/react-table": "5.0.0-alpha.85",
+ "@patternfly/patternfly": "5.0.0-alpha.53",
+ "@patternfly/react-console": "5.0.0-alpha.1",
+ "@patternfly/react-core": "5.0.0-alpha.98",
+ "@patternfly/react-icons": "5.0.0-alpha.14",
+ "@patternfly/react-styles": "5.0.0-alpha.10",
+ "@patternfly/react-table": "5.0.0-alpha.100",
+ "@patternfly/react-tokens": "5.0.0-alpha.9",
"date-fns": "2.28.0",
"deep-equal": "2.0.5",
"prop-types": "15.8.1",
Index: cockpit-machines-292/src/components/common/machinesConnectionSelector.jsx
===================================================================
--- cockpit-machines-292.orig/src/components/common/machinesConnectionSelector.jsx
+++ cockpit-machines-292/src/components/common/machinesConnectionSelector.jsx
@@ -79,7 +79,7 @@ export const MachinesConnectionSelector
</TextContent>
</>}
>
- <Button variant="plain" aria-label={_("more info")} className="pf-c-form__group-label-help">
+ <Button variant="plain" aria-label={_("more info")} className="pf-v5-c-form__group-label-help">
<HelpIcon noVerticalAlign />
</Button>
</Popover>
Index: cockpit-machines-292/src/components/common/needsShutdown.scss
===================================================================
--- cockpit-machines-292.orig/src/components/common/needsShutdown.scss
+++ cockpit-machines-292/src/components/common/needsShutdown.scss
@@ -1,3 +1,3 @@
.configuration-changes-list {
- margin-top: var(--pf-c-list--li--MarginTop);
+ margin-top: var(--pf-v5-c-list--li--MarginTop);
}
Index: cockpit-machines-292/src/components/common/overviewCard.css
===================================================================
--- cockpit-machines-292.orig/src/components/common/overviewCard.css
+++ cockpit-machines-292/src/components/common/overviewCard.css
@@ -3,6 +3,6 @@
}
.overview-icon svg {
- color: var(--pf-c-description-list__term-icon--Color);
- font-size: var(--pf-c-description-list__term--FontSize);
+ color: var(--pf-v5-c-description-list__term-icon--Color);
+ font-size: var(--pf-v5-c-description-list__term--FontSize);
}
Index: cockpit-machines-292/src/components/common/stateIcon.scss
===================================================================
--- cockpit-machines-292.orig/src/components/common/stateIcon.scss
+++ cockpit-machines-292/src/components/common/stateIcon.scss
@@ -1,20 +1,20 @@
.resource-state-text {
- margin-right: var(--pf-c-label--PaddingRight);
+ margin-right: var(--pf-v5-c-label--PaddingRight);
// In definition lists (for Overview),
// match text size and alignment
- .pf-c-table &,
- .pf-c-description-list & {
+ .pf-v5-c-table &,
+ .pf-v5-c-description-list & {
// Match text size
font-size: inherit;
// Compensate for padding
position: relative;
// Using margin to remove the extra padded space,
// instead of keeping the space and moving contents w/ just left/top
- margin-left: calc(-1 * var(--pf-c-label--PaddingLeft));
+ margin-left: calc(-1 * var(--pf-v5-c-label--PaddingLeft));
}
}
-.pf-c-label.resource-state--shut-off, .pf-c-label.resource-state--inactive {
+.pf-v5-c-label.resource-state--shut-off, .pf-v5-c-label.resource-state--inactive {
background: transparent;
}
Index: cockpit-machines-292/src/components/create-vm-dialog/createVmDialog.jsx
===================================================================
--- cockpit-machines-292.orig/src/components/create-vm-dialog/createVmDialog.jsx
+++ cockpit-machines-292/src/components/create-vm-dialog/createVmDialog.jsx
@@ -507,7 +507,7 @@ const HelperMessageToken = ({ message })
);
return (
- <Flex id="token-helper-message" className="pf-c-form__helper-text">
+ <Flex id="token-helper-message" className="pf-v5-c-form__helper-text">
{message && <FlexItem className="invalid-token-helper" grow={{ default: 'grow' }}>{message + " "}</FlexItem>}
<FlexItem>
{ link }
@@ -524,7 +524,7 @@ const validationStates = {
},
INPROGRESS: {
option: "default",
- message: <span id="token-helper-message" className="pf-c-form__helper-text"><Spinner size="md" /> {_("Checking token validity...")}</span>,
+ message: <span id="token-helper-message" className="pf-v5-c-form__helper-text"><Spinner size="md" /> {_("Checking token validity...")}</span>,
},
FAILED: {
option: "error",
@@ -1326,13 +1326,13 @@ class CreateVmModal extends React.Compon
validationFailed={validationFailed} />
{ this.props.mode === "create"
? <Tabs activeKey={this.state.activeTabKey} onSelect={this.handleTabClick}>
- <Tab eventKey={0} title={<TabTitleText>{_("Details")}</TabTitleText>} id="details-tab" className="pf-c-form">
+ <Tab eventKey={0} title={<TabTitleText>{_("Details")}</TabTitleText>} id="details-tab" className="pf-v5-c-form">
{detailsTab}
</Tab>
<Tab eventKey={1}
title={<TabTitleText>{_("Automation")}</TabTitleText>}
id="automation"
- className="pf-c-form"
+ className="pf-v5-c-form"
tooltip={automationTabTooltip}
isAriaDisabled={!!automationTabTooltip}>
{automationTab}
Index: cockpit-machines-292/src/components/create-vm-dialog/createVmDialog.scss
===================================================================
--- cockpit-machines-292.orig/src/components/create-vm-dialog/createVmDialog.scss
+++ cockpit-machines-292/src/components/create-vm-dialog/createVmDialog.scss
@@ -2,12 +2,12 @@
max-width: 5rem;
}
-.pf-c-tooltip__arrow {
+.pf-v5-c-tooltip__arrow {
margin-right: var(--pf-global--spacer--xl);
}
.invalid-token-helper {
- color: var(--pf-c-form__helper-text--m-error--Color);
+ color: var(--pf-v5-c-form__helper-text--m-error--Color);
}
// Move position of icon so it doens't get covered by scrollbar.
Index: cockpit-machines-292/src/components/storagePools/storagePoolDelete.scss
===================================================================
--- cockpit-machines-292.orig/src/components/storagePools/storagePoolDelete.scss
+++ cockpit-machines-292/src/components/storagePools/storagePoolDelete.scss
@@ -1,4 +1,4 @@
.pool-volumes-delete-list {
margin-top: var(--pf-global--spacer--sm);
- --pf-c-list--li--MarginTop: 0 !important;
+ --pf-v5-c-list--li--MarginTop: 0 !important;
}
Index: cockpit-machines-292/src/components/storagePools/storagePoolList.scss
===================================================================
--- cockpit-machines-292.orig/src/components/storagePools/storagePoolList.scss
+++ cockpit-machines-292/src/components/storagePools/storagePoolList.scss
@@ -1,11 +1,11 @@
#storage-pools-listing {
- .pf-c-table tbody > tr > * {
+ .pf-v5-c-table tbody > tr > * {
// These tables are 1 row tall; progress bar does odd stuff for alignment;
// vertical alignment makes text line up
vertical-align: middle;
}
- .pf-c-table__toggle > .pf-c-button {
+ .pf-v5-c-table__toggle > .pf-v5-c-button {
// Undo the PF alignment offset, as we're aligning to the middle (see above)
margin-top: 0;
}
@@ -17,11 +17,11 @@
--progress-bar-max: 12vw;
td[data-label="Size"] {
- > .pf-c-progress {
+ > .pf-v5-c-progress {
// Fix progress bar size
grid-template-columns: minmax(var(--progress-bar-min), var(--progress-bar-max)) minmax(max-content, var(--progress-text));
- > .pf-c-progress__status {
+ > .pf-v5-c-progress__status {
// Align status text to the end (for GiB to align properly)
justify-self: end;
}
Index: cockpit-machines-292/src/components/storagePools/storagePoolVolumesTab.css
===================================================================
--- cockpit-machines-292.orig/src/components/storagePools/storagePoolVolumesTab.css
+++ cockpit-machines-292/src/components/storagePools/storagePoolVolumesTab.css
@@ -1,3 +1,3 @@
-.pf-c-empty-state__content button:not(:first-child) {
+.pf-v5-c-empty-state__content button:not(:first-child) {
margin-left: 0.3em;
}
Index: cockpit-machines-292/src/components/vm/consoles/consoles.css
===================================================================
--- cockpit-machines-292.orig/src/components/vm/consoles/consoles.css
+++ cockpit-machines-292/src/components/vm/consoles/consoles.css
@@ -1,30 +1,30 @@
@import "@patternfly/react-styles/css/components/Consoles/SerialConsole.css";
-.pf-c-console,
-.pf-c-console__vnc,
-.pf-c-console__vnc > div,
-.pf-c-console__vnc > div > div {
+.pf-v5-c-console,
+.pf-v5-c-console__vnc,
+.pf-v5-c-console__vnc > div,
+.pf-v5-c-console__vnc > div > div {
width: 100%;
height: 100%;
}
-.pf-c-console__actions {
+.pf-v5-c-console__actions {
max-width: 25ch;
}
-.pf-c-console {
+.pf-v5-c-console {
/* auto minimum width, causing problem */
grid-template-columns: 1fr;
grid-template-rows: min-content 1fr;
}
-.consoles-page-expanded .actions-pagesection .pf-c-page__main-body {
+.consoles-page-expanded .actions-pagesection .pf-v5-c-page__main-body {
padding-bottom: 0;
}
/* Hide send key button - there is not way to do that from the JS
* https://github.com/patternfly/patternfly-react/issues/3689
*/
-#pf-c-console__send-shortcut {
+#pf-v5-c-console__send-shortcut {
display: none;
}
Index: cockpit-machines-292/src/components/vm/consoles/serialConsole.jsx
===================================================================
--- cockpit-machines-292.orig/src/components/vm/consoles/serialConsole.jsx
+++ cockpit-machines-292/src/components/vm/consoles/serialConsole.jsx
@@ -89,13 +89,13 @@ class SerialConsoleCockpit extends React
return (
<>
- <div className="pf-c-console__actions-serial">
+ <div className="pf-v5-c-console__actions-serial">
{this.state.channel
? <Button id={this.props.vmName + "-serialconsole-disconnect"} variant="secondary" onClick={this.onDisconnect}>{_("Disconnect")}</Button>
: <Button id={this.props.vmName + "-serialconsole-connect"} variant="secondary" onClick={() => this.createChannel(this.props.spawnArgs)}>{_("Connect")}</Button>
}
</div>
- <div id={pid} className="vm-terminal pf-c-console__serial">
+ <div id={pid} className="vm-terminal pf-v5-c-console__serial">
{t}
</div>
</>
Index: cockpit-machines-292/src/components/vm/disks/diskEdit.jsx
===================================================================
--- cockpit-machines-292.orig/src/components/vm/disks/diskEdit.jsx
+++ cockpit-machines-292/src/components/vm/disks/diskEdit.jsx
@@ -60,7 +60,7 @@ const CacheRow = ({ onValueChanged, dial
label={_("Cache")}
labelIcon={!shutoff &&
<Popover bodyContent={_("Machine must be shut off before changing cache mode")}>
- <button onClick={e => e.preventDefault()} className="pf-c-form__group-label-help">
+ <button onClick={e => e.preventDefault()} className="pf-v5-c-form__group-label-help">
<InfoAltIcon noVerticalAlign />
</button>
</Popover>}>
@@ -90,7 +90,7 @@ const BusRow = ({ onValueChanged, dialog
<FormGroup fieldId={`${idPrefix}-bus-type`} label={_("Bus")}
labelIcon={!shutoff &&
<Popover bodyContent={_("Machine must be shut off before changing bus type")}>
- <button onClick={e => e.preventDefault()} className="pf-c-form__group-label-help">
+ <button onClick={e => e.preventDefault()} className="pf-v5-c-form__group-label-help">
<InfoAltIcon noVerticalAlign />
</button>
</Popover>}>
Index: cockpit-machines-292/src/components/vm/filesystems/vmFilesystemsCard.jsx
===================================================================
--- cockpit-machines-292.orig/src/components/vm/filesystems/vmFilesystemsCard.jsx
+++ cockpit-machines-292/src/components/vm/filesystems/vmFilesystemsCard.jsx
@@ -205,7 +205,7 @@ const VmFilesystemAddModal = ({ connecti
labelIcon={
<Popover headerContent={_("The host path that is to be exported.")}>
<button aria-label={_("More info for source path field")}
- className="pf-c-form__group-label-help"
+ className="pf-v5-c-form__group-label-help"
onClick={e => e.preventDefault()}
type="button">
<HelpIcon noVerticalAlign />
@@ -224,7 +224,7 @@ const VmFilesystemAddModal = ({ connecti
labelIcon={
<Popover headerContent={_("The tag name to be used by the guest to mount this export point.")}>
<button aria-label={_("More info for mount tag field")}
- className="pf-c-form__group-label-help"
+ className="pf-v5-c-form__group-label-help"
onClick={e => e.preventDefault()}
type="button">
<HelpIcon noVerticalAlign />
Index: cockpit-machines-292/src/components/vm/filesystems/vmFilesystemsCard.scss
===================================================================
--- cockpit-machines-292.orig/src/components/vm/filesystems/vmFilesystemsCard.scss
+++ cockpit-machines-292/src/components/vm/filesystems/vmFilesystemsCard.scss
@@ -1,4 +1,4 @@
// PF4 sets some border to <pre> - remove this rule once we drop PF3 dependency
-pre.pf-c-code-block__pre {
+pre.pf-v5-c-code-block__pre {
border: unset;
}
Index: cockpit-machines-292/src/components/vm/hostdevs/hostDevAdd.scss
===================================================================
--- cockpit-machines-292.orig/src/components/vm/hostdevs/hostDevAdd.scss
+++ cockpit-machines-292/src/components/vm/hostdevs/hostDevAdd.scss
@@ -1,10 +1,10 @@
-.pf-c-table.vm-device-table {
+.pf-v5-c-table.vm-device-table {
/* Set overflow with a limiter on the list, so it scrolls instead of the dialog */
max-height: min(50vh, 50rem);
overflow: auto;
/* The list is used within a table; remove excess padding */
th {
- --pf-c-table--m-compact-th--PaddingTop: 0;
+ --pf-v5-c-table--m-compact-th--PaddingTop: 0;
}
}
Index: cockpit-machines-292/src/components/vm/nics/nicBody.jsx
===================================================================
--- cockpit-machines-292.orig/src/components/vm/nics/nicBody.jsx
+++ cockpit-machines-292/src/components/vm/nics/nicBody.jsx
@@ -174,7 +174,7 @@ export const NetworkTypeAndSourceRow = (
</p>
</TextContent>))}
</Flex>}>
- <button onClick={e => e.preventDefault()} className="pf-c-form__group-label-help">
+ <button onClick={e => e.preventDefault()} className="pf-v5-c-form__group-label-help">
<OutlinedQuestionCircleIcon />
</button>
</Popover>
Index: cockpit-machines-292/src/components/vm/overview/bootOrder.css
===================================================================
--- cockpit-machines-292.orig/src/components/vm/overview/bootOrder.css
+++ cockpit-machines-292/src/components/vm/overview/bootOrder.css
@@ -14,7 +14,7 @@
/* Patternfly horizontal lists should convert to vertical in small screens https://github.com/patternfly/patternfly/issues/3630 */
@media (max-width: 640px) {
- .boot-order-additional-info .pf-c-description-list {
- --pf-c-description-list__group--GridTemplateColumns: var(--pf-c-description-list--m-vertical__group--GridTemplateColumns);
+ .boot-order-additional-info .pf-v5-c-description-list {
+ --pf-v5-c-description-list__group--GridTemplateColumns: var(--pf-v5-c-description-list--m-vertical__group--GridTemplateColumns);
}
}
Index: cockpit-machines-292/src/components/vm/overview/cpuModal.jsx
===================================================================
--- cockpit-machines-292.orig/src/components/vm/overview/cpuModal.jsx
+++ cockpit-machines-292/src/components/vm/overview/cpuModal.jsx
@@ -229,7 +229,7 @@ export const CPUModal = ({ vm, maxVcpu,
<Popover bodyContent={maxVcpu
? cockpit.format(_("Maximum number of virtual CPUs allocated for the guest OS, which must be between 1 and $0"), parseInt(maxVcpu))
: _("Maximum number of virtual CPUs allocated for the guest OS")}>
- <button onClick={e => e.preventDefault()} className="pf-c-form__group-label-help">
+ <button onClick={e => e.preventDefault()} className="pf-v5-c-form__group-label-help">
<HelpIcon noVerticalAlign />
</button>
</Popover>}>
@@ -250,7 +250,7 @@ export const CPUModal = ({ vm, maxVcpu,
<FormGroup fieldId="machines-vcpu-count-field" label={_("vCPU count")}
labelIcon={
<Popover bodyContent={_("Fewer than the maximum number of virtual CPUs should be enabled.")}>
- <button onClick={e => e.preventDefault()} className="pf-c-form__group-label-help">
+ <button onClick={e => e.preventDefault()} className="pf-v5-c-form__group-label-help">
<HelpIcon noVerticalAlign />
</button>
</Popover>}>
@@ -271,7 +271,7 @@ export const CPUModal = ({ vm, maxVcpu,
<FormGroup fieldId="sockets" label={_("Sockets")}
labelIcon={
<Popover bodyContent={_("Preferred number of sockets to expose to the guest.")}>
- <button onClick={e => e.preventDefault()} className="pf-c-form__group-label-help">
+ <button onClick={e => e.preventDefault()} className="pf-v5-c-form__group-label-help">
<HelpIcon noVerticalAlign />
</button>
</Popover>}>
Index: cockpit-machines-292/src/components/vm/overview/memorySelectRow.css
===================================================================
--- cockpit-machines-292.orig/src/components/vm/overview/memorySelectRow.css
+++ cockpit-machines-292/src/components/vm/overview/memorySelectRow.css
@@ -1,3 +1,3 @@
-.memory-slider .pf-c-slider__step-label {
+.memory-slider .pf-v5-c-slider__step-label {
min-width: 5ch;
}
Index: cockpit-machines-292/src/components/vm/overview/vmOverviewCard.jsx
===================================================================
--- cockpit-machines-292.orig/src/components/vm/overview/vmOverviewCard.jsx
+++ cockpit-machines-292/src/components/vm/overview/vmOverviewCard.jsx
@@ -212,7 +212,7 @@ class VmOverviewCard extends React.Compo
<Popover alertSeverityVariant="info"
position="right"
bodyContent={WATCHDOG_INFO_MESSAGE}>
- <button onClick={e => e.preventDefault()} className="pf-c-form__group-label-help">
+ <button onClick={e => e.preventDefault()} className="pf-v5-c-form__group-label-help">
<Icon className="overview-icon" status="info">
<HelpIcon noVerticalAlign />
</Icon>
@@ -244,7 +244,7 @@ class VmOverviewCard extends React.Compo
</Flex>
}
hasAutoWidth>
- <button onClick={e => e.preventDefault()} className="pf-c-form__group-label-help">
+ <button onClick={e => e.preventDefault()} className="pf-v5-c-form__group-label-help">
<Icon className="overview-icon" status="info">
<HelpIcon noVerticalAlign />
</Icon>
Index: cockpit-machines-292/src/components/vm/overview/vsock.scss
===================================================================
--- cockpit-machines-292.orig/src/components/vm/overview/vsock.scss
+++ cockpit-machines-292/src/components/vm/overview/vsock.scss
@@ -1,6 +1,6 @@
.ct-input-group-spacer-sm.pf-l-flex {
// Limit width for select entries and inputs in the input groups otherwise they take up the whole space
- > .pf-c-select, .pf-c-form-control:not(.pf-c-select__toggle-typeahead) {
+ > .pf-v5-c-select, .pf-v5-c-form-control:not(.pf-v5-c-select__toggle-typeahead) {
max-width: 8ch;
}
}
Index: cockpit-machines-292/src/components/vm/vmDetailsPage.scss
===================================================================
--- cockpit-machines-292.orig/src/components/vm/vmDetailsPage.scss
+++ cockpit-machines-292/src/components/vm/vmDetailsPage.scss
@@ -1,6 +1,6 @@
@import "ct-card.scss";
-.vm-details .pf-c-card {
+.vm-details .pf-v5-c-card {
@extend .ct-card;
}
@@ -8,8 +8,8 @@
font-size: var(--pf-global--FontSize--2xl);
padding: 0;
- > .pf-c-button__icon {
- font-size: var(--pf-c-button--FontSize);
+ > .pf-v5-c-button__icon {
+ font-size: var(--pf-v5-c-button--FontSize);
}
}
@@ -48,7 +48,7 @@
grid-column: 1 / -1;
}
- .pf-c-card {
+ .pf-v5-c-card {
&__header {
font-size: var(--pf-global--FontSize--xl);
}
@@ -60,7 +60,7 @@
}
}
- .pf-c-progress {
- --pf-c-progress--GridGap: var(--pf-global--spacer--xs);
+ .pf-v5-c-progress {
+ --pf-v5-c-progress--GridGap: var(--pf-global--spacer--xs);
}
}
Index: cockpit-machines-292/src/components/vm/vmMigrateDialog.jsx
===================================================================
--- cockpit-machines-292.orig/src/components/vm/vmMigrateDialog.jsx
+++ cockpit-machines-292/src/components/vm/vmMigrateDialog.jsx
@@ -71,7 +71,7 @@ const DurationRow = ({ temporary, setTem
<p>{_("A copy of the VM will run on the destination and will disappear when it is shut off. Meanwhile, the origin host keeps its copy of the VM configuration.")}</p>
</FlexItem>
</Flex>}>
- <button onClick={e => e.preventDefault()} className="pf-c-form__group-label-help">
+ <button onClick={e => e.preventDefault()} className="pf-v5-c-form__group-label-help">
<OutlinedQuestionCircleIcon />
</button>
</Popover>
@@ -102,7 +102,7 @@ const StorageRow = ({ storage, setStorag
<p>{_("Full disk images and the domain's memory will be migrated. Only non-shared, writable disk images will be transferred. Unused storage will remain on the origin after migration.")}</p>
</FlexItem>
</Flex>}>
- <button onClick={e => e.preventDefault()} className="pf-c-form__group-label-help">
+ <button onClick={e => e.preventDefault()} className="pf-v5-c-form__group-label-help">
<OutlinedQuestionCircleIcon />
</button>
</Popover>
Index: cockpit-machines-292/src/components/vms/hostvmslist.scss
===================================================================
--- cockpit-machines-292.orig/src/components/vms/hostvmslist.scss
+++ cockpit-machines-292/src/components/vms/hostvmslist.scss
@@ -2,14 +2,14 @@
@import "@patternfly/patternfly/base/patternfly-variables.scss";
/* Style the list cards as ct-cards */
-.pf-c-page__main-section .pf-c-card {
+.pf-v5-c-page__main-section .pf-v5-c-card {
@extend .ct-card;
}
// PF4 issue https://github.com/patternfly/patternfly-react/issues/4612
-// Mimic .pf-c-table__action
+// Mimic .pf-v5-c-table__action
#virtual-machines-listing td:last-child {
- --pf-c-table--cell--Width: 1%;
+ --pf-v5-c-table--cell--Width: 1%;
}
// Expand the link to the container, for easier clickability
@@ -21,6 +21,6 @@
/* Add the missing space when the list's toolbar wraps
* patternfly/patternfly#3348
*/
-.pf-c-toolbar__content-section {
+.pf-v5-c-toolbar__content-section {
gap: var(--pf-global--spacer--sm) 0;
}
Index: cockpit-machines-292/src/machines.scss
===================================================================
--- cockpit-machines-292.orig/src/machines.scss
+++ cockpit-machines-292/src/machines.scss
@@ -7,31 +7,33 @@
@import "@patternfly/patternfly/sass-utilities/colors.scss";
@import "@patternfly/patternfly/sass-utilities/scss-variables.scss";
@import "@patternfly/patternfly/sass-utilities/mixins.scss";
+ // for $alert
+@import "@patternfly/patternfly/sass-utilities/component-namespaces.scss";
@import "@patternfly/patternfly/components/Alert/alert.scss";
/* Utilities */
@import "@patternfly/patternfly/utilities/Text/text.css";
/* Style the list cards as ct-cards */
-.pf-c-page__main-section > .pf-c-card {
+.pf-v5-c-page__main-section > .pf-v5-c-card {
@extend .ct-card;
}
-.pf-c-form__group .pf-c-helper-text {
- margin-top: var(--pf-c-form__helper-text--MarginTop);
+.pf-v5-c-form__group .pf-v5-c-helper-text {
+ margin-top: var(--pf-v5-c-form__helper-text--MarginTop);
}
/* Create a hybrid popover with an alert style */
-.ct-popover-alert .pf-c-popover__content {
- @extend .pf-c-alert;
+.ct-popover-alert .pf-v5-c-popover__content {
+ @extend .pf-v5-c-alert;
@extend .pf-m-danger;
display: block;
box-shadow: none;
}
/* Also style the hybrid popover alert title like an alert */
-.ct-popover-alert .pf-c-title {
- @extend .pf-c-alert__title;
+.ct-popover-alert .pf-v5-c-title {
+ @extend .pf-v5-c-alert__title;
font-size: inherit;
}
@@ -56,27 +58,27 @@
margin: 0.25rem 0 0.25rem 0.5rem;
}
-.machines-listing-actions > .pf-c-dropdown {
+.machines-listing-actions > .pf-v5-c-dropdown {
margin-top: 0.25rem;
}
-.pf-c-dropdown__menu-item.pf-m-danger {
+.pf-v5-c-dropdown__menu-item.pf-m-danger {
color: var(--pf-global--danger-color--200);
}
-.pf-c-table {
+.pf-v5-c-table {
.btn-group {
align-items: center;
}
- > tbody > tr:not(.pf-c-table__expandable-row) > [data-label="Actions"] .pf-c-button {
+ > tbody > tr:not(.pf-v5-c-table__expandable-row) > [data-label="Actions"] .pf-v5-c-button {
// vertical: compensate for padding; fixing alignment
// horizontal: add some needed padding
margin: -0.25rem 0.25rem;
}
}
-.machines-connection-selector > .pf-c-radio:first-child {
+.machines-connection-selector > .pf-v5-c-radio:first-child {
padding-right: var(--pf-global--spacer--md);
}
@@ -85,7 +87,7 @@
max-width: 5rem;
}
-.ct-external-docs-link.pf-c-button.pf-m-link.pf-m-inline {
+.ct-external-docs-link.pf-v5-c-button.pf-m-link.pf-m-inline {
padding-left: var(--pf-global--spacer--sm);
}
@@ -94,19 +96,19 @@
}
// Do not add a box-shadow to a "subsection", while it's technically correct it looks weird.
-.pf-c-page__main-section.pf-m-light.actions-pagesection {
+.pf-v5-c-page__main-section.pf-m-light.actions-pagesection {
box-shadow: none;
}
.virtualization-disabled-empty-state {
// Use a max width of 60 0-characters across and let it size for mobile too
- --pf-c-empty-state__content--MaxWidth: min(60ch, 100%);
+ --pf-v5-c-empty-state__content--MaxWidth: min(60ch, 100%);
}
// Can be removed once https://github.com/cockpit-project/cockpit/pull/18694 is included in the used pkg/lib
.pf-theme-dark {
- .pf-c-page__main-group section {
- --pf-c-page__main-breadcrumb--BackgroundColor: var(--pf-global--BackgroundColor--dark-100);
+ .pf-v5-c-page__main-group section {
+ --pf-v5-c-page__main-breadcrumb--BackgroundColor: var(--pf-global--BackgroundColor--dark-100);
background-color: var(--pf-global--BackgroundColor--dark-100);
}
}
Index: cockpit-machines-292/test/check-machines-consoles
===================================================================
--- cockpit-machines-292.orig/test/check-machines-consoles
+++ cockpit-machines-292/test/check-machines-consoles
@@ -47,10 +47,10 @@ class TestMachinesConsoles(VirtualMachin
self.goToVmPage("subVmTest1")
# since VNC is not defined for this VM, the view for "Desktop Viewer" is rendered by default
- b.wait_in_text(".pf-c-console__manual-connection dl > div:first-child dd", "127.0.0.1")
- b.wait_in_text(".pf-c-console__manual-connection dl > div:nth-child(2) dd", "5900")
+ b.wait_in_text(".pf-v5-c-console__manual-connection dl > div:first-child dd", "127.0.0.1")
+ b.wait_in_text(".pf-v5-c-console__manual-connection dl > div:nth-child(2) dd", "5900")
- b.click(".pf-c-console__remote-viewer-launch-vv") # "Launch Remote Viewer" button
+ b.click(".pf-v5-c-console__remote-viewer-launch-vv") # "Launch Remote Viewer" button
b.wait_visible("#dynamically-generated-file") # is .vv file generated for download?
self.assertEqual(b.attr("#dynamically-generated-file", "href"),
u"data:application/x-virt-viewer,%5Bvirt-viewer%5D%0Atype%3Dspice%0Ahost%3D127.0.0.1%0Aport%3D5900%0Adelete-this-file%3D1%0Afullscreen%3D0%0A")
@@ -63,8 +63,8 @@ class TestMachinesConsoles(VirtualMachin
b.click("button:contains(Expand)")
# Check "More information"
- b.click('.pf-c-console__remote-viewer .pf-c-expandable-section__toggle')
- b.wait_in_text('.pf-c-expandable-section__content',
+ b.click('.pf-v5-c-console__remote-viewer .pf-v5-c-expandable-section__toggle')
+ b.wait_in_text('.pf-v5-c-expandable-section__content',
'Clicking "Launch remote viewer" will download')
b.assert_pixels("#vm-subVmTest1-consoles-page", "vm-details-console-external", skip_layouts=["rtl"])
@@ -85,7 +85,7 @@ class TestMachinesConsoles(VirtualMachin
self.goToVmPage("subVmTest1")
# since VNC is defined for this VM, the view for "In-Browser Viewer" is rendered by default
- b.wait_visible(".pf-c-console__vnc canvas")
+ b.wait_visible(".pf-v5-c-console__vnc canvas")
# make sure the log file is full - then empty it and reboot the VM - the log file should fill up again
self.waitCirrOSBooted(args['logfile'])
@@ -112,10 +112,10 @@ class TestMachinesConsoles(VirtualMachin
self.goToVmPage(name)
b.wait_in_text(f"#vm-{name}-system-state", "Running")
- b.click("#pf-c-console__type-selector")
- b.wait_visible("#pf-c-console__type-selector + .pf-c-select__menu")
+ b.click("#pf-v5-c-console__type-selector")
+ b.wait_visible("#pf-v5-c-console__type-selector + .pf-v5-c-select__menu")
b.click("#SerialConsole button")
- b.wait_not_present("#pf-c-console__type-selector + .pf-c-select__menu")
+ b.wait_not_present("#pf-v5-c-console__type-selector + .pf-v5-c-select__menu")
b.wait_in_text(f"#{name}-terminal .xterm-accessibility-tree", f"Connected to domain '{name}'")
@@ -138,15 +138,15 @@ class TestMachinesConsoles(VirtualMachin
b.click("button:contains(Expand)")
b.assert_pixels("#vm-vmWithSerialConsole-consoles-page", "vm-details-console-serial",
- ignore=[".pf-c-console__vnc"], skip_layouts=["rtl"])
+ ignore=[".pf-v5-c-console__vnc"], skip_layouts=["rtl"])
# Add a second serial console
m.execute("virsh destroy vmWithSerialConsole; virt-xml --add-device vmWithSerialConsole --console pty,target_type=virtio; virsh start vmWithSerialConsole")
- b.click("#pf-c-console__type-selector")
- b.wait_visible("#pf-c-console__type-selector + .pf-c-select__menu")
+ b.click("#pf-v5-c-console__type-selector")
+ b.wait_visible("#pf-v5-c-console__type-selector + .pf-v5-c-select__menu")
b.click("li:contains('Serial console (console0)') button")
b.wait(lambda: m.execute("ps aux | grep 'virsh -c qemu:///system console vmWithSerialConsole console0'"))
- b.click("#pf-c-console__type-selector")
+ b.click("#pf-v5-c-console__type-selector")
b.click("li:contains('Serial console (console1)') button")
b.wait(lambda: m.execute("ps aux | grep 'virsh -c qemu:///system console vmWithSerialConsole console1'"))
@@ -160,8 +160,8 @@ class TestMachinesConsoles(VirtualMachin
m.execute("virsh start vmWithSerialConsole")
for i in range(0, 6):
- b.click("#pf-c-console__type-selector")
- b.wait_visible("#pf-c-console__type-selector + .pf-c-select__menu")
+ b.click("#pf-v5-c-console__type-selector")
+ b.wait_visible("#pf-v5-c-console__type-selector + .pf-v5-c-select__menu")
b.click(f'li:contains(\'Serial console ({"serial" if i == 0 else "console"}{i})\') button')
b.wait(lambda: m.execute(f'ps aux | grep \'virsh -c qemu:///system console vmWithSerialConsole {"serial" if i == 0 else "console"}{i}\''))
@@ -187,22 +187,22 @@ class TestMachinesConsoles(VirtualMachin
# test switching console from serial to graphical
b.wait_visible(f"#vm-{name}-consoles")
- b.wait_visible(".pf-c-console__vnc canvas")
+ b.wait_visible(".pf-v5-c-console__vnc canvas")
- b.click("#pf-c-console__type-selector")
- b.wait_visible("#pf-c-console__type-selector + .pf-c-select__menu")
+ b.click("#pf-v5-c-console__type-selector")
+ b.wait_visible("#pf-v5-c-console__type-selector + .pf-v5-c-select__menu")
b.click("#SerialConsole button")
- b.wait_not_present("#pf-c-console__type-selector + .pf-c-select__menu")
+ b.wait_not_present("#pf-v5-c-console__type-selector + .pf-v5-c-select__menu")
- b.wait_not_present(".pf-c-console__vnc canvas")
+ b.wait_not_present(".pf-v5-c-console__vnc canvas")
b.wait_visible(f"#{name}-terminal")
# Go back to Vnc console
- b.click("#pf-c-console__type-selector")
- b.wait_visible("#pf-c-console__type-selector + .pf-c-select__menu")
+ b.click("#pf-v5-c-console__type-selector")
+ b.wait_visible("#pf-v5-c-console__type-selector + .pf-v5-c-select__menu")
b.click("#VncConsole button")
- b.wait_not_present("#pf-c-console__type-selector + .pf-c-select__menu")
- b.wait_visible(".pf-c-console__vnc canvas")
+ b.wait_not_present("#pf-v5-c-console__type-selector + .pf-v5-c-select__menu")
+ b.wait_visible(".pf-v5-c-console__vnc canvas")
# Go to the expanded console view
b.click("button:contains(Expand)")
Index: cockpit-machines-292/test/check-machines-create
===================================================================
--- cockpit-machines-292.orig/test/check-machines-create
+++ cockpit-machines-292/test/check-machines-create
@@ -870,9 +870,9 @@ vnc_password= "{vnc_passwd}"
b.wait_visible("#create-vm-dialog")
if self.sourceType == 'disk_image':
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Import a virtual machine")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Import a virtual machine")
else:
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Create new virtual machine")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Create new virtual machine")
if self.os_name is not None:
# remove os codename from os name, e.g.: 'bullseye' in 'Debian 11 (bullseye)'
@@ -1028,7 +1028,7 @@ vnc_password= "{vnc_passwd}"
def checkOsSorted(self, sorted_list):
b = self.browser
- b.click("#os-select-group .pf-c-select .pf-c-button")
+ b.click("#os-select-group .pf-v5-c-select .pf-v5-c-button")
# Find the first OS from the sorted list, and get a text of it's next neighbour
next_os = b.text(f"#os-select-group li:contains({sorted_list[0]}) + li")
@@ -1044,9 +1044,9 @@ vnc_password= "{vnc_passwd}"
def createAndVerifyVirtInstallArgsCloudInit(self):
if self.create_and_run:
- self.browser.click(".pf-c-modal-box__footer button:contains(Create and run)")
+ self.browser.click(".pf-v5-c-modal-box__footer button:contains(Create and run)")
else:
- self.browser.click(".pf-c-modal-box__footer button:contains(Create and edit)")
+ self.browser.click(".pf-v5-c-modal-box__footer button:contains(Create and edit)")
self.browser.wait_not_present("#create-vm-dialog")
if self.create_and_run:
@@ -1096,9 +1096,9 @@ vnc_password= "{vnc_passwd}"
m = self.machine
if self.create_and_run:
- self.browser.click(".pf-c-modal-box__footer button:contains(Create and run)")
+ self.browser.click(".pf-v5-c-modal-box__footer button:contains(Create and run)")
else:
- self.browser.click(".pf-c-modal-box__footer button:contains(Create and edit)")
+ self.browser.click(".pf-v5-c-modal-box__footer button:contains(Create and edit)")
self.browser.wait_not_present("#create-vm-dialog")
self.browser.wait_text(f"#vm-{self.name}-{self.connection}-state", "Shut off")
@@ -1119,9 +1119,9 @@ vnc_password= "{vnc_passwd}"
def createAndVerifyVirtInstallArgsUnattended(self):
if self.create_and_run:
- self.browser.click(".pf-c-modal-box__footer button:contains(Create and run)")
+ self.browser.click(".pf-v5-c-modal-box__footer button:contains(Create and run)")
else:
- self.browser.click(".pf-c-modal-box__footer button:contains(Create and edit)")
+ self.browser.click(".pf-v5-c-modal-box__footer button:contains(Create and edit)")
self.browser.wait_not_present("#create-vm-dialog")
if self.storage_pool != NO_STORAGE:
self.goToVmPage(self.name)
@@ -1245,7 +1245,7 @@ vnc_password= "{vnc_passwd}"
def cancel(self, force=False):
b = self.browser
if b.is_present("#create-vm-dialog"):
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
b.wait_not_present("#create-vm-dialog")
elif force:
raise Exception("There is no dialog to cancel")
@@ -1257,31 +1257,31 @@ vnc_password= "{vnc_passwd}"
if create:
if self.sourceType == 'disk_image':
if self.create_and_run:
- b.click(".pf-c-modal-box__footer button:contains(Import and run)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Import and run)")
else:
- b.click(".pf-c-modal-box__footer button:contains(Import and edit)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Import and edit)")
else:
if self.create_and_run:
- b.click(".pf-c-modal-box__footer button:contains(Create and run)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Create and run)")
else:
- b.click(".pf-c-modal-box__footer button:contains(Create and edit)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Create and edit)")
for error, error_msg in errors.items():
if is_warning:
- error_location = f".pf-c-modal-box__body #{error}-group .pf-c-form__helper-text .pf-m-warning"
+ error_location = f".pf-v5-c-modal-box__body #{error}-group .pf-v5-c-form__helper-text .pf-m-warning"
else:
- error_location = f".pf-c-modal-box__body #{error}-group .pf-c-form__helper-text .pf-m-error"
+ error_location = f".pf-v5-c-modal-box__body #{error}-group .pf-v5-c-form__helper-text .pf-m-error"
b.wait_visible(error_location)
if (error_msg):
b.wait_in_text(error_location, error_msg)
if create:
if self.sourceType == 'disk_image':
- b.wait_visible(".pf-c-modal-box__footer button:contains(Import and run)[aria-disabled=true]")
- b.wait_visible(".pf-c-modal-box__footer button:contains(Import and edit)[aria-disabled=true]")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Import and run)[aria-disabled=true]")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Import and edit)[aria-disabled=true]")
else:
- b.wait_visible(".pf-c-modal-box__footer button:contains(Create and run)[aria-disabled=true]")
- b.wait_visible(".pf-c-modal-box__footer button:contains(Create and edit)[aria-disabled=true]")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Create and run)[aria-disabled=true]")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Create and edit)[aria-disabled=true]")
return self
@@ -1299,11 +1299,11 @@ vnc_password= "{vnc_passwd}"
', '.join(errors), b.text(error_location)))
if self.create_and_run:
- b.click(".pf-c-modal-box__footer button:contains(Create and run)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Create and run)")
else:
- b.click(".pf-c-modal-box__footer button:contains(Create and edit)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Create and edit)")
- error_location = ".pf-c-modal-box__footer div.pf-c-alert"
+ error_location = ".pf-v5-c-modal-box__footer div.pf-v5-c-alert"
try:
with b.wait_timeout(10):
@@ -1318,7 +1318,7 @@ vnc_password= "{vnc_passwd}"
raise
else:
# then error should be shown in the notification area
- error_location = ".pf-c-alert-group li .pf-c-alert"
+ error_location = ".pf-v5-c-alert-group li .pf-v5-c-alert"
with b.wait_timeout(20):
b.wait_visible(error_location)
b.wait_in_text("button.alert-link.more-button", "show more")
@@ -1326,8 +1326,8 @@ vnc_password= "{vnc_passwd}"
waitForError(errors, error_location)
# Close the notification
- b.click(".pf-c-alert-group li .pf-c-alert button.pf-m-plain")
- b.wait_not_present(".pf-c-alert-group li .pf-c-alert")
+ b.click(".pf-v5-c-alert-group li .pf-v5-c-alert button.pf-m-plain")
+ b.wait_not_present(".pf-v5-c-alert-group li .pf-v5-c-alert")
return self
@@ -1486,14 +1486,14 @@ vnc_password= "{vnc_passwd}"
b = self.browser
if dialog.sourceType == 'disk_image':
if dialog.create_and_run:
- b.click(".pf-c-modal-box__footer button:contains(Import and run)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Import and run)")
else:
- b.click(".pf-c-modal-box__footer button:contains(Import and edit)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Import and edit)")
else:
if dialog.create_and_run:
- b.click(".pf-c-modal-box__footer button:contains(Create and run)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Create and run)")
else:
- b.click(".pf-c-modal-box__footer button:contains(Create and edit)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Create and edit)")
final_state = "Running" if dialog.create_and_run else "Shut off"
# Test dowloading RHEL image shows the progress of the download
@@ -1504,9 +1504,9 @@ vnc_password= "{vnc_passwd}"
# Progress is shown in VM state in VMs list
self.assertRegex(b.text(f"#vm-{dialog.name}-{dialog.connection}-state"), r"^.*[0-9][0-9]?%$|^100%$")
else:
- b.wait_in_text(".pf-c-empty-state__content", "Downloading image")
+ b.wait_in_text(".pf-v5-c-empty-state__content", "Downloading image")
# Progress is shown at VM page empty state
- self.assertRegex(b.text(".pf-c-empty-state__body .pf-c-progress__status"), r"^[0-9][0-9]?%$|^100%$")
+ self.assertRegex(b.text(".pf-v5-c-empty-state__body .pf-v5-c-progress__status"), r"^[0-9][0-9]?%$|^100%$")
b.wait_in_text(f"#vm-{dialog.name}-{dialog.connection}-state", final_state)
b.wait_not_present("#create-vm-dialog")
@@ -1559,7 +1559,7 @@ vnc_password= "{vnc_passwd}"
m.execute("virsh net-destroy default")
b.wait_in_text(f"#vm-{name}-{connection}-state", "Shut off")
b.wait_visible(f"#vm-{name}-{connection}-install")
- b.wait_in_text(".pf-c-alert", "failed to get installed")
+ b.wait_in_text(".pf-v5-c-alert", "failed to get installed")
# can reattempt installation
b.wait_visible(f"#vm-{name}-{connection}-install")
# can't run, as it is still in install phase
@@ -1620,7 +1620,7 @@ vnc_password= "{vnc_passwd}"
memory_text = "/ " + f"{dialog.memory_size / 1024:.1f}".rstrip('.0') + " GiB"
else:
memory_text = "/ " + f"{dialog.memory_size:.1f}".rstrip('.0') + f" {dialog.memory_size_unit}"
- b.wait_in_text(".memory-usage-chart .pf-c-progress__status > .pf-c-progress__measure", memory_text)
+ b.wait_in_text(".memory-usage-chart .pf-v5-c-progress__status > .pf-v5-c-progress__measure", memory_text)
# check disks
# Test disk got imported/created
@@ -1657,7 +1657,7 @@ vnc_password= "{vnc_passwd}"
else:
raise AssertionError("Unknown disk device")
else:
- b.wait_in_text(f"#vm-{name}-disks .pf-c-empty-state", "No disks defined")
+ b.wait_in_text(f"#vm-{name}-disks .pf-v5-c-empty-state", "No disks defined")
b.click(f"#vm-{name}-disks-adddisk")
b.click(f"#vm-{name}-disks-adddisk-dialog-cancel")
return self
@@ -1690,15 +1690,15 @@ vnc_password= "{vnc_passwd}"
# wait until virt-install process is finished
wait(lambda: "virt-install" not in self.machine.execute("ps aux | grep '[v]irt-install --connect' || true"))
- b.wait_in_text("#virtual-machines-listing .pf-c-empty-state", "No VM is running")
+ b.wait_in_text("#virtual-machines-listing .pf-v5-c-empty-state", "No VM is running")
# wait for the vm and disks to be deleted
self.machine.execute("until test -z $(virsh list --all --name); do sleep 1; done")
self.machine.execute("until test -z $(ls /home/admin/.local/share/libvirt/images/ 2>/dev/null); do sleep 1; done")
# When we delete a VM while virt-install is running there will be an error
- while (b.is_present(".pf-c-alert-group li")):
- b.click(".pf-c-alert-group li:first-of-type .pf-c-alert button.pf-m-plain")
- b.wait_not_present(".pf-c-alert-group")
+ while (b.is_present(".pf-v5-c-alert-group li")):
+ b.click(".pf-v5-c-alert-group li:first-of-type .pf-v5-c-alert button.pf-m-plain")
+ b.wait_not_present(".pf-v5-c-alert-group")
return self
@@ -1765,8 +1765,8 @@ vnc_password= "{vnc_passwd}"
b.wait_in_text("#token-helper-message", error_msg)
b.wait_in_text("#token-helper-message", "Get a new RHSM token")
if create_disabled:
- b.wait_visible(".pf-c-modal-box__footer button:contains(Create and run)[aria-disabled=true]")
- b.wait_visible(".pf-c-modal-box__footer button:contains(Create and edit)[aria-disabled=true]")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Create and run)[aria-disabled=true]")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Create and edit)[aria-disabled=true]")
dialog.cancel()
@@ -1869,7 +1869,7 @@ vnc_password= "{vnc_passwd}"
dialog.open() \
.fill() \
- b.click(".pf-c-modal-box__footer button:contains(Create and edit)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Create and edit)")
b.wait_not_present("#create-vm-dialog")
wait(lambda: "<cockpit_machines:os_variant>fedora28</cockpit_machines:os_variant>" in m.execute("virsh dumpxml VmNotInstalled"), delay=3)
@@ -1888,11 +1888,11 @@ vnc_password= "{vnc_passwd}"
b.set_input_text("#vm-VmNotInstalled-memory-modal-memory", "130")
b.blur("#vm-VmNotInstalled-memory-modal-memory")
b.click("#vm-VmNotInstalled-memory-modal-save")
- b.wait_not_present(".pf-c-modal-box__body")
+ b.wait_not_present(".pf-v5-c-modal-box__body")
# Change vCPUs setting
b.click("#vm-VmNotInstalled-cpu button")
- b.wait_visible(".pf-c-modal-box__body")
+ b.wait_visible(".pf-v5-c-modal-box__body")
b.set_input_text("#machines-vcpu-max-field input", "8")
b.blur("#machines-vcpu-max-field")
b.set_input_text("#machines-vcpu-count-field input", "2")
@@ -1901,16 +1901,16 @@ vnc_password= "{vnc_passwd}"
b.select_from_dropdown("#coresSelect", "2")
b.select_from_dropdown("#threadsSelect", "2")
b.click("#machines-cpu-modal-dialog-apply")
- b.wait_not_present(".pf-c-modal-box__body")
+ b.wait_not_present(".pf-v5-c-modal-box__body")
# Change Boot Order setting
bootOrder = b.text("#vm-VmNotInstalled-boot-order")
b.click("#vm-VmNotInstalled-boot-order button")
- b.wait_visible(".pf-c-modal-box__body")
+ b.wait_visible(".pf-v5-c-modal-box__body")
b.set_checked("#vm-VmNotInstalled-order-modal-device-1-checkbox", True)
b.click("#vm-VmNotInstalled-order-modal-device-row-0 #vm-VmNotInstalled-order-modal-down")
b.click("#vm-VmNotInstalled-order-modal-save")
- b.wait_not_present(".pf-c-modal-box__body")
+ b.wait_not_present(".pf-v5-c-modal-box__body")
# Attach some interface
m.execute("virsh attach-interface --persistent VmNotInstalled bridge virbr0")
@@ -1920,10 +1920,10 @@ vnc_password= "{vnc_passwd}"
# Change the os boot firmware configuration
b.wait_in_text("#vm-VmNotInstalled-firmware", "BIOS")
b.click("#vm-VmNotInstalled-firmware")
- b.wait_visible(".pf-c-modal-box__body")
- b.select_from_dropdown(".pf-c-modal-box__body select", "efi")
+ b.wait_visible(".pf-v5-c-modal-box__body")
+ b.select_from_dropdown(".pf-v5-c-modal-box__body select", "efi")
b.click("#firmware-dialog-apply")
- b.wait_not_present(".pf-c-modal-box__body")
+ b.wait_not_present(".pf-v5-c-modal-box__body")
b.wait_in_text("#vm-VmNotInstalled-firmware", "UEFI")
# Temporarily delete the OVMF binary and check the firmware options again
@@ -1944,7 +1944,7 @@ vnc_password= "{vnc_passwd}"
b.enter_page('/machines')
b.mouse("#vm-VmNotInstalled-firmware-tooltip", "mouseenter")
- b.wait_in_text(".pf-c-tooltip", "Libvirt did not detect any UEFI/OVMF firmware image installed on the host")
+ b.wait_in_text(".pf-v5-c-tooltip", "Libvirt did not detect any UEFI/OVMF firmware image installed on the host")
b.mouse("#vm-VmNotInstalled-firmware-tooltip", "mouseleave")
b.wait_not_present("#missing-uefi-images")
m.execute("umount " + ovmf_path)
@@ -1967,18 +1967,18 @@ vnc_password= "{vnc_passwd}"
b.wait_val("#vm-VmNotInstalled-memory-modal-max-memory", "150")
b.wait_val("#vm-VmNotInstalled-memory-modal-memory", "130")
b.click("#vm-VmNotInstalled-memory-modal-cancel")
- b.wait_not_present(".pf-c-modal-box__body")
+ b.wait_not_present(".pf-v5-c-modal-box__body")
# Check vCPU settings have persisted
b.click("#vm-VmNotInstalled-cpu button")
- b.wait_visible(".pf-c-modal-box__body")
+ b.wait_visible(".pf-v5-c-modal-box__body")
b.wait_val("#machines-vcpu-max-field input", "8")
b.wait_val("#machines-vcpu-count-field input", "2")
b.wait_val("#socketsSelect", "2")
b.wait_val("#coresSelect", "2")
b.wait_val("#threadsSelect", "2")
b.click("#machines-cpu-modal-dialog-cancel")
- b.wait_not_present(".pf-c-modal-box__body")
+ b.wait_not_present(".pf-v5-c-modal-box__body")
# Check changed boot order have persisted
b.wait_text_not("#vm-VmNotInstalled-boot-order", bootOrder)
@@ -2017,7 +2017,7 @@ vnc_password= "{vnc_passwd}"
create_and_run=False)
dialog.open().fill()
- b.click(".pf-c-modal-box__footer #create-and-edit")
+ b.click(".pf-v5-c-modal-box__footer #create-and-edit")
b.wait_not_present("#create-vm-dialog")
self.waitVmPage("VmNotInstalledBios")
@@ -2025,10 +2025,10 @@ vnc_password= "{vnc_passwd}"
# Show and keep the os boot firmware configuration
b.wait_in_text("#vm-VmNotInstalledBios-firmware", "BIOS")
b.click("#vm-VmNotInstalledBios-firmware")
- b.wait_visible(".pf-c-modal-box__body")
- b.wait_val(".pf-c-modal-box__body select", "bios")
+ b.wait_visible(".pf-v5-c-modal-box__body")
+ b.wait_val(".pf-v5-c-modal-box__body select", "bios")
b.click("#firmware-dialog-apply")
- b.wait_not_present(".pf-c-modal-box__body")
+ b.wait_not_present(".pf-v5-c-modal-box__body")
b.wait_in_text("#vm-VmNotInstalledBios-firmware", "BIOS")
# Install the VM
@@ -2068,8 +2068,8 @@ vnc_password= "{vnc_passwd}"
os_short_id=config.RHEL_8_1_SHORTID) \
.open() \
.fill()
- b.wait_visible(".pf-c-modal-box__footer button:contains(Create and run)[aria-disabled=false]")
- b.wait_visible(".pf-c-modal-box__footer button:contains(Create and edit)[aria-disabled=false]")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Create and run)[aria-disabled=false]")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Create and edit)[aria-disabled=false]")
dialog.cancel()
runner.checkDialogErrorTest(TestMachinesCreate.VmDialog(self, sourceType='os',
Index: cockpit-machines-292/test/check-machines-disks
===================================================================
--- cockpit-machines-292.orig/test/check-machines-disks
+++ cockpit-machines-292/test/check-machines-disks
@@ -85,7 +85,7 @@ class TestMachinesDisks(VirtualMachinesC
def save(target, xfail=None):
b.click(f"#vm-subVmTest1-disks-{target}-edit-dialog-save")
if xfail:
- b.wait_in_text(f"#vm-subVmTest1-disks-{target}-edit-dialog .pf-c-alert", xfail)
+ b.wait_in_text(f"#vm-subVmTest1-disks-{target}-edit-dialog .pf-v5-c-alert", xfail)
else:
b.wait_not_present(f"#vm-subVmTest1-disks-{target}-edit-dialog")
@@ -117,7 +117,7 @@ class TestMachinesDisks(VirtualMachinesC
# Test close button
open("vdg")
- b.click("#vm-subVmTest1-disks-vdg-edit-dialog > .pf-c-modal-box__close button")
+ b.click("#vm-subVmTest1-disks-vdg-edit-dialog > .pf-v5-c-modal-box__close button")
b.wait_not_present("#vm-subVmTest1-disks-vdg-edit-dialog")
# Test qcow2 disk has only readonly attribute configurable
@@ -194,7 +194,7 @@ class TestMachinesDisks(VirtualMachinesC
save("sdb", "readonly sata disks are not supported")
cancel("sdb")
open("sdb")
- b.wait_not_present("#vm-subVmTest1-disks-sdb-edit-dialog .pf-c-alert")
+ b.wait_not_present("#vm-subVmTest1-disks-sdb-edit-dialog .pf-v5-c-alert")
cancel("sdb")
# Virtio bus type should not be shown for CDROM devices
@@ -279,7 +279,7 @@ class TestMachinesDisks(VirtualMachinesC
b.select_from_dropdown("#vm-subVmTest1-disks-adddisk-existing-select-pool", "images")
b.select_from_dropdown("#vm-subVmTest1-disks-adddisk-existing-select-volume", "subVmTest2-2.img")
b.wait_in_text("#vm-subVmTest1-disks-adddisk-existing-select-volume-helper", "used by subVmTest2")
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
# Test remove disk - by external action
m.execute("virsh detach-disk subVmTest1 vdc")
@@ -352,7 +352,7 @@ class TestMachinesDisks(VirtualMachinesC
b = self.test_obj.browser
prefix = f"#vm-{self.vm_name}-disks-{self.target}-insert"
b.click(prefix) # button
- b.wait_in_text(".pf-c-modal-box__title", "Insert disc media")
+ b.wait_in_text(".pf-v5-c-modal-box__title", "Insert disc media")
b.wait_visible(f"{prefix}-dialog-adddisk-custompath:checked")
if self.mode == "use-existing":
@@ -377,13 +377,13 @@ class TestMachinesDisks(VirtualMachinesC
def insert(self):
b = self.test_obj.browser
- b.click(".pf-c-modal-box__footer button:contains(Insert)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Insert)")
return self
def verify(self):
b = self.test_obj.browser
- b.wait_not_present(".pf-c-modal-box")
+ b.wait_not_present(".pf-v5-c-modal-box")
disks = self._get_disks()
@@ -408,7 +408,7 @@ class TestMachinesDisks(VirtualMachinesC
def eject(self):
b = self.test_obj.browser
b.click(f"#vm-{self.vm_name}-disks-{self.target}-eject-button") # button
- b.wait_in_text(".pf-c-modal-box__title", "Eject disc from VM")
+ b.wait_in_text(".pf-v5-c-modal-box__title", "Eject disc from VM")
if self.mode == "custom-path":
b.wait_in_text(f"#vm-{self.vm_name}-disks-{self.target}-modal-description-file", self.file_path)
@@ -416,8 +416,8 @@ class TestMachinesDisks(VirtualMachinesC
b.wait_in_text(f"#vm-{self.vm_name}-disks-{self.target}-modal-description-pool dd", self.pool_name)
b.wait_in_text(f"#vm-{self.vm_name}-disks-{self.target}-modal-description-volume dd", self.volume_name)
- b.click(".pf-c-modal-box__footer button:contains(Eject)")
- b.wait_not_present(".pf-c-modal-box")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Eject)")
+ b.wait_not_present(".pf-v5-c-modal-box")
return self
@@ -426,7 +426,7 @@ class TestMachinesDisks(VirtualMachinesC
m = self.test_obj.machine
b.click(f"#vm-{self.vm_name}-disks-{self.target}-eject-button") # button
- b.wait_in_text(".pf-c-modal-box__title", "Eject disc from VM")
+ b.wait_in_text(".pf-v5-c-modal-box__title", "Eject disc from VM")
# "Force eject" button is only shown if regular ejection fail
# This might be a bit dirty, but one easy way to cause regular ejection to
@@ -434,11 +434,11 @@ class TestMachinesDisks(VirtualMachinesC
# This will return "domain is not running" failure, but that's fine, as we
# offer "Force eject" option after any kind of failure
m.execute(f"virsh destroy {self.vm_name}")
- b.click(".pf-c-modal-box__footer button:contains(Eject)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Eject)")
# Check "Force eject" is present and Regular eject is disabled
- b.wait_visible(".pf-c-modal-box__footer button:contains(Eject):disabled")
- b.wait_visible(".pf-c-modal-box__footer button:contains(Force eject)")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Eject):disabled")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Force eject)")
# Start the VM again so "Force eject" will work
m.execute(f"virsh start {self.vm_name}")
@@ -449,8 +449,8 @@ class TestMachinesDisks(VirtualMachinesC
m.spawn("dbus-monitor --system \"interface='org.libvirt.Domain',member='UpdateDevice'\" > /tmp/dbus_monitor_logs", "dbusmonitor")
# Force eject the disc
- b.click(".pf-c-modal-box__footer button:contains(Force eject)")
- b.wait_not_present(".pf-c-modal-box")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Force eject)")
+ b.wait_not_present(".pf-v5-c-modal-box")
# Check dbus call was called with "VIR_DOMAIN_DEVICE_MODIFY_FORCE" flag
# Flag 'uint32 7' is a logical OR of flags:
@@ -563,14 +563,14 @@ class TestMachinesDisks(VirtualMachinesC
if self.xfail_object:
self.test_obj.browser.wait_in_text(f"{prefix}-{self.xfail_object}-helper.pf-m-error", self.xfail_error_message)
else:
- self.test_obj.browser.wait_in_text(".pf-c-modal-box__body .pf-c-alert__title", self.xfail_error_title)
+ self.test_obj.browser.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-alert__title", self.xfail_error_title)
self.test_obj.browser.click(f"{prefix}-dialog-cancel")
def open(self):
b = self.test_obj.browser
prefix = f"#vm-{self.vm_name}-disks-adddisk"
b.click(prefix) # button
- b.wait_in_text(".pf-c-modal-box__title", "Add disk")
+ b.wait_in_text(".pf-v5-c-modal-box__title", "Add disk")
b.wait_visible(f"{prefix}-createnew:checked")
if self.mode == "use-existing":
@@ -590,7 +590,7 @@ class TestMachinesDisks(VirtualMachinesC
else:
b.click(f"#vm-{self.vm_name}-disks-adddisk-new-select-pool")
# Our custom select does not respond on the click function
- b._wait_present(f".pf-c-modal-box option[value={self.pool_name}]:disabled")
+ b._wait_present(f".pf-v5-c-modal-box option[value={self.pool_name}]:disabled")
return self
# Insert name for the new volume
@@ -626,8 +626,8 @@ class TestMachinesDisks(VirtualMachinesC
# Expand additional options
if self.cache_mode or self.bus_type or self.serial:
- b.click("div.pf-c-modal-box button:contains(Show additional options)")
- b.wait_visible("div.pf-c-modal-box button[aria-expanded=true]:contains(Hide additional options)")
+ b.click("div.pf-v5-c-modal-box button:contains(Show additional options)")
+ b.wait_visible("div.pf-v5-c-modal-box button[aria-expanded=true]:contains(Hide additional options)")
# Configure performance options
if self.cache_mode:
@@ -635,7 +635,7 @@ class TestMachinesDisks(VirtualMachinesC
# Configure bus type
if self.bus_type:
- b.select_from_dropdown(f"div.pf-c-modal-box #vm-{self.vm_name}-disks-adddisk-bus-type", self.bus_type)
+ b.select_from_dropdown(f"div.pf-v5-c-modal-box #vm-{self.vm_name}-disks-adddisk-bus-type", self.bus_type)
# Configure serial number
if self.serial:
@@ -647,22 +647,22 @@ class TestMachinesDisks(VirtualMachinesC
b.wait_val(f"#vm-{self.vm_name}-disks-adddisk-serial", self.expected_serial)
if self.xwarning_object == 'serial-characters':
- b.wait_in_text("#serial-characters-message .pf-c-helper-text__item-text", self.xwarning_message)
+ b.wait_in_text("#serial-characters-message .pf-v5-c-helper-text__item-text", self.xwarning_message)
elif self.xwarning_object == 'serial-length':
- b.wait_in_text("#serial-length-message .pf-c-helper-text__item-text", self.xwarning_message)
+ b.wait_in_text("#serial-length-message .pf-v5-c-helper-text__item-text", self.xwarning_message)
else:
b.wait_not_present("#serial-length-message")
b.wait_not_present("#serial-characters-message")
else:
b.wait_not_visible("#cache-mode")
- b.wait_not_visible(f"div.pf-c-modal-box #vm-{self.vm_name}-disks-adddisk-bus-type")
+ b.wait_not_visible(f"div.pf-v5-c-modal-box #vm-{self.vm_name}-disks-adddisk-bus-type")
b.wait_not_visible(f"#vm-{self.vm_name}-disks-adddisk-serial")
return self
def add_disk(self):
b = self.test_obj.browser
- b.click(".pf-c-modal-box__footer button:contains(Add)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Add)")
return self
@@ -690,7 +690,7 @@ class TestMachinesDisks(VirtualMachinesC
# Check volume was added to pool's volume list
if self.mode == "create-new":
self.test_obj.goToMainPage()
- b.click(".pf-c-card .pf-c-card__header button:contains(Storage pool)")
+ b.click(".pf-v5-c-card .pf-v5-c-card__header button:contains(Storage pool)")
self.test_obj.waitPoolRow(self.pool_name)
self.test_obj.togglePoolRow(self.pool_name)
@@ -846,7 +846,7 @@ class TestMachinesDisks(VirtualMachinesC
volume_size_unit='MiB',
expected_target=get_next_free_target(used_targets)[-1],
pixel_test_tag='vm-add-disk-modal-nfs',
- pixel_test_ignore='.pf-c-modal-box__footer', # FIXME: The buttons size seems to change undeterministically
+ pixel_test_ignore='.pf-v5-c-modal-box__footer', # FIXME: The buttons size seems to change undeterministically
).execute()
self.VMAddDiskDialog(
@@ -905,7 +905,7 @@ class TestMachinesDisks(VirtualMachinesC
volume_size_unit='MiB',
expected_target=get_next_free_target(used_targets)[-1],
pixel_test_tag='vm-add-disk-modal-disk-pool',
- pixel_test_ignore='.pf-c-modal-box__footer', # FIXME: The buttons size seems to change undeterministically
+ pixel_test_ignore='.pf-v5-c-modal-box__footer', # FIXME: The buttons size seems to change undeterministically
).execute()
self.VMAddDiskDialog(
@@ -1164,7 +1164,7 @@ class TestMachinesDisks(VirtualMachinesC
xfail_error_message='Importing an image with a backing file is unsupported',
).execute()
# Image can't be added, close dialog
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
# non iso file
self.VMAddDiskDialog(
@@ -1204,7 +1204,7 @@ class TestMachinesDisks(VirtualMachinesC
self,
mode='custom-path'
).open()
- b.click(f"{prefix}-file .pf-c-select__toggle-button")
+ b.click(f"{prefix}-file .pf-v5-c-select__toggle-button")
b.wait_visible(f"{prefix}-file-autocomplete")
b.key_press(chr(40), use_ord=True)
b.focus(f"{prefix}-file-autocomplete li:first-child")
@@ -1240,7 +1240,7 @@ class TestMachinesDisks(VirtualMachinesC
b.click(prefix)
b.click(f"{prefix}-custompath")
b.select_from_dropdown(f"{prefix}-select-device", "disk")
- b.click("div.pf-c-modal-box button:contains(Show additional options)")
+ b.click("div.pf-v5-c-modal-box button:contains(Show additional options)")
b.wait_visible(f"{prefix}-bus-type[data-value=ide]")
def testAddDiskAdditionalOptions(self):
@@ -1436,12 +1436,12 @@ class TestMachinesDisks(VirtualMachinesC
b.click("#vm-subVmTest1-disks-vdc-action-kebab button")
b.wait_visible("#delete-vm-subVmTest1-disks-vdc")
b.click("#delete-vm-subVmTest1-disks-vdc")
- b.wait_visible(".pf-c-modal-box")
- b.wait_in_text(".pf-c-modal-box__body .pf-c-description-list", "subVmTest1")
+ b.wait_visible(".pf-v5-c-modal-box")
+ b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-description-list", "subVmTest1")
b.wait_in_text("#delete-resource-modal-target", "vdc")
b.wait_in_text("#delete-resource-modal-file", vdc_path)
b.click("#delete-resource-modal-primary")
- b.wait_not_present(".pf-c-modal-box")
+ b.wait_not_present(".pf-v5-c-modal-box")
# Wait for underlying VM's OS to detach the disk
wait(lambda: "vdc" not in m.execute("virsh domblklist subVmTest1"), delay=1)
b.wait_not_present("#vm-subVmTest1-disks-vdc-device")
@@ -1458,10 +1458,10 @@ class TestMachinesDisks(VirtualMachinesC
b.click("#delete-vm-subVmTest1-disks-vdd")
b.wait_in_text("#delete-resource-modal-target", "vdd")
b.wait_in_text("#delete-resource-modal-file", vdd_path)
- b.wait_visible(".pf-c-modal-box")
+ b.wait_visible(".pf-v5-c-modal-box")
b.click("#delete-resource-modal-primary")
b.wait_not_present("#vm-subVmTest1-disks-vdd-device")
- b.wait_not_present(".pf-c-modal-box")
+ b.wait_not_present(".pf-v5-c-modal-box")
# Test detaching several disks and the deletion dialog can be closed correctly
m.execute("virsh vol-create-as myPoolOne diskVirtio --capacity 1M --format qcow2")
@@ -1523,12 +1523,12 @@ class TestMachinesDisks(VirtualMachinesC
if removeFileFail:
# Check Toast notification is present
- b.wait_visible(".pf-c-alert.pf-m-warning")
- b.wait_in_text(".pf-c-alert.pf-m-warning .pf-c-alert__title", "Could not delete")
+ b.wait_visible(".pf-v5-c-alert.pf-m-warning")
+ b.wait_in_text(".pf-v5-c-alert.pf-m-warning .pf-v5-c-alert__title", "Could not delete")
# Cleanup Toast notification
- b.click(".pf-c-alert-group li:first-of-type .pf-c-alert button.pf-m-plain")
+ b.click(".pf-v5-c-alert-group li:first-of-type .pf-v5-c-alert button.pf-m-plain")
- b.wait_not_present(".pf-c-alert.pf-m-warning")
+ b.wait_not_present(".pf-v5-c-alert.pf-m-warning")
# Verify correctness of disk file
if path:
@@ -1569,9 +1569,9 @@ class TestMachinesDisks(VirtualMachinesC
b.click("#vm-subVmTest1-disks-vdc-action-kebab button")
b.wait_visible("#vm-subVmTest1-disks-vdc-device")
b.click("#delete-vm-subVmTest1-disks-vdc")
- b.wait_visible(".pf-c-modal-box")
+ b.wait_visible(".pf-v5-c-modal-box")
b.click("#delete-resource-modal-primary")
- b.wait_not_present(".pf-c-modal-box")
+ b.wait_not_present(".pf-v5-c-modal-box")
wait(lambda: "vdc" not in m.execute("virsh domblklist subVmTest1"), delay=1)
b.wait_not_present("#vm-subVmTest1-disks-vdc-device")
Index: cockpit-machines-292/test/check-machines-filesystems
===================================================================
--- cockpit-machines-292.orig/test/check-machines-filesystems
+++ cockpit-machines-292/test/check-machines-filesystems
@@ -65,7 +65,7 @@ class TestMachinesFilesystems(VirtualMac
b.click("#vm-subVmTest1-filesystems-add")
b.set_file_autocomplete_val("#vm-subVmTest1-filesystems-modal-source-group", "/tmp/dir1/")
b.set_input_text("#vm-subVmTest1-filesystems-modal-mountTag", "dir1")
- b.click(".pf-c-expandable-section__toggle")
+ b.click(".pf-v5-c-expandable-section__toggle")
b.wait_visible("#vm-subVmTest1-filesystems-modal-xattr:not(:checked)")
b.set_checked("#vm-subVmTest1-filesystems-modal-xattr", True)
@@ -87,7 +87,7 @@ class TestMachinesFilesystems(VirtualMac
b.click("#vm-subVmTest1-filesystems-add")
b.set_file_autocomplete_val("#vm-subVmTest1-filesystems-modal-source-group", "/tmp/dir2/")
b.set_input_text("#vm-subVmTest1-filesystems-modal-mountTag", "dir2")
- b.click(".pf-c-expandable-section__toggle")
+ b.click(".pf-v5-c-expandable-section__toggle")
b.set_checked("#vm-subVmTest1-filesystems-modal-xattr", False)
b.click("#vm-subVmTest1-filesystems-modal-add")
@@ -106,8 +106,8 @@ class TestMachinesFilesystems(VirtualMac
b.set_input_text("#vm-subVmTest1-filesystems-modal-mountTag", "dir1")
b.click("#vm-subVmTest1-filesystems-modal-add")
if m.image not in ['debian-stable']:
- b.wait_in_text(".pf-c-alert", "Failed to add shared directory")
- b.wait_in_text(".pf-c-alert", "filesystem target 'dir1' specified twice")
+ b.wait_in_text(".pf-v5-c-alert", "Failed to add shared directory")
+ b.wait_in_text(".pf-v5-c-alert", "filesystem target 'dir1' specified twice")
b.click("#vm-subVmTest1-filesystems-modal-cancel")
else:
# Due to a libvirt < 7.5.0 bug this will be actually added without an error:
@@ -140,7 +140,7 @@ class TestMachinesFilesystems(VirtualMac
m.execute("virt-xml subVmTest1 --add-device --filesystem source=/tmp/dir1/,target=dir1")
b.wait_visible("tr[data-row-id='vm-subVmTest1-filesystem-/tmp/dir1/-dir1']")
b.click("tr[data-row-id='vm-subVmTest1-filesystem-/tmp/dir1/-dir1'] button:contains(Remove)")
- b.wait_in_text(".pf-c-modal-box__body .pf-c-description-list", "removed from subVmTest1")
+ b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-description-list", "removed from subVmTest1")
b.wait_in_text("#delete-resource-modal-source-path", "/tmp/dir1/")
b.wait_in_text("#delete-resource-modal-mount-tag", "dir1")
Index: cockpit-machines-292/test/check-machines-hostdevs
===================================================================
--- cockpit-machines-292.orig/test/check-machines-hostdevs
+++ cockpit-machines-292/test/check-machines-hostdevs
@@ -54,7 +54,7 @@ class TestMachinesHostDevs(VirtualMachin
self.goToVmPage("subVmTest1")
- b.wait_in_text("#vm-subVmTest1-hostdevs .pf-c-empty-state__body", "No host devices assigned to this VM")
+ b.wait_in_text("#vm-subVmTest1-hostdevs .pf-v5-c-empty-state__body", "No host devices assigned to this VM")
# Test hot plug of USB host device
# A usb device might not always be present
@@ -161,28 +161,28 @@ class TestMachinesHostDevs(VirtualMachin
def open(self):
b.wait_not_present(f"#vm-subVmTest1-hostdev-{self.vm_dev_id}-product")
b.click("button#vm-subVmTest1-hostdevs-add")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Add host device")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Add host device")
if connectionName != "session":
- b.assert_pixels(".pf-c-modal-box", "vm-hostdevs-add-dialog", skip_layouts=["rtl"])
+ b.assert_pixels(".pf-v5-c-modal-box", "vm-hostdevs-add-dialog", skip_layouts=["rtl"])
def fill(self):
b.click(f"input#{self.dev_type}")
- b.set_checked(f".pf-c-table input[name='checkrow{self.dev_id}']", True)
+ b.set_checked(f".pf-v5-c-table input[name='checkrow{self.dev_id}']", True)
self._model = b.text(f"#vm-subVmTest1-hostdevs-dialog table tbody tr:nth-child({self.dev_id + 1}) td:nth-child(2)")
self._vendor = b.text(f"#vm-subVmTest1-hostdevs-dialog table tbody tr:nth-child({self.dev_id + 1}) td:nth-child(3)")
if self.dev_type == "pci":
self._slot = b.text(f"#vm-subVmTest1-hostdevs-dialog table tbody tr:nth-child({self.dev_id + 1}) td:nth-child(4) dd")
def cancel(self):
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
b.wait_not_present("#vm-subVmTest1-hostdevs-dialog")
def add(self):
self.run_admin(f"virsh -c qemu:///{connectionName} dumpxml subVmTest1 > /tmp/vmdir/vmxml1", connectionName)
- b.click(".pf-c-modal-box__footer button:contains(Add)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Add)")
if self.fail_message:
- b.wait_in_text(".pf-c-modal-box__body .pf-c-alert__title", self.fail_message)
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-alert__title", self.fail_message)
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
b.wait_not_present("#vm-subVmTest1-hostdevs-dialog")
def verify(self):
@@ -227,12 +227,12 @@ class TestMachinesHostDevs(VirtualMachin
def remove(self):
b.click(f"#delete-vm-subVmTest1-hostdev-{self.vm_dev_id}")
- b.wait_in_text(".pf-c-modal-box__body .pf-c-description-list", "subVmTest1")
+ b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-description-list", "subVmTest1")
if (self._model != "(Undefined)"):
b.wait_in_text("#delete-resource-modal-product", self._model)
b.wait_in_text("#delete-resource-modal-vendor", self._vendor)
- b.click('.pf-c-modal-box__footer button:contains("Remove")')
+ b.click('.pf-v5-c-modal-box__footer button:contains("Remove")')
b.wait_not_present(f"#vm-subVmTest1-hostdev-{self.vm_dev_id}-product")
# Check the error if selecting no devices when the VM is running
@@ -285,13 +285,13 @@ class TestMachinesHostDevs(VirtualMachin
b.wait_not_present("#vm-subVmTest1-hostdev-1-product")
b.click("button#vm-subVmTest1-hostdevs-add")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Add host device")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Add host device")
b.click("input#pci")
- b.set_checked(".pf-c-table input[name='checkrow0']", True)
+ b.set_checked(".pf-v5-c-table input[name='checkrow0']", True)
slot1 = b.text("#vm-subVmTest1-hostdevs-dialog table tbody tr:nth-child(1) td:nth-child(4) dd")
- b.set_checked(".pf-c-table input[name='checkrow1']", True)
+ b.set_checked(".pf-v5-c-table input[name='checkrow1']", True)
slot2 = b.text("#vm-subVmTest1-hostdevs-dialog table tbody tr:nth-child(2) td:nth-child(4) dd")
# PCI devies will be sorted in the UI by slot
@@ -299,7 +299,7 @@ class TestMachinesHostDevs(VirtualMachin
(slot1, slot2) = (slot2, slot1)
self.run_admin(f"virsh -c qemu:///{connectionName} dumpxml subVmTest1 > /tmp/vmdir/vmxml1", connectionName)
- b.click(".pf-c-modal-box__footer button:contains(Add)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Add)")
b.wait_not_present("#vm-subVmTest1-hostdevs-dialog")
b.wait_visible("#vm-subVmTest1-hostdev-1-product")
Index: cockpit-machines-292/test/check-machines-lifecycle
===================================================================
--- cockpit-machines-292.orig/test/check-machines-lifecycle
+++ cockpit-machines-292/test/check-machines-lifecycle
@@ -84,7 +84,7 @@ class TestMachinesLifecycle(VirtualMachi
if expect_empty_list:
with b.wait_timeout(20):
- b.wait_in_text("#virtual-machines-listing .pf-c-empty-state", "No VM is running")
+ b.wait_in_text("#virtual-machines-listing .pf-v5-c-empty-state", "No VM is running")
return
self.waitPageInit()
self.waitVmRow("subVmTest1")
@@ -108,7 +108,7 @@ class TestMachinesLifecycle(VirtualMachi
m.execute("virt-xml subVmTest1 --edit --watchdog action=pause")
b.wait_visible("#vm-subVmTest1-needs-shutdown")
b.click("#vm-subVmTest1-needs-shutdown")
- b.wait_in_text(".pf-c-popover__body", message)
+ b.wait_in_text(".pf-v5-c-popover__body", message)
m.execute("virt-xml subVmTest1 --remove-device --watchdog 1 --update")
checkConnectionDescription("#import-existing-vm", "Ideal for server VMs")
@@ -121,8 +121,8 @@ class TestMachinesLifecycle(VirtualMachi
b.assert_pixels("#vm-details", "vm-details", ignore=[
".memory-usage-chart",
".vcpu-usage-chart",
- "#vm-subVmTest1-disks .pf-c-card__body",
- "#vm-subVmTest1-networks .pf-c-card__body"
+ "#vm-subVmTest1-disks .pf-v5-c-card__body",
+ "#vm-subVmTest1-networks .pf-v5-c-card__body"
])
b.wait_in_text("#vm-subVmTest1-cpu", "1 vCPU")
@@ -132,13 +132,13 @@ class TestMachinesLifecycle(VirtualMachi
# switch to and check Usage
b.click("#vm-subVmTest1-usage")
- b.wait_in_text(".memory-usage-chart .pf-c-progress__status > .pf-c-progress__measure", "128 MiB")
- b.wait_not_in_text(".memory-usage-chart .pf-c-progress__status > .pf-c-progress__measure", "0 /")
- usage = b.text(".memory-usage-chart .pf-c-progress__status > .pf-c-progress__measure").split("/ 128 MiB")[0]
+ b.wait_in_text(".memory-usage-chart .pf-v5-c-progress__status > .pf-v5-c-progress__measure", "128 MiB")
+ b.wait_not_in_text(".memory-usage-chart .pf-v5-c-progress__status > .pf-v5-c-progress__measure", "0 /")
+ usage = b.text(".memory-usage-chart .pf-v5-c-progress__status > .pf-v5-c-progress__measure").split("/ 128 MiB")[0]
wait(lambda: float(usage) > 0.0, delay=3)
- b.wait_in_text(".vcpu-usage-chart .pf-c-progress__status > .pf-c-progress__measure", "1 vCPU")
- usage = b.text(".vcpu-usage-chart .pf-c-progress__status > .pf-c-progress__measure").split("% of 1 vCPU")[0]
+ b.wait_in_text(".vcpu-usage-chart .pf-v5-c-progress__status > .pf-v5-c-progress__measure", "1 vCPU")
+ usage = b.text(".vcpu-usage-chart .pf-v5-c-progress__status > .pf-v5-c-progress__measure").split("% of 1 vCPU")[0]
# CPU usage cannot be nonzero with blank image, so just ensure it's a percentage
wait(lambda: float(usage) <= 100.0, delay=3)
@@ -199,15 +199,15 @@ class TestMachinesLifecycle(VirtualMachi
self.performAction("subVmTest1", "forceOff")
# continue shut off validation - usage should drop to zero
- b.wait_in_text(".memory-usage-chart .pf-c-progress__status > .pf-c-progress__measure", "0 /")
- b.wait_in_text(".vcpu-usage-chart .pf-c-progress__status > .pf-c-progress__measure", "0%")
+ b.wait_in_text(".memory-usage-chart .pf-v5-c-progress__status > .pf-v5-c-progress__measure", "0 /")
+ b.wait_in_text(".vcpu-usage-chart .pf-v5-c-progress__status > .pf-v5-c-progress__measure", "0%")
# shut off of a transient VM will redirect us to the main page
m.execute("virsh dumpxml subVmTest1 > /tmp/subVmTest1.xml")
m.execute("virsh start {0}; virsh undefine {0}".format("subVmTest1"))
b.wait_visible("div[data-vm-transient=\"true\"]")
self.performAction("subVmTest1", "forceOff", checkExpectedState=False)
- b.wait_in_text("#virtual-machines-listing .pf-c-empty-state", "No VM is running")
+ b.wait_in_text("#virtual-machines-listing .pf-v5-c-empty-state", "No VM is running")
m.execute("virsh define --file /tmp/subVmTest1.xml")
# start another one, should appear automatically
@@ -269,13 +269,13 @@ class TestMachinesLifecycle(VirtualMachi
# Try to run subVmTest1 - it will fail because of inactive default network
tryRunDomain(1, 'subVmTest1', 'system')
b.click('#vm-subVmTest1-system-state button:contains("view more")')
- b.wait_in_text(".pf-c-popover", "VM subVmTest1 failed to start")
+ b.wait_in_text(".pf-v5-c-popover", "VM subVmTest1 failed to start")
b.click('#vm-subVmTest1-system-state button[aria-label=Close]')
# Try to run subVmTest2
tryRunDomain(2, 'subVmTest2', 'system')
b.click('#vm-subVmTest2-system-state button:contains("view more")')
- b.wait_in_text(".pf-c-popover", "VM subVmTest2 failed to start")
+ b.wait_in_text(".pf-v5-c-popover", "VM subVmTest2 failed to start")
b.click('#vm-subVmTest2-system-state button[aria-label=Close]')
def testCloneSessionConnection(self):
@@ -296,9 +296,9 @@ class TestMachinesLifecycle(VirtualMachi
self.performAction("subVmTest1", "clone", connectionName=connectionName)
- b.wait_text(".pf-c-modal-box__title-text", "Create a clone VM based on subVmTest1")
+ b.wait_text(".pf-v5-c-modal-box__title-text", "Create a clone VM based on subVmTest1")
b.click("footer button.pf-m-primary")
- b.wait_not_present(".pf-c-modal-box")
+ b.wait_not_present(".pf-v5-c-modal-box")
self.waitVmRow("subVmTest1-clone", connectionName=connectionName)
def testRename(self):
@@ -322,7 +322,7 @@ class TestMachinesLifecycle(VirtualMachi
b.set_input_text("#rename-dialog-new-name", "new")
b.click("#rename-dialog-confirm")
- b.wait_in_text(".pf-c-modal-box__body .pf-c-alert.pf-m-danger", "Can't rename domain to itself")
+ b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-alert.pf-m-danger", "Can't rename domain to itself")
self.goToVmPage("new")
self.performAction("new", "rename")
@@ -378,7 +378,7 @@ class TestMachinesLifecycle(VirtualMachi
self.performAction(name, "delete")
- b.wait_visible(f"#vm-{name}-delete-modal-dialog .pf-c-modal-box__body:contains(The VM {name} is running)")
+ b.wait_visible(f"#vm-{name}-delete-modal-dialog .pf-v5-c-modal-box__body:contains(The VM {name} is running)")
b.wait_visible(f"#vm-{name}-delete-modal-dialog ul li:first-child .disk-source-file:contains({img2})")
# virsh attach-disk does not create disks of type volume
b.wait_visible(f"#vm-{name}-delete-modal-dialog .disk-source-volume:contains({secondDiskVolName})")
@@ -455,7 +455,7 @@ class TestMachinesLifecycle(VirtualMachi
b.wait_visible(f"#vm-{name}-delete-modal-dialog")
m.execute(f"virsh snapshot-delete --domain {name} --snapshotname snapshotFails")
b.click(f"#vm-{name}-delete-modal-dialog button:contains(Delete)")
- b.wait_in_text(f"#vm-{name}-delete-modal-dialog .pf-c-alert__description", "Domain snapshot not found")
+ b.wait_in_text(f"#vm-{name}-delete-modal-dialog .pf-v5-c-alert__description", "Domain snapshot not found")
b.click(f"#vm-{name}-delete-modal-dialog button:contains(Cancel)")
m.execute(f"virsh undefine {name}")
@@ -505,13 +505,13 @@ class TestMachinesLifecycle(VirtualMachi
# Check VM got deleted, but there is a warning about unsuccessful storage deletion
self.waitVmRow(name, present=False)
wait(lambda: name not in m.execute("virsh list --all --name"))
- b.wait_visible(".pf-c-alert-group li .pf-c-alert")
- b.wait_in_text(".pf-c-alert-group li .pf-c-alert .pf-c-alert__title", f"Could not delete all storage for {name}")
+ b.wait_visible(".pf-v5-c-alert-group li .pf-v5-c-alert")
+ b.wait_in_text(".pf-v5-c-alert-group li .pf-v5-c-alert .pf-v5-c-alert__title", f"Could not delete all storage for {name}")
b.click("button.alert-link.more-button")
- b.wait_in_text(".pf-c-alert-group li .pf-c-alert .pf-c-alert__description", args['image'])
- b.wait_in_text(".pf-c-alert-group li .pf-c-alert .pf-c-alert__description", secondDiskVolName)
+ b.wait_in_text(".pf-v5-c-alert-group li .pf-v5-c-alert .pf-v5-c-alert__description", args['image'])
+ b.wait_in_text(".pf-v5-c-alert-group li .pf-v5-c-alert .pf-v5-c-alert__description", secondDiskVolName)
# Close the notification
- b.click(".pf-c-alert-group li .pf-c-alert button.pf-m-plain")
+ b.click(".pf-v5-c-alert-group li .pf-v5-c-alert button.pf-m-plain")
# Delete a shut-off guest and verify the storage was removed
name = "vm-shutoff"
Index: cockpit-machines-292/test/check-machines-migrate
===================================================================
--- cockpit-machines-292.orig/test/check-machines-migrate
+++ cockpit-machines-292/test/check-machines-migrate
@@ -190,7 +190,7 @@ class TestMachinesMigration(VirtualMachi
b.click("#migrate-button")
if fail:
with b.wait_timeout(120):
- b.wait_visible(".pf-c-modal-box__body .pf-c-alert .pf-c-alert__title:contains('Migration failed')")
+ b.wait_visible(".pf-v5-c-modal-box__body .pf-v5-c-alert .pf-v5-c-alert__title:contains('Migration failed')")
if fail == "libvirtd":
machine2.execute(f"systemctl start {self.getLibvirtServiceName()}.service")
Index: cockpit-machines-292/test/check-machines-networks
===================================================================
--- cockpit-machines-292.orig/test/check-machines-networks
+++ cockpit-machines-292/test/check-machines-networks
@@ -65,7 +65,7 @@ class TestMachinesNetworks(VirtualMachin
m.execute(f"echo \"{TEST_NETWORK4_XML}\" > /tmp/xml; virsh net-create /tmp/xml")
# Click on Networks card
- b.click(".pf-c-card .pf-c-card__header button:contains(Networks)")
+ b.click(".pf-v5-c-card .pf-v5-c-card__header button:contains(Networks)")
# Check that all networks are there
b.wait_in_text("body", "Networks")
@@ -127,8 +127,8 @@ class TestMachinesNetworks(VirtualMachin
self.waitPageInit()
# Click on Networks card
- b.wait_in_text("#card-pf-networks .pf-c-card__header button", "Network")
- b.click(".pf-c-card .pf-c-card__header button:contains(Network)")
+ b.wait_in_text("#card-pf-networks .pf-v5-c-card__header button", "Network")
+ b.click(".pf-v5-c-card .pf-v5-c-card__header button:contains(Network)")
class NetworkCreateDialog(object):
def __init__(
@@ -168,7 +168,7 @@ class TestMachinesNetworks(VirtualMachin
def open(self):
b.click("#create-network")
b.wait_visible("#create-network-dialog")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Create virtual network")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Create virtual network")
def fill(self):
b.set_input_text("#create-network-name", self.name)
@@ -199,22 +199,22 @@ class TestMachinesNetworks(VirtualMachin
b.set_input_text("#create-network-ipv6-dhcp-range-end", self.ipv6_dhcp_end)
def cancel(self):
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
b.wait_not_present("#create-network-dialog")
def create(self):
- b.click(".pf-c-modal-box__footer button:contains(Create)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Create)")
if (self.xfail):
# Check incomplete dialog
if "body" in self.xfail_objects:
- error_location = "#create-network-dialog .pf-c-modal-box__body .pf-m-danger"
+ error_location = "#create-network-dialog .pf-v5-c-modal-box__body .pf-m-danger"
b.wait_visible(error_location)
error_message = b.text(error_location)
self.test_obj.assertIn(self.xfail_error, error_message)
else:
for xfo in self.xfail_objects:
- b.wait_in_text(f"#create-network-dialog .pf-c-modal-box__body #create-network-{xfo} + .pf-c-form__helper-text .pf-m-error", self.xfail_error)
+ b.wait_in_text(f"#create-network-dialog .pf-v5-c-modal-box__body #create-network-{xfo} + .pf-v5-c-form__helper-text .pf-m-error", self.xfail_error)
self.cancel()
else:
@@ -222,7 +222,7 @@ class TestMachinesNetworks(VirtualMachin
def verify_expected_error_on_head(self, error_message):
b.click(f'#network-{self.name}-system-state button:contains("view more")')
- b.wait_in_text(".pf-c-popover", error_message)
+ b.wait_in_text(".pf-v5-c-popover", error_message)
b.click(f'#network-{self.name}-system-state button[aria-label=Close]')
def verify_dialog(self):
@@ -650,7 +650,7 @@ class TestMachinesNetworks(VirtualMachin
b.wait_val("#vm-subVmTest1-network-1-edit-dialog-type", "bridge")
b.select_from_dropdown("#vm-subVmTest1-network-1-edit-dialog-type", "network")
b.wait_visible("#vm-subVmTest1-network-1-edit-dialog-save:disabled")
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
# Ensure that when the source of a NIC was removed we can still change it
@@ -691,8 +691,8 @@ class TestMachinesNetworks(VirtualMachin
self.waitPageInit()
# Click on Networks card
- b.wait_in_text("#card-pf-networks .pf-c-card__header button", "Network")
- b.click(".pf-c-card .pf-c-card__header button:contains(Network)")
+ b.wait_in_text("#card-pf-networks .pf-v5-c-card__header button", "Network")
+ b.click(".pf-v5-c-card .pf-v5-c-card__header button:contains(Network)")
# Check that all networks are there
b.wait_in_text("body", "Networks")
@@ -738,7 +738,7 @@ class TestMachinesNetworks(VirtualMachin
self.waitPageInit()
# Click on Networks card
- b.click(".pf-c-card .pf-c-card__header button:contains(Network)")
+ b.click(".pf-v5-c-card .pf-v5-c-card__header button:contains(Network)")
# Check that all networks are there
b.wait_in_text("body", "Networks")
@@ -777,8 +777,8 @@ class TestMachinesNetworks(VirtualMachin
# Delete an inactive network
b.click(f"#network-test_network2-{connectionName}-action-kebab button")
b.click(f'#delete-network-test_network2-{connectionName}')
- b.wait_in_text(".pf-c-modal-box__body .pf-c-description-list", "test_network2")
- b.click(".pf-c-modal-box__footer button:contains(Delete)")
+ b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-description-list", "test_network2")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Delete)")
self.waitNetworkRow("test_network2", connectionName, False)
# Delete an active network
@@ -788,8 +788,8 @@ class TestMachinesNetworks(VirtualMachin
self.toggleNetworkRow("test_network2", connectionName)
b.click(f"#network-test_network2-{connectionName}-action-kebab button")
b.click(f'#delete-network-test_network2-{connectionName}')
- b.wait_in_text(".pf-c-modal-box__body .pf-c-description-list", "test_network2")
- b.click(".pf-c-modal-box__footer button:contains(Delete)")
+ b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-description-list", "test_network2")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Delete)")
self.waitNetworkRow("test_network2", connectionName, False)
def testNetworkAddStaticDCHPHosts(self):
@@ -821,26 +821,26 @@ class TestMachinesNetworks(VirtualMachin
def open(self):
b.click(f"#network-{self.network_name}-{self.connection_name}-static-host-entries-add")
b.wait_visible("#add-new-static-entry-mac-address")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Add a DHCP static host entry")
- b.wait_in_text("div.pf-c-modal-box__body label[for=add-new-static-entry-mac-address]", "MAC address")
- b.wait_in_text("div.pf-c-modal-box__body label[for=add-new-static-entry-ip-address]", "IP address")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Add a DHCP static host entry")
+ b.wait_in_text("div.pf-v5-c-modal-box__body label[for=add-new-static-entry-mac-address]", "MAC address")
+ b.wait_in_text("div.pf-v5-c-modal-box__body label[for=add-new-static-entry-ip-address]", "IP address")
def fill(self):
b.set_input_text("#add-new-static-entry-mac-address", self.mac)
b.set_input_text("#add-new-static-entry-ip-address", self.ip)
def cancel(self):
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
b.wait_not_present("#add-new-static-entry")
def add(self):
- b.click(".pf-c-modal-box__footer button:contains(Add)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Add)")
if self.xfail:
# Check incomplete dialog
for k, v in self.xfail.items():
if k == "header":
- b.wait_in_text(".pf-c-modal-box .pf-c-alert.pf-m-danger", v)
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-alert.pf-m-danger", v)
break
else:
b.wait_in_text(k, v)
@@ -869,10 +869,10 @@ class TestMachinesNetworks(VirtualMachin
def cleanup(self):
b.click(f"#delete-network-{self.network_name}-{self.connection_name}-ipv4-dhcp-host-{self.entry_id}-button")
- b.wait_in_text(".pf-c-modal-box__body .pf-c-description-list", self.ip)
+ b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-description-list", self.ip)
b.wait_in_text("#delete-resource-modal-ip", self.ip)
b.wait_in_text("#delete-resource-modal-mac", self.mac)
- b.click(".pf-c-modal-box__footer button:contains(Remove)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Remove)")
b.wait_not_present(f"#network-{self.network_name}-{self.connection_name}-ipv4-dhcp-host-{self.entry_id}")
b = self.browser
@@ -888,7 +888,7 @@ class TestMachinesNetworks(VirtualMachin
self.waitPageInit()
# Click on Networks card
- b.click(".pf-c-card .pf-c-card__header button:contains(Network)")
+ b.click(".pf-v5-c-card .pf-v5-c-card__header button:contains(Network)")
# Check that all networks are there
b.wait_in_text("body", "Networks")
@@ -940,7 +940,7 @@ class TestMachinesNetworks(VirtualMachin
# An error should be raised if "MAC address" and "IP address" is invaild
b.click("#add-new-static-entry-save")
b.wait_in_text(
- ".pf-m-danger .pf-c-alert__description",
+ ".pf-m-danger .pf-v5-c-alert__description",
"XML error: Cannot parse MAC address")
# Attach basic static DHCP host and try to remove it
Index: cockpit-machines-292/test/check-machines-nics
===================================================================
--- cockpit-machines-292.orig/test/check-machines-nics
+++ cockpit-machines-292/test/check-machines-nics
@@ -116,7 +116,7 @@ class TestMachinesNICs(VirtualMachinesCa
b._wait_present("#vm-subVmTest1-add-iface-source option:nth-of-type(2):contains(abridge)")
b._wait_present("#vm-subVmTest1-add-iface-source option:nth-of-type(3):contains(virbr0)")
b._wait_present("#vm-subVmTest1-add-iface-source option:nth-of-type(4):contains(xbridge)")
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
b.wait_not_present("#vm-subVmTest1-add-iface-dialog")
def testNICPlugingAndUnpluging(self):
@@ -601,7 +601,7 @@ class TestMachinesNICs(VirtualMachinesCa
def open(self):
self.browser.click("#vm-subVmTest1-add-iface-button") # open the Network Interfaces subtab
- self.browser.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Add virtual network interface")
+ self.browser.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Add virtual network interface")
def fill(self):
self.browser.select_from_dropdown("#vm-subVmTest1-add-iface-type", self.source_type)
@@ -633,18 +633,18 @@ class TestMachinesNICs(VirtualMachinesCa
self.browser.assert_pixels("#vm-subVmTest1-add-iface-dialog", self.pixel_test_tag, skip_layouts=["rtl"])
def cancel(self):
- self.browser.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ self.browser.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
self.browser.wait_not_present("#vm-subVmTest1-add-iface-dialog")
def create(self):
- self.browser.click(".pf-c-modal-box__footer button:contains(Add)")
+ self.browser.click(".pf-v5-c-modal-box__footer button:contains(Add)")
if not self.xfail:
with self.browser.wait_timeout(60):
self.browser.wait_not_present("#vm-subVmTest1-add-iface-dialog")
else:
- self.browser.wait_in_text(".pf-c-modal-box__body .pf-c-alert__title", self.xfail_error)
- self.browser.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ self.browser.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-alert__title", self.xfail_error)
+ self.browser.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
def verify(self):
# Verify libvirt XML
@@ -688,7 +688,7 @@ class TestMachinesNICs(VirtualMachinesCa
# Check NIC is no longer in list; the device-removed signal can take *very* long to arrive
with self.browser.wait_timeout(90):
self.browser.wait_not_present(f"#vm-subVmTest1-network-{self.nic_num}-mac")
- self.browser.wait_not_present(".pf-c-modal-box")
+ self.browser.wait_not_present(".pf-v5-c-modal-box")
if __name__ == '__main__':
Index: cockpit-machines-292/test/check-machines-settings
===================================================================
--- cockpit-machines-292.orig/test/check-machines-settings
+++ cockpit-machines-292/test/check-machines-settings
@@ -100,7 +100,7 @@ class TestMachinesSettings(VirtualMachin
# Open dialog window
b.click("#vm-subVmTest1-cpu button")
- b.wait_visible(".pf-c-modal-box__body")
+ b.wait_visible(".pf-v5-c-modal-box__body")
# Check basic values
b.wait_val("#machines-vcpu-count-field input", "3")
@@ -120,7 +120,7 @@ class TestMachinesSettings(VirtualMachin
# Open dialog
b.click("#vm-subVmTest1-cpu button")
- b.wait_visible(".pf-c-modal-box__body")
+ b.wait_visible(".pf-v5-c-modal-box__body")
b.set_input_text("#machines-vcpu-count-field input", "2")
@@ -148,7 +148,7 @@ class TestMachinesSettings(VirtualMachin
# Open dialog
b.click("#vm-subVmTest1-cpu button")
- b.wait_visible(".pf-c-modal-box__body")
+ b.wait_visible(".pf-v5-c-modal-box__body")
# Set new socket value
b.wait_val("#coresSelect", "2")
@@ -240,7 +240,7 @@ class TestMachinesSettings(VirtualMachin
# Warning should disappear and changes should be visible in the UI
b.wait_not_present("#cpu-tooltip")
b.wait_not_present("#vm-subVmTest1-needs-shutdown")
- b.wait_in_text("#vm-subVmTest1-cpu .pf-c-description-list__text", "host")
+ b.wait_in_text("#vm-subVmTest1-cpu .pf-v5-c-description-list__text", "host")
# Choose manually a CPU model
b.click("#vm-subVmTest1-cpu button")
@@ -248,7 +248,7 @@ class TestMachinesSettings(VirtualMachin
b.select_from_dropdown("#cpu-model-select-group select", "coreduo")
b.click("#machines-cpu-modal-dialog-apply")
b.wait_not_present("#machines-cpu-modal-dialog")
- b.wait_in_text("#vm-subVmTest1-cpu .pf-c-description-list__text", "custom (coreduo)")
+ b.wait_in_text("#vm-subVmTest1-cpu .pf-v5-c-description-list__text", "custom (coreduo)")
# Verify libvirt XML
dom_xml = "virsh dumpxml subVmTest1"
@@ -261,9 +261,9 @@ class TestMachinesSettings(VirtualMachin
b.select_from_dropdown("#cpu-model-select-group select", "host-model")
b.click("#machines-cpu-modal-dialog-apply")
b.wait_not_present("#machines-cpu-modal-dialog")
- b.wait_in_text("#vm-subVmTest1-cpu .pf-c-description-list__text", "host")
+ b.wait_in_text("#vm-subVmTest1-cpu .pf-v5-c-description-list__text", "host")
b.click("#vm-subVmTest1-system-run")
- b.wait_in_text("#vm-subVmTest1-cpu .pf-c-description-list__text", "custom")
+ b.wait_in_text("#vm-subVmTest1-cpu .pf-v5-c-description-list__text", "custom")
# In the test ENV libvirt does not properly set the CPU model so we see a tooltip https://bugzilla.redhat.com/show_bug.cgi?id=1913337
# b.wait_not_present("#cpu-tooltip")
@@ -310,7 +310,7 @@ class TestMachinesSettings(VirtualMachin
m.execute("virsh domblklist subVmTest1 | awk 'NR==3{print $2}'").strip())
b.wait_in_text("#vm-subVmTest1-order-modal-device-row-1 .boot-order-additional-info",
m.execute("virsh domiflist subVmTest1 | awk 'NR==3{print $5}'").strip())
- b.wait_visible(f".boot-order-additional-info .pf-c-description-list__description:contains('{pci_slot}')")
+ b.wait_visible(f".boot-order-additional-info .pf-v5-c-description-list__description:contains('{pci_slot}')")
# Check a cdrom attributes are shown correctly
cdrom_row = b.text(".boot-order-list-view li:nth-child(3) .boot-order-additional-info")
self.assertTrue("cdrom" and "/var/lib/libvirt/images/phonycdrom" in cdrom_row)
@@ -364,7 +364,7 @@ class TestMachinesSettings(VirtualMachin
# re-open and check the boot option is the disk
b.click("#vm-subVmTest1-boot-order button")
b.wait_visible("#vm-subVmTest1-order-modal-window")
- b.wait_text("#vm-subVmTest1-order-modal-device-row-0 .pf-c-description-list__description .pf-c-description-list__text", args["image"])
+ b.wait_text("#vm-subVmTest1-order-modal-device-row-0 .pf-v5-c-description-list__description .pf-v5-c-description-list__text", args["image"])
b.click("#vm-subVmTest1-order-modal-cancel")
b.wait_not_present("#vm-subVmTest1-order-modal-window")
Index: cockpit-machines-292/test/check-machines-snapshots
===================================================================
--- cockpit-machines-292.orig/test/check-machines-snapshots
+++ cockpit-machines-292/test/check-machines-snapshots
@@ -62,7 +62,7 @@ class TestMachinesSnapshots(VirtualMachi
b.wait_not_present("#vm-subVmTest1-snapshots")
return
- b.wait_in_text("#vm-subVmTest1-snapshots .pf-c-empty-state", "No snapshots")
+ b.wait_in_text("#vm-subVmTest1-snapshots .pf-v5-c-empty-state", "No snapshots")
# Check snapshot for running VM
m.execute("virsh detach-disk --domain subVmTest1 --target vda --persistent") # vda is raw disk, which are not supported by internal snapshots
@@ -152,7 +152,7 @@ class TestMachinesSnapshots(VirtualMachi
def open(self):
b.click("#vm-subVmTest1-add-snapshot-button")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Create snapshot")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Create snapshot")
def fill(self):
if self.name:
@@ -165,21 +165,21 @@ class TestMachinesSnapshots(VirtualMachi
b.assert_pixels("#vm-subVmTest1-create-snapshot-modal", "create-snapshot-dialog" + ("" if not self.xfail else "-error"), skip_layouts=["rtl"])
def cancel(self):
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
b.wait_not_present("#vm-subVmTest1-create-snapshot-modal")
def create(self):
if not self.xfail:
self.assert_pixels()
- b.click(".pf-c-modal-box__footer button:contains(Create)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Create)")
if not self.xfail:
b.wait_not_present("#vm-subVmTest1-create-snapshot-modal")
else:
self.assert_pixels()
b.wait_visible("#snapshot-create-dialog-name[aria-invalid=true]")
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
def verify_frontend(self):
if self.name:
@@ -211,9 +211,9 @@ class TestMachinesSnapshots(VirtualMachi
def cleanup(self):
b.click(f"#delete-vm-subVmTest1-snapshot-{self.snap_num}")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Delete snapshot?")
- b.wait_in_text(".pf-c-modal-box__body .pf-c-description-list", f"{self.name} will be deleted from {self.vm_name}")
- b.click('.pf-c-modal-box__footer button:contains("Delete")')
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Delete snapshot?")
+ b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-description-list", f"{self.name} will be deleted from {self.vm_name}")
+ b.click('.pf-v5-c-modal-box__footer button:contains("Delete")')
b.wait_not_present(f"#vm-subVmTest1-snapshot-{self.snap_num}-name:contains({self.name})")
# No Snapshots present
@@ -283,8 +283,8 @@ class TestMachinesSnapshots(VirtualMachi
self.assertEqual("no", m.execute("virsh snapshot-info --domain subVmTest1 --snapshotname snapshotB | grep 'Current:' | awk '{print $2}'").strip())
b.click("#vm-subVmTest1-snapshot-0-revert")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Revert to snapshot snapshotB")
- b.click('.pf-c-modal-box__footer button:contains("Revert")')
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Revert to snapshot snapshotB")
+ b.click('.pf-v5-c-modal-box__footer button:contains("Revert")')
b.wait_not_present("#vm-subVmTest1-snapshot-1-current")
b.wait_visible("#vm-subVmTest1-snapshot-0-current")
@@ -305,15 +305,15 @@ class TestMachinesSnapshots(VirtualMachi
# libvirt will require using force options since there is a risk of memory corruption
b.wait_in_text("#vm-subVmTest1-snapshot-0-name", "snapshotC")
b.click("#vm-subVmTest1-snapshot-0-revert")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Revert to snapshot snapshotC")
- b.click('.pf-c-modal-box__footer button:contains("Revert")')
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Revert to snapshot snapshotC")
+ b.click('.pf-v5-c-modal-box__footer button:contains("Revert")')
# Check "Force revert" is present and Regular revert is disabled
- b.wait_in_text(".pf-c-modal-box .pf-c-alert__description", "revert requires force")
- b.wait_visible(".pf-c-modal-box__footer button:contains(Revert):disabled")
- b.wait_visible(".pf-c-modal-box__footer button:contains(Force revert)")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-alert__description", "revert requires force")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Revert):disabled")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Force revert)")
- b.click(".pf-c-modal-box__footer button:contains(Force revert)")
- b.wait_not_present(".pf-c-modal-box")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Force revert)")
+ b.wait_not_present(".pf-v5-c-modal-box")
# Check VM was reverted to a correct snapshot
b.wait_not_present("#vm-subVmTest1-snapshot-1-current")
Index: cockpit-machines-292/test/check-machines-storage-pools
===================================================================
--- cockpit-machines-292.orig/test/check-machines-storage-pools
+++ cockpit-machines-292/test/check-machines-storage-pools
@@ -35,12 +35,12 @@ class TestMachinesStoragePools(VirtualMa
def gotoVolumesTab(self, poolName, connectionName="system"):
selector = f"tr[data-row-id=pool-{poolName}-{connectionName}] + tr li:contains('Storage volumes')"
self.browser.click(selector + " > button")
- self.browser.wait_attr(selector, "class", "pf-c-tabs__item pf-m-current")
+ self.browser.wait_attr(selector, "class", "pf-v5-c-tabs__item pf-m-current")
def gotoOverviewTab(self, poolName, connectionName="system"):
selector = f"tr[data-row-id=pool-{poolName}-{connectionName}] + tr li:contains('Overview')"
self.browser.click(selector + " > button")
- self.browser.wait_attr(selector, "class", "pf-c-tabs__item pf-m-current")
+ self.browser.wait_attr(selector, "class", "pf-v5-c-tabs__item pf-m-current")
def testStoragePoolsBasic(self):
b = self.browser
@@ -53,7 +53,7 @@ class TestMachinesStoragePools(VirtualMa
self.waitVmRow("subVmTest1")
b.wait_in_text("#card-pf-storage-pools", "1 Storage pool")
- b.wait_in_text("#card-pf-storage-pools .pf-c-card__header button", "Storage pool")
+ b.wait_in_text("#card-pf-storage-pools .pf-v5-c-card__header button", "Storage pool")
# prepare libvirt storage pools
p1 = os.path.join(self.vm_tmpdir, "vm_one")
@@ -88,7 +88,7 @@ class TestMachinesStoragePools(VirtualMa
self.performAction("subVmTest1", "forceOff")
# Click on Storage pools card
- b.click(".pf-c-card .pf-c-card__header button:contains(Storage pools)")
+ b.click(".pf-v5-c-card .pf-v5-c-card__header button:contains(Storage pools)")
# Check that all defined pools are there
b.wait_in_text("body", "Storage pools")
@@ -113,7 +113,7 @@ class TestMachinesStoragePools(VirtualMa
# Check storage volumes of a pool
self.gotoVolumesTab("myPoolOne")
- b.wait_in_text(f"tr[data-row-id=pool-myPoolOne-{connectionName}] + tr .pf-c-empty-state",
+ b.wait_in_text(f"tr[data-row-id=pool-myPoolOne-{connectionName}] + tr .pf-v5-c-empty-state",
"No storage volumes defined for this storage pool")
# Close expanded row for this pool
@@ -135,7 +135,7 @@ class TestMachinesStoragePools(VirtualMa
b.click("tbody input[aria-label='Select row 0']")
b.wait_in_text("#storage-volumes-delete", "Delete 1 volume")
b.click("#storage-volumes-delete")
- b.wait_in_text(".pf-c-alert .pf-c-alert__title", "Storage volumes could not be deleted")
+ b.wait_in_text(".pf-v5-c-alert .pf-v5-c-alert__title", "Storage volumes could not be deleted")
b.reload()
b.enter_page('/machines')
self.togglePoolRow("myPoolTwo", connectionName)
@@ -170,7 +170,7 @@ class TestMachinesStoragePools(VirtualMa
# Try deactivating and activating a pool
b.click(f"#deactivate-pool-myPoolOne-{connectionName}")
b.wait_in_text(f"#pool-myPoolOne-{connectionName}-state", "inactive")
- b.wait_in_text(f"tr[data-row-id=pool-myPoolOne-{connectionName}] + tr .pf-c-empty-state", "Activate the storage pool to administer volumes")
+ b.wait_in_text(f"tr[data-row-id=pool-myPoolOne-{connectionName}] + tr .pf-v5-c-empty-state", "Activate the storage pool to administer volumes")
b.wait_visible(f'#myPoolOne-{connectionName}-create-volume-button:disabled')
b.click(f"#activate-pool-myPoolOne-{connectionName}")
b.wait_in_text(f"#pool-myPoolOne-{connectionName}-state", "active")
@@ -219,8 +219,8 @@ class TestMachinesStoragePools(VirtualMa
self.waitPageInit()
# Click on Storage pools card
- b.wait_in_text("#card-pf-storage-pools .pf-c-card__header button", "Storage pools")
- b.click(".pf-c-card .pf-c-card__header button:contains(Storage pools)")
+ b.wait_in_text("#card-pf-storage-pools .pf-v5-c-card__header button", "Storage pools")
+ b.click(".pf-v5-c-card .pf-v5-c-card__header button:contains(Storage pools)")
class StoragePoolCreateDialog(object):
def __init__(
@@ -250,7 +250,7 @@ class TestMachinesStoragePools(VirtualMa
def open(self):
b.click("#create-storage-pool")
b.wait_visible("#create-storage-pool-dialog")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Create storage pool")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Create storage pool")
def fill(self):
b.set_input_text("#storage-pool-dialog-name", self.name)
@@ -284,11 +284,11 @@ class TestMachinesStoragePools(VirtualMa
b.click("storage-pool-dialog-autostart")
def cancel(self):
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
b.wait_not_present("#create-storage-pool-dialog")
def create(self):
- b.click(".pf-c-modal-box__footer button:contains(Create)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Create)")
if not self.xfail:
b.wait_not_present("#create-storage-pool-dialog")
@@ -301,7 +301,7 @@ class TestMachinesStoragePools(VirtualMa
b.wait_visible("#storage-pool-dialog-target-helper")
# Check errors from backend
if self.xfail_error:
- error_location = "#create-storage-pool-dialog .pf-c-modal-box__body .pf-m-danger"
+ error_location = "#create-storage-pool-dialog .pf-v5-c-modal-box__body .pf-m-danger"
b.wait_visible(error_location)
error_message = b.text(error_location)
self.test_obj.assertIn(self.xfail_error, error_message)
@@ -466,10 +466,10 @@ class TestMachinesStoragePools(VirtualMa
# Ensure that iscsi-direct is absent from the types dropdown
b.click("#create-storage-pool")
b.wait_visible("#create-storage-pool-dialog")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Create storage pool")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Create storage pool")
b.click("#storage-pool-dialog-type")
b.wait_not_present("#storage-pool-dialog-type option[value*='isci-direct']")
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
b.wait_not_present("#create-storage-pool-dialog")
# Prepare a Volume Group to be used as source for the LVM pool
@@ -515,8 +515,8 @@ class TestMachinesStoragePools(VirtualMa
self.waitPageInit()
# Click on Storage pools card
- b.wait_in_text("#card-pf-storage-pools .pf-c-card__header button", "Storage pools")
- b.click(".pf-c-card .pf-c-card__header button:contains(Storage pools)")
+ b.wait_in_text("#card-pf-storage-pools .pf-v5-c-card__header button", "Storage pools")
+ b.click(".pf-v5-c-card .pf-v5-c-card__header button:contains(Storage pools)")
class StorageVolumeCreateDialog(object):
def __init__(
@@ -553,7 +553,7 @@ class TestMachinesStoragePools(VirtualMa
b.click(f"#{self.pool_name}-system-create-volume-button") # open the "Storage volumes" subtab
b.wait_visible("#create-volume-dialog-modal")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Create storage volume")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Create storage volume")
def fill(self):
b.set_input_text("#create-volume-dialog-name", self.vol_name)
@@ -568,21 +568,21 @@ class TestMachinesStoragePools(VirtualMa
b.select_from_dropdown("#create-volume-dialog-format", self.format)
def cancel(self):
- b.click(".pf-c-modal-box__footer button:contains(Cancel)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Cancel)")
b.wait_not_present("#create-storage-pool-dialog")
def create(self):
- b.click(".pf-c-modal-box__footer button:contains(Create)")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Create)")
if not self.xfail:
# Creation of volumes might take longer for some pool types
if self.pool_type in ["disk", "netfs"]:
- b.wait_visible(".pf-c-modal-box__footer button.pf-m-in-progress")
- b.wait_visible(".pf-c-modal-box__footer button:contains(Create):disabled")
+ b.wait_visible(".pf-v5-c-modal-box__footer button.pf-m-in-progress")
+ b.wait_visible(".pf-v5-c-modal-box__footer button:contains(Create):disabled")
b.wait_not_present("#create-volume-dialog-modal")
else:
for xfo in self.xfail_objects:
- b.wait_in_text(f"#create-volume-dialog-{xfo}-group .pf-c-form__helper-text .pf-m-error", self.xfail_error)
+ b.wait_in_text(f"#create-volume-dialog-{xfo}-group .pf-v5-c-form__helper-text .pf-m-error", self.xfail_error)
def verify(self):
# Check that the defined volume is now visible
@@ -741,8 +741,8 @@ class TestMachinesStoragePools(VirtualMa
self.login_and_go("/machines")
self.waitPageInit()
- b.wait_in_text("#card-pf-storage-pools .pf-c-card__header button", "Storage pool")
- b.click(".pf-c-card .pf-c-card__header button:contains(Storage pool)")
+ b.wait_in_text("#card-pf-storage-pools .pf-v5-c-card__header button", "Storage pool")
+ b.click(".pf-v5-c-card .pf-v5-c-card__header button:contains(Storage pool)")
b.wait_visible("#storage-pools-listing")
class StoragePoolsCreationAndDeletion:
@@ -818,7 +818,7 @@ class TestMachinesStoragePools(VirtualMa
b.click(f"#pool-{self.name}-{self.connection}-action-kebab button")
b.click(f"#delete-pool-{self.name}-{self.connection}")
# Check if deletion dialog is shown
- b.wait_visible("div.pf-c-modal-box")
+ b.wait_visible("div.pf-v5-c-modal-box")
if self.activate:
if self.vol_name or self.pool_type == "iscsi":
@@ -827,28 +827,28 @@ class TestMachinesStoragePools(VirtualMa
else:
# Check when no volume
b.wait_not_present("#storage-pool-delete-volumes")
- b.wait_in_text(".pf-c-modal-box__body div",
+ b.wait_in_text(".pf-v5-c-modal-box__body div",
"No volumes exist in this storage pool.")
else:
# Check the content of inactive pool deletion dialog
- b.wait_text(".pf-c-modal-box__body div",
+ b.wait_text(".pf-v5-c-modal-box__body div",
"Deleting an inactive storage pool will only undefine the pool. Its content will not be deleted.")
- b.click('.pf-c-modal-box__footer button:contains("Delete")')
+ b.click('.pf-v5-c-modal-box__footer button:contains("Delete")')
if self.xfail:
- b.wait_visible("div.pf-c-modal-box")
+ b.wait_visible("div.pf-v5-c-modal-box")
if self.xfail_error:
# Check the error shown on the footer of the deletion of dialog
- b.wait_in_text("div.pf-c-modal-box .pf-c-alert__description", self.xfail_error)
+ b.wait_in_text("div.pf-v5-c-modal-box .pf-v5-c-alert__description", self.xfail_error)
# Close the dialog
- b.click('.pf-c-modal-box__footer button:contains("Cancel")')
+ b.click('.pf-v5-c-modal-box__footer button:contains("Cancel")')
# Clean the pool if pool deletion is failed
if self.activate:
m.execute(f"virsh pool-destroy {self.name}")
m.execute(f"virsh pool-undefine {self.name}")
- b.wait_not_present("div.pf-c-modal-box")
+ b.wait_not_present("div.pf-v5-c-modal-box")
def verify(self):
if self.activate and self.vol_name:
@@ -993,18 +993,18 @@ class TestMachinesStoragePools(VirtualMa
b.click("#pool-images-system-action-kebab button")
b.click("#pool-images-system-action-kebab a:contains(Delete)")
b.set_checked("#storage-pool-delete-volumes", True)
- b.wait_in_text(".pf-c-backdrop .pf-c-helper-text__item-text", "Pool's volumes are used by")
- b.wait_visible(".pf-c-backdrop footer button[aria-disabled=true]:contains(Delete)")
+ b.wait_in_text(".pf-v5-c-backdrop .pf-v5-c-helper-text__item-text", "Pool's volumes are used by")
+ b.wait_visible(".pf-v5-c-backdrop footer button[aria-disabled=true]:contains(Delete)")
# Check "Cancel" button
- b.click(".pf-c-backdrop footer button:contains(Cancel)")
- b.wait_not_present(".pf-c-backdrop")
+ b.click(".pf-v5-c-backdrop footer button:contains(Cancel)")
+ b.wait_not_present(".pf-v5-c-backdrop")
# Check "X" button of the dialog
b.click("#pool-images-system-action-kebab button")
b.click("#pool-images-system-action-kebab a:contains(Delete)")
- b.click(".pf-c-backdrop button[aria-label=Close]")
- b.wait_not_present(".pf-c-backdrop")
+ b.click(".pf-v5-c-backdrop button[aria-label=Close]")
+ b.wait_not_present(".pf-v5-c-backdrop")
# Check that the error shown after the title, not the footer
# Delete the VM, or the deletion button will be disabled
@@ -1015,7 +1015,7 @@ class TestMachinesStoragePools(VirtualMa
b.wait_not_present("#vm-subVmTest1-system-name")
# Go back to the storage pool list
b.wait_in_text("#card-pf-storage-pools button", "Storage pool")
- b.click("#card-pf-storage-pools .pf-c-card__header button")
+ b.click("#card-pf-storage-pools .pf-v5-c-card__header button")
b.wait_visible("#storage-pools-listing")
m.execute(f'chattr +a {args["image"]}')
@@ -1023,7 +1023,7 @@ class TestMachinesStoragePools(VirtualMa
b.click("#pool-images-system-action-kebab button")
b.click("#pool-images-system-action-kebab a:contains(Delete)")
b.set_checked("#storage-pool-delete-volumes", True)
- b.click(".pf-c-backdrop footer button[aria-disabled=false]:contains(Delete)")
+ b.click(".pf-v5-c-backdrop footer button[aria-disabled=false]:contains(Delete)")
b.assert_pixels("#storage-pool-delete-modal", "storage-pool-delete-modal-error")
wait(lambda: "forDeletion" not in m.execute("ls /var/lib/libvirt/images/"))
Index: cockpit-machines-292/test/check-machines-virtualization
===================================================================
--- cockpit-machines-292.orig/test/check-machines-virtualization
+++ cockpit-machines-292/test/check-machines-virtualization
@@ -41,9 +41,9 @@ class TestMachinesVirtualization(Virtual
self.login_and_go("/machines")
- b.wait_visible("div.pf-c-empty-state:contains('Hardware virtualization is disabled')")
+ b.wait_visible("div.pf-v5-c-empty-state:contains('Hardware virtualization is disabled')")
- b.assert_pixels(".pf-c-empty-state", "virtualization-disabled-warning")
+ b.assert_pixels(".pf-v5-c-empty-state", "virtualization-disabled-warning")
b.click("#ignore-hw-virtualization-disabled-btn")
@@ -51,7 +51,7 @@ class TestMachinesVirtualization(Virtual
b.wait_visible("#card-pf-networks")
b.wait_visible("#virtual-machines-listing")
- b.wait_visible(".pf-c-page .pf-c-card__title:contains('Virtual machines')")
+ b.wait_visible(".pf-v5-c-page .pf-v5-c-card__title:contains('Virtual machines')")
def testLibvirt(self):
b = self.browser
@@ -82,7 +82,7 @@ class TestMachinesVirtualization(Virtual
def waitEmptyState():
with b.wait_timeout(15):
- b.wait_in_text(".pf-c-empty-state", "Virtualization service (libvirt) is not active")
+ b.wait_in_text(".pf-v5-c-empty-state", "Virtualization service (libvirt) is not active")
# Check initial state
self.createVm("subVmTest1")
@@ -97,7 +97,7 @@ class TestMachinesVirtualization(Virtual
b.reload()
b.enter_page('/machines')
waitEmptyState()
- b.click(".pf-c-empty-state button.pf-m-link") # Troubleshoot
+ b.click(".pf-v5-c-empty-state button.pf-m-link") # Troubleshoot
b.leave_page()
b.wait(lambda: "system/services" in b.eval_js("window.location.href"))
@@ -108,7 +108,7 @@ class TestMachinesVirtualization(Virtual
self.addCleanup(self.machine.execute, "pkill -u nonadmin || true; while pgrep -u nonadmin; do sleep 0.5; done")
self.login_and_go("/machines", user="nonadmin", superuser=False)
self.waitPageInit()
- b.wait_in_text("#virtual-machines-listing .pf-c-empty-state", "No VM is running")
+ b.wait_in_text("#virtual-machines-listing .pf-v5-c-empty-state", "No VM is running")
if __name__ == '__main__':
Index: cockpit-machines-292/test/machineslib.py
===================================================================
--- cockpit-machines-292.orig/test/machineslib.py
+++ cockpit-machines-292/test/machineslib.py
@@ -36,7 +36,7 @@ class VirtualMachinesCaseHelpers:
def performAction(self, vmName, action, checkExpectedState=True, connectionName="system"):
b = self.browser
b.click("#vm-{0}-{1}-action-kebab button".format(vmName, connectionName))
- b.wait_visible("#vm-{0}-{1}-action-kebab > .pf-c-dropdown__menu".format(vmName, connectionName))
+ b.wait_visible("#vm-{0}-{1}-action-kebab > .pf-v5-c-dropdown__menu".format(vmName, connectionName))
b.click("#vm-{0}-{1}-{2} a".format(vmName, connectionName, action))
if not checkExpectedState:
@@ -68,7 +68,7 @@ class VirtualMachinesCaseHelpers:
def togglePoolRow(self, poolName, connectionName="system"):
isExpanded = 'pf-m-expanded' in self.browser.attr("tbody tr[data-row-id=pool-{0}-{1}] + tr".format(poolName, connectionName), "class") # click on the row header
- self.browser.click("tbody tr[data-row-id=pool-{0}-{1}] .pf-c-table__toggle button".format(poolName, connectionName)) # click on the row header
+ self.browser.click("tbody tr[data-row-id=pool-{0}-{1}] .pf-v5-c-table__toggle button".format(poolName, connectionName)) # click on the row header
if isExpanded:
self.browser.wait_not_present("tbody tr[data-row-id=pool-{0}-{1}] + tr.pf-m-expanded".format(poolName, connectionName)) # click on the row header
else:
@@ -84,7 +84,7 @@ class VirtualMachinesCaseHelpers:
def toggleNetworkRow(self, networkName, connectionName="system"):
isExpanded = 'pf-m-expanded' in self.browser.attr("tbody tr[data-row-id=network-{0}-{1}] + tr".format(networkName, connectionName), "class") # click on the row header
- self.browser.click("tbody tr[data-row-id=network-{0}-{1}] .pf-c-table__toggle button".format(networkName, connectionName)) # click on the row header
+ self.browser.click("tbody tr[data-row-id=network-{0}-{1}] .pf-v5-c-table__toggle button".format(networkName, connectionName)) # click on the row header
if isExpanded:
self.browser.wait_not_present("tbody tr[data-row-id=network-{0}-{1}] + tr.pf-m-expanded".format(networkName, connectionName)) # click on the row header
else:
@@ -219,11 +219,11 @@ class VirtualMachinesCaseHelpers:
b = self.browser
b.click(f"#delete-vm-subVmTest1-iface-{iface}")
- b.wait_in_text(".pf-c-modal-box .pf-c-modal-box__header .pf-c-modal-box__title", "Remove network interface?")
+ b.wait_in_text(".pf-v5-c-modal-box .pf-v5-c-modal-box__header .pf-v5-c-modal-box__title", "Remove network interface?")
if mac and vm_name:
- b.wait_in_text(".pf-c-modal-box__body .pf-c-description-list", f"{mac} will be removed from {vm_name}")
- b.click(".pf-c-modal-box__footer button:contains(Remove)")
- b.wait_not_present(".pf-c-modal-box")
+ b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-description-list", f"{mac} will be removed from {vm_name}")
+ b.click(".pf-v5-c-modal-box__footer button:contains(Remove)")
+ b.wait_not_present(".pf-v5-c-modal-box")
def get_next_mac(self, last_mac):
parts = last_mac.split(':')