Skip to content

Commit b882a7b

Browse files
committed
test: Rename all pf-v5 to pf-v6
1 parent b232bbf commit b882a7b

25 files changed

+120
-120
lines changed

test/common/testlib.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ def assert_pixels(
15171517
# Don't apply this hack for login and terminal and shell as they don't use PF Page
15181518
if not self.is_present("#shell-page") and not self.is_present("#login-details") and not self.is_present("#system-terminal-page"):
15191519
classes = self.attr("main", "class")
1520-
if "pf-v5-c-page__main" in classes:
1520+
if "pf-v6-c-page__main" in classes:
15211521
self.set_attr("main.pf-v6-c-page__main", "class", f"{classes} pixel-test")
15221522

15231523
# move the mouse to a harmless place where it doesn't accidentally focus anything (as that changes UI)

test/verify/check-lib

+19-19
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class TestLib(testlib.MachineCase):
3232

3333
# No clear button
3434

35-
b.wait_not_visible("#demo-typeahead .pf-v5-c-text-input-group__utilities button")
35+
b.wait_not_visible("#demo-typeahead .pf-v6-c-text-input-group__utilities button")
3636

3737
# Open menu, pixel test
3838

@@ -52,15 +52,15 @@ class TestLib(testlib.MachineCase):
5252

5353
# Clear
5454

55-
b.click("#demo-typeahead .pf-v5-c-text-input-group__utilities button")
56-
b.wait_not_visible("#demo-typeahead .pf-v5-c-text-input-group__utilities button")
55+
b.click("#demo-typeahead .pf-v6-c-text-input-group__utilities button")
56+
b.wait_not_visible("#demo-typeahead .pf-v6-c-text-input-group__utilities button")
5757
b.wait_text("#value", "-")
5858
b.wait_text("#toggles", "2")
5959
b.wait_text("#changes", "1")
6060

6161
# Open by clicking into input, close with ESC
6262

63-
b.click("#demo-typeahead .pf-v5-c-text-input-group__text-input")
63+
b.click("#demo-typeahead .pf-v6-c-text-input-group__text-input")
6464
b.wait_visible("#typeahead-widget")
6565
b.key("Escape")
6666
b.wait_not_present("#typeahead-widget")
@@ -81,18 +81,18 @@ class TestLib(testlib.MachineCase):
8181
b.key("Enter")
8282
b.wait_not_present("#typeahead-widget")
8383
b.wait_text("#value", "AL")
84-
b.wait_val("#demo-typeahead .pf-v5-c-text-input-group__text-input", "Alabama")
84+
b.wait_val("#demo-typeahead .pf-v6-c-text-input-group__text-input", "Alabama")
8585
b.wait_text("#toggles", "6")
8686
b.wait_text("#changes", "1")
8787

88-
b.click("#demo-typeahead .pf-v5-c-text-input-group__utilities button")
88+
b.click("#demo-typeahead .pf-v6-c-text-input-group__utilities button")
8989
b.wait_text("#value", "-")
9090
b.wait_text("#toggles", "6")
9191
b.wait_text("#changes", "2")
9292

9393
# Search for non-existent
9494

95-
b.set_input_text("#demo-typeahead .pf-v5-c-text-input-group__text-input", "Olabama")
95+
b.set_input_text("#demo-typeahead .pf-v6-c-text-input-group__text-input", "Olabama")
9696
b.wait_text("#typeahead-widget .pf-v6-c-menu__item", "'Olabama' not found")
9797
b.click("#demo-typeahead .pf-v6-c-menu-toggle__button")
9898
b.wait_not_present("#typeahead-widget")
@@ -102,7 +102,7 @@ class TestLib(testlib.MachineCase):
102102
# Again with formatted "not found" message
103103

104104
b.set_checked("#notFoundIsString", val=True)
105-
b.set_input_text("#demo-typeahead .pf-v5-c-text-input-group__text-input", "Olabama")
105+
b.set_input_text("#demo-typeahead .pf-v6-c-text-input-group__text-input", "Olabama")
106106
b.wait_text("#typeahead-widget .pf-v6-c-menu__item", "Not found")
107107
b.click("#demo-typeahead .pf-v6-c-menu-toggle__button")
108108
b.wait_not_present("#typeahead-widget")
@@ -111,7 +111,7 @@ class TestLib(testlib.MachineCase):
111111

112112
# Search for existing, pixel test, select
113113

114-
b.set_input_text("#demo-typeahead .pf-v5-c-text-input-group__text-input", "Flori")
114+
b.set_input_text("#demo-typeahead .pf-v6-c-text-input-group__text-input", "Flori")
115115
b.wait_visible("#typeahead-widget")
116116
b.assert_pixels("#typeahead-widget", "search")
117117
b.click("#typeahead-widget .pf-v6-c-menu__item:contains(Florida)")
@@ -123,11 +123,11 @@ class TestLib(testlib.MachineCase):
123123
# Enable creation, create new state
124124

125125
b.set_checked("#isCreatable", val=True)
126-
b.set_input_text("#demo-typeahead .pf-v5-c-text-input-group__text-input", "Flori")
126+
b.set_input_text("#demo-typeahead .pf-v6-c-text-input-group__text-input", "Flori")
127127
b.click("#typeahead-widget .pf-v6-c-menu__item:contains(Create Flori)")
128128
b.wait_not_present("#typeahead-widget")
129129
b.wait_text("#value", "Flori")
130-
b.wait_val("#demo-typeahead .pf-v5-c-text-input-group__text-input", "Flori")
130+
b.wait_val("#demo-typeahead .pf-v6-c-text-input-group__text-input", "Flori")
131131
b.wait_text("#toggles", "14")
132132
b.wait_text("#changes", "26")
133133

@@ -140,7 +140,7 @@ class TestLib(testlib.MachineCase):
140140

141141
# No clear button
142142

143-
b.wait_not_visible("#demo-multi-typeahead .pf-v5-c-text-input-group__utilities button")
143+
b.wait_not_visible("#demo-multi-typeahead .pf-v6-c-text-input-group__utilities button")
144144

145145
# Open menu, pixel test
146146

@@ -177,7 +177,7 @@ class TestLib(testlib.MachineCase):
177177

178178
# Open by clicking into input, close with ESC
179179

180-
b.click("#demo-multi-typeahead .pf-v5-c-text-input-group__text-input")
180+
b.click("#demo-multi-typeahead .pf-v6-c-text-input-group__text-input")
181181
b.wait_visible("#multi-typeahead-widget")
182182
b.key("Escape")
183183
b.wait_not_present("#multi-typeahead-widget")
@@ -207,8 +207,8 @@ class TestLib(testlib.MachineCase):
207207

208208
# Search for non-existent
209209

210-
b.click("#demo-multi-typeahead .pf-v5-c-text-input-group__text-input")
211-
b.set_input_text("#demo-multi-typeahead .pf-v5-c-text-input-group__text-input", "Salmiak")
210+
b.click("#demo-multi-typeahead .pf-v6-c-text-input-group__text-input")
211+
b.set_input_text("#demo-multi-typeahead .pf-v6-c-text-input-group__text-input", "Salmiak")
212212
b.wait_text("#multi-typeahead-widget .pf-v6-c-menu__item", "'Salmiak' not found")
213213
b.click("#demo-multi-typeahead .pf-v6-c-menu-toggle__button")
214214
b.wait_not_present("#multi-typeahead-widget")
@@ -218,8 +218,8 @@ class TestLib(testlib.MachineCase):
218218
# Again with formatted "not found" message
219219

220220
b.set_checked("#notFoundIsStringMulti", val=True)
221-
b.click("#demo-multi-typeahead .pf-v5-c-text-input-group__text-input")
222-
b.set_input_text("#demo-multi-typeahead .pf-v5-c-text-input-group__text-input", "Salmiaki")
221+
b.click("#demo-multi-typeahead .pf-v6-c-text-input-group__text-input")
222+
b.set_input_text("#demo-multi-typeahead .pf-v6-c-text-input-group__text-input", "Salmiaki")
223223
b.wait_text("#multi-typeahead-widget .pf-v6-c-menu__item", "Not found")
224224
b.click("#demo-multi-typeahead .pf-v6-c-menu-toggle__button")
225225
b.wait_not_present("#multi-typeahead-widget")
@@ -228,8 +228,8 @@ class TestLib(testlib.MachineCase):
228228

229229
# Search for existing, pixel test, select
230230

231-
b.click("#demo-multi-typeahead .pf-v5-c-text-input-group__text-input")
232-
b.set_input_text("#demo-multi-typeahead .pf-v5-c-text-input-group__text-input", "Rum")
231+
b.click("#demo-multi-typeahead .pf-v6-c-text-input-group__text-input")
232+
b.set_input_text("#demo-multi-typeahead .pf-v6-c-text-input-group__text-input", "Rum")
233233
b.wait_visible("#multi-typeahead-widget")
234234
b.click("#multi-typeahead-widget .pf-v6-c-menu__item")
235235
b.wait_not_present("#multi-typeahead-widget")

test/verify/check-metrics

+10-10
Original file line numberDiff line numberDiff line change
@@ -811,11 +811,11 @@ class TestCurrentMetrics(testlib.MachineCase):
811811
b.wait_not_in_text("#current-metrics-card-cpu", "cpu-piglet")
812812

813813
# Load is a flex, each part looks like "1 min: 1.41,"; wait until the 1min load is low
814-
b.wait(lambda: float(b.text("#load-avg .pf-v5-l-flex div:first-child").split()[-1].rstrip(',')) < 5)
814+
b.wait(lambda: float(b.text("#load-avg .pf-v6-l-flex div:first-child").split()[-1].rstrip(',')) < 5)
815815

816816
m.execute("systemd-run --collect --slice cockpittest --unit load-hog sh -ec "
817817
" 'for i in `seq 500`; do dd if=/dev/urandom of=/dev/zero bs=100K count=500 status=none & done'")
818-
b.wait(lambda: float(b.text("#load-avg .pf-v5-l-flex div:first-child").split()[-1].rstrip(',')) > 15)
818+
b.wait(lambda: float(b.text("#load-avg .pf-v6-l-flex div:first-child").split()[-1].rstrip(',')) > 15)
819819
m.execute("systemctl stop load-hog 2>/dev/null || true") # ok to fail, as the command exits by itself
820820

821821
container_name = "pod-cpu-hog"
@@ -865,7 +865,7 @@ class TestCurrentMetrics(testlib.MachineCase):
865865

866866
# this settles down slowly, don't wait for becoming really quiet
867867
with b.wait_timeout(300):
868-
b.wait(lambda: float(b.text("#load-avg .pf-v5-l-flex div:first-child").split()[-1].rstrip(',')) < 10)
868+
b.wait(lambda: float(b.text("#load-avg .pf-v6-l-flex div:first-child").split()[-1].rstrip(',')) < 10)
869869

870870
# Files with CPU temperature do not exist, nothing is displayed
871871
b.wait_not_present("#current-metrics-card-cpu .temperature")
@@ -1123,7 +1123,7 @@ BEGIN {{
11231123
b.wait(lambda: re.match(r'^(0|[0-9.]+ (kB|B)/s)$', b.text("#current-disks-write"))) # this should stay calm
11241124
# read in popover
11251125
b.click("#current-metrics-card-disks .all-disks-no-gap button")
1126-
b.wait_visible(".pf-v5-c-popover .disks-nowrap")
1126+
b.wait_visible(".pf-v6-c-popover .disks-nowrap")
11271127
b.wait(lambda: re.match(r'^[0-9.]+ (MB|GB)/s$', b.text("[aria-label='Disks usage'] [device-name='vda'] [data-label='Read']")))
11281128
b.wait(lambda: re.match(r'^(0|[0-9.]+ (kB|B)/s)$', b.text("[aria-label='Disks usage'] [device-name='vda'] [data-label='Write']"))) # write should stay calm
11291129
b.wait(lambda: re.match(r'^(0|[0-9.]+ (kB|B)/s)$', b.text("[aria-label='Disks usage'] [device-name='sr0'] [data-label='Read']"))) # other disks should stay calm
@@ -1137,7 +1137,7 @@ BEGIN {{
11371137
m.execute("systemctl stop disk-read-hog")
11381138
b.wait(lambda: re.match(r'^(0|[0-9.]+ (kB|B)/s)$', b.text("[aria-label='Disks usage'] [device-name='vda'] [data-label='Read']"))) # back to quiet
11391139
b.wait(lambda: re.match(r'^(0|[0-9.]+ (kB|B)/s)$', b.text("#current-disks-read"))) # back to quiet
1140-
b.click(".pf-v5-c-popover__close > button")
1140+
b.click(".pf-v6-c-popover__close > button")
11411141
# writing lots of data
11421142
m.execute("systemd-run --collect --slice cockpittest --unit disk-write-hog sh -ec "
11431143
" 'while true; do dd if=/dev/zero of=/var/tmp/blob bs=1M count=100; done'")
@@ -1159,7 +1159,7 @@ BEGIN {{
11591159
m.execute("systemctl stop disk-write-hog")
11601160
b.wait(lambda: re.match(r'^(0|[0-9.]+ (kB|B)/s)$', b.text("[aria-label='Disks usage'] [device-name='vda'] [data-label='Write']"))) # back to quiet
11611161
b.wait(lambda: re.match(r'^(0|[0-9.]+ (kB|B)/s)$', b.text("#current-disks-write"))) # back to quiet
1162-
b.click(".pf-v5-c-popover__close > button")
1162+
b.click(".pf-v6-c-popover__close > button")
11631163
# top service should be podman container busybox-write-hog
11641164
m.execute(f"podman run --rm -d --name busybox-write-hog {self.busybox_image} /bin/ash -c 'while true; do dd if=/dev/urandom of=/testfile bs=20M count=100; done'")
11651165
self.addCleanup(m.execute, "podman rm -f busybox-write-hog || true")
@@ -1433,10 +1433,10 @@ class TestMultiCPU(testlib.MachineCase):
14331433
m.execute("systemd-run --collect --slice cockpittest -p CPUQuota=20% --unit cpu-piglet dd if=/dev/urandom of=/dev/null")
14341434
# View all CPUs
14351435
b.click("#current-metrics-card-cpu button")
1436-
b.wait(lambda: int(b.text(".pf-v5-c-popover .cpu-all dd:nth-of-type(1)")[:-1]) > 40)
1437-
b.wait(lambda: int(b.text(".pf-v5-c-popover .cpu-all dd:nth-of-type(2)")[:-1]) > 15)
1438-
b.click(".pf-v5-c-popover button")
1439-
b.wait_not_present(".pf-v5-c-popover")
1436+
b.wait(lambda: int(b.text(".pf-v6-c-popover .cpu-all dd:nth-of-type(1)")[:-1]) > 40)
1437+
b.wait(lambda: int(b.text(".pf-v6-c-popover .cpu-all dd:nth-of-type(2)")[:-1]) > 15)
1438+
b.click(".pf-v6-c-popover button")
1439+
b.wait_not_present(".pf-v6-c-popover")
14401440

14411441
# the top CPU core runs cpu-hog
14421442
b.wait(lambda: b.get_pf_progress_value("#current-top-cpu-usage") >= 38)

test/verify/check-networkmanager-firewall

+2-2
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class TestFirewall(netlib.NetworkCase):
201201
b.wait_js_func("((sel, count) => ph_count(sel) == count)", ".zone-section table.ct-table tbody", len(active_rules))
202202

203203
b.click(".zone-section[data-id='public'] tr[data-row-id='pop3'] #expand-togglepop3")
204-
b.wait_in_text(".zone-section[data-id='public'] tbody.pf-m-expanded tr.pf-v5-c-table__expandable-row", "Post Office Protocol")
204+
b.wait_in_text(".zone-section[data-id='public'] tbody.pf-m-expanded tr.pf-v6-c-table__expandable-row", "Post Office Protocol")
205205

206206
b.click(".zone-section[data-id='public'] tr[data-row-id='pop3'] button.pf-v6-c-menu-toggle")
207207
b.click(".zone-section[data-id='public'] .pf-v6-c-menu__list-item.pf-m-danger button")
@@ -295,7 +295,7 @@ class TestFirewall(netlib.NetworkCase):
295295
addService('public', 'pop3')
296296
addService('public', 'freeipa-4')
297297
b.click(".zone-section[data-id='public'] tr[data-row-id='freeipa-4'] #expand-togglefreeipa-4")
298-
b.wait_visible(".zone-section[data-id='public'] tbody.pf-m-expanded .pf-v5-c-table__expandable-row:contains(Included Services)")
298+
b.wait_visible(".zone-section[data-id='public'] tbody.pf-m-expanded .pf-v6-c-table__expandable-row:contains(Included Services)")
299299
b.click(".zone-section[data-id='public'] tr[data-row-id='freeipa-4'] #expand-togglefreeipa-4")
300300

301301
# pop3 should now not appear any more in Add Services dialog

test/verify/check-packagekit

+8-8
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class TestUpdates(NoSubManCase):
119119
good_count = 0
120120
for _ in range(60):
121121
classes = self.browser.attr(self.update_icon, "class")
122-
if classes is not None and "pf-v5-c-spinner" in classes:
122+
if classes is not None and "pf-v6-c-spinner" in classes:
123123
good_count = 0
124124
else:
125125
good_count += 1
@@ -192,7 +192,7 @@ echo -e "Loaded patch modules:\nkpatch_3_10_0_1062_1_1 [enabled]\n\nInstalled pa
192192
self.addCleanup(m.execute, "umount /usr/sbin/kpatch")
193193

194194
b.click("#status .pf-v6-c-card__actions button")
195-
b.wait_visible(".pf-v5-c-badge:contains('patches')")
195+
b.wait_visible(".pf-v6-c-badge:contains('patches')")
196196
b.click("button:contains('Install kpatch updates')")
197197
b.click("button:contains('Continue')")
198198
b.wait_in_text("#status", "Kernel live patch kpatch_3_10_0_1062_1_1 is active")
@@ -713,7 +713,7 @@ ExecStart=/usr/local/bin/{packageName}
713713
ch = b.eval_js(f"document.querySelector(\"{sel + ' td.changelog'}\").innerHTML")
714714
self.assertNotIn("<li>", ch)
715715
self.assertNotIn("*", ch)
716-
# should show bug fix icon and pf-v5-c-tooltip
716+
# should show bug fix icon and pf-v6-c-tooltip
717717
self.assertEqual(b.attr(sel + " .severity-icon", "aria-label"), "bug fix")
718718
b.mouse(sel + " .severity-icon", "mouseenter")
719719
b.wait_text(".pf-v6-c-tooltip", "bug fix")
@@ -758,7 +758,7 @@ ExecStart=/usr/local/bin/{packageName}
758758

759759
# history on restart page should show the three security updates
760760
b.click(".pf-v6-c-expandable-section__toggle")
761-
self.assertHistory(".pf-v5-c-expandable-section ul", ["secdeclare", "secparse", "sevcritical"])
761+
self.assertHistory(".pf-v6-c-expandable-section ul", ["secdeclare", "secparse", "sevcritical"])
762762

763763
# ignore restarting
764764
b.click("#ignore")
@@ -794,7 +794,7 @@ ExecStart=/usr/local/bin/{packageName}
794794

795795
# history on restart page should show the three non-security updates
796796
b.click(".pf-v6-c-expandable-section__toggle")
797-
self.assertHistory(".pf-v5-c-expandable-section ul", ["buggy", "norefs-bin", "norefs-doc"])
797+
self.assertHistory(".pf-v6-c-expandable-section ul", ["buggy", "norefs-bin", "norefs-doc"])
798798

799799
if any(fnmatch.fnmatch(m.image, img) for img in OSesWithoutTracer):
800800
# do the reboot; this will disconnect the web UI
@@ -1179,10 +1179,10 @@ class TestKpatchInstall(NoSubManCase):
11791179
b.wait_in_text("#kpatch-settings", "Not available")
11801180
# show unavailable packages in popover
11811181
b.click("#kpatch-settings .ct-info-circle")
1182-
b.wait_in_text(".pf-v5-c-popover", "Unavailable packages")
1183-
b.wait_in_text(".pf-v5-c-popover", "kpatch-dnf")
1182+
b.wait_in_text(".pf-v6-c-popover", "Unavailable packages")
1183+
b.wait_in_text(".pf-v6-c-popover", "kpatch-dnf")
11841184
b.click("#kpatch-settings .ct-info-circle")
1185-
b.wait_not_present(".pf-v5-c-popover")
1185+
b.wait_not_present(".pf-v6-c-popover")
11861186

11871187
dummy_service = "[Service]\nExecStart=/bin/sleep infinity\n[Install]\nWantedBy=multi-user.target\n"
11881188
self.createPackage("kpatch", "999", "1", content={"/lib/systemd/system/kpatch.service": dummy_service})

test/verify/check-pages

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ OnCalendar=daily
217217
# TestSystemInfo.testHardwareInfo does this more carefully
218218
b.go("/system/hwinfo")
219219
b.enter_page("/system/hwinfo")
220-
b.wait_in_text('#hwinfo-system-info-list .hwinfo-system-info-list-item:nth-of-type(2) .pf-v5-c-description-list__group:nth-of-type(3) dd', " 20")
220+
b.wait_in_text('#hwinfo-system-info-list .hwinfo-system-info-list-item:nth-of-type(2) .pf-v6-c-description-list__group:nth-of-type(3) dd', " 20")
221221

222222
# Check the playground page
223223
b.switch_to_top()
@@ -439,7 +439,7 @@ OnCalendar=daily
439439

440440
self.login_and_go()
441441

442-
filter_sel = ".pf-v5-c-text-input-group__text-input"
442+
filter_sel = ".pf-v6-c-text-input-group__text-input"
443443

444444
# Check that some page disappears and some stay
445445
b.focus(filter_sel)

0 commit comments

Comments
 (0)