Skip to content

Commit cd079d9

Browse files
Merge pull request #11231 from rabbitmq/mergify/bp/v3.13.x/pr-11226
Fix a management UI issue with a page refresh after logging out (backport #11226)
2 parents 76c7910 + 4bf66ab commit cd079d9

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

deps/rabbitmq_management/priv/www/js/dispatcher.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ dispatcher_add(function(sammy) {
341341
oauth_initiateLogout();
342342
}else {
343343
go_to_home()
344-
// location.reload();
345344
}
346345
});
347346

deps/rabbitmq_management/priv/www/js/oidc-oauth/helper.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ function oauth_redirectToHome(oauth) {
225225
function go_to(path) {
226226
location.href = rabbit_path_prefix() + "/" + path
227227
}
228+
function go_to_home() {
229+
location.href = rabbit_path_prefix() + "/"
230+
}
228231
function go_to_authority() {
229232
location.href = oauth.authority
230233
}

deps/rabbitmq_management/selenium/test/basic-auth/logout.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ describe('When a logged in user', function () {
2222
it('logs out', async function () {
2323
await loginPage.login('guest', 'guest')
2424
await overview.isLoaded()
25+
await overview.selectRefreshOption("Do not refresh")
2526
await overview.logout()
2627
await loginPage.isLoaded()
2728
})

deps/rabbitmq_management/selenium/test/pageobjects/BasePage.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const MENU_TABS = By.css('div#menu ul#tabs')
44
const USER = By.css('li#logout')
55
const LOGOUT_FORM = By.css('li#logout form')
66
const SELECT_VHOSTS = By.css('select#show-vhost')
7-
7+
const SELECT_REFRESH = By.css('ul#topnav li#interval select#update-every')
88
const OVERVIEW_TAB = By.css('div#menu ul#tabs li#overview')
99
const CONNECTIONS_TAB = By.css('div#menu ul#tabs li#connections')
1010
const CHANNELS_TAB = By.css('div#menu ul#tabs li#channels')
@@ -36,7 +36,9 @@ module.exports = class BasePage {
3636
async getUser () {
3737
return this.getText(USER)
3838
}
39-
39+
async selectRefreshOption(option) {
40+
return this.selectOption(SELECT_REFRESH, option)
41+
}
4042
async waitForOverviewTab() {
4143
return this.waitForDisplayed(OVERVIEW_TAB)
4244
}

0 commit comments

Comments
 (0)