Skip to content

Commit d4d246d

Browse files
WIP Test amqp10 connection information in mangement ui
1 parent 3846e5e commit d4d246d

File tree

4 files changed

+79
-2
lines changed

4 files changed

+79
-2
lines changed

deps/rabbitmq_management/priv/www/js/tmpl/connections.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<h1>Connections</h1>
2-
<div class="section">
2+
<div class="section" id="connections-paging-section">
33
<%= paginate_ui(connections, 'connections') %>
44
</div>
5-
<div class="updatable">
5+
<div class="updatable" id="connections-table-section">
66
<% if (connections.items.length > 0) { %>
77
<table class="list">
88
<thead>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4+
5+
TEST_CASES_PATH=/connections/amqp10
6+
TEST_CONFIG_PATH=/basic-auth
7+
8+
source $SCRIPT/../../bin/suite_template $@
9+
run
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
const { By, Key, until, Builder } = require('selenium-webdriver')
2+
require('chromedriver')
3+
const assert = require('assert')
4+
const { buildDriver, goToHome, captureScreensFor, teardown } = require('../../utils')
5+
6+
const LoginPage = require('../../pageobjects/LoginPage')
7+
const OverviewPage = require('../../pageobjects/OverviewPage')
8+
const ConnectionsTab = require('../../pageobjects/ConnectionsTab')
9+
10+
describe('Given an amqp10 connection is selected', function () {
11+
let homePage
12+
let captureScreen
13+
let connections
14+
15+
before(async function () {
16+
driver = buildDriver()
17+
await goToHome(driver)
18+
login = new LoginPage(driver)
19+
overview = new OverviewPage(driver)
20+
connections = new ConnectionsTab(driver)
21+
captureScreen = captureScreensFor(driver, __filename)
22+
await login.login('management', 'guest')
23+
await overview.isLoaded()
24+
25+
await overview.clickOnConnectionsTab()
26+
await connections.clickOnConnection()
27+
})
28+
29+
it('can list session information', async function () {
30+
// flow control state
31+
})
32+
33+
it('can list link information', async function () {
34+
// names
35+
// target and source information
36+
// unconfirmed messages
37+
// flow control
38+
})
39+
40+
after(async function () {
41+
await teardown(driver, this, captureScreen)
42+
})
43+
})
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const { By, Key, until, Builder } = require('selenium-webdriver')
2+
3+
const BasePage = require('./BasePage')
4+
5+
6+
const PAGING_SECTION = By.css('div#connections-paging-section')
7+
const PAGING_SECTION_HEADER = By.css('div#connections-paging-section h2')
8+
9+
const TABLE_SECTION = By.css('div#connections-table-section table')
10+
11+
module.exports = class ConnectionsPage extends BasePage {
12+
async isLoaded () {
13+
return this.waitForDisplayed(PAGING_SECTION)
14+
}
15+
async getPagingSectionHeaderText() {
16+
return this.getText(PAGING_SECTION_HEADER)
17+
}
18+
async getConnectionsTable(firstNColumns) {
19+
return this.getTable(TABLE_SECTION, firstNColumns)
20+
}
21+
async clickOnConnection(index) {
22+
return this.click(By.css(
23+
"div#connections-table-section table tbody tr td a[href='#/exchanges/" + vhost + "/" + name + "']"))
24+
}
25+
}

0 commit comments

Comments
 (0)