v0.33.7
This commit is contained in:
1 parent
162e986d37
commit
f462ca7194
26 files changed
+980
-710
No files matched your search
@@ -166,13 +166,25 @@ with sync_playwright() as p:
|
||||
window.rustProxyStreamDashboard.render(status);
|
||||
}''')
|
||||
assert_visible(page, ['backend_health'], ['backend_traffic'])
|
||||
# Restore defaults in the modal after a custom layout was saved.
|
||||
# 0.33.7: the former layout modal is a preset manager and must not mutate
|
||||
# the active custom layout merely by opening/closing it.
|
||||
page.locator('#overview-layout-open').evaluate('(node) => node.hidden = false')
|
||||
page.locator('#overview-layout-open').click()
|
||||
page.wait_for_function("document.getElementById('overview-layout-dialog').open")
|
||||
page.locator('#overview-layout-default').click()
|
||||
page.locator('#overview-layout-save').click()
|
||||
assert page.locator('#overview-preset-name').is_visible()
|
||||
assert page.locator('#overview-layout-default').count() == 0
|
||||
assert_visible(page, ['backend_health'], ['backend_traffic'])
|
||||
page.locator('#overview-layout-cancel').click()
|
||||
page.wait_for_function("!document.getElementById('overview-layout-dialog').open")
|
||||
assert_visible(page, ['backend_health'], ['backend_traffic'])
|
||||
# Restore factory defaults through the same account preference API used
|
||||
# by Settings/inline editing rather than the preset manager.
|
||||
page.evaluate('''preset => window.rustProxyPreferences.update({
|
||||
dashboard_density: preset.dashboard_density,
|
||||
dashboard_widgets: [...preset.dashboard_widgets],
|
||||
dashboard_hidden_widgets: [...preset.dashboard_hidden_widgets],
|
||||
dashboard_widget_sizes: null,
|
||||
})''', PRESET)
|
||||
assert_visible(page, ['backend_traffic'], ['backend_health', 'stream_sessions', 'www_status'])
|
||||
assert page.evaluate('window.__savedDashboard.dashboard_widgets') == PRESET['dashboard_widgets']
|
||||
assert page.evaluate('window.__savedDashboard.dashboard_hidden_widgets') == PRESET['dashboard_hidden_widgets']
|
||||
|
||||
Reference in new issue
Block a user