Skip to content

Commit

Permalink
WIP Test amqp10 connection information in mangement ui
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcialRosales committed Nov 15, 2024
1 parent 3846e5e commit d4d246d
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deps/rabbitmq_management/priv/www/js/tmpl/connections.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h1>Connections</h1>
<div class="section">
<div class="section" id="connections-paging-section">
<%= paginate_ui(connections, 'connections') %>
</div>
<div class="updatable">
<div class="updatable" id="connections-table-section">
<% if (connections.items.length > 0) { %>
<table class="list">
<thead>
Expand Down
9 changes: 9 additions & 0 deletions selenium/suites/mgt/amqp10-connections.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

TEST_CASES_PATH=/connections/amqp10
TEST_CONFIG_PATH=/basic-auth

source $SCRIPT/../../bin/suite_template $@
run
43 changes: 43 additions & 0 deletions selenium/test/connections/amqp10/session-flow-control.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const { By, Key, until, Builder } = require('selenium-webdriver')
require('chromedriver')
const assert = require('assert')
const { buildDriver, goToHome, captureScreensFor, teardown } = require('../../utils')

const LoginPage = require('../../pageobjects/LoginPage')
const OverviewPage = require('../../pageobjects/OverviewPage')
const ConnectionsTab = require('../../pageobjects/ConnectionsTab')

describe('Given an amqp10 connection is selected', function () {
let homePage
let captureScreen
let connections

before(async function () {
driver = buildDriver()
await goToHome(driver)
login = new LoginPage(driver)
overview = new OverviewPage(driver)
connections = new ConnectionsTab(driver)
captureScreen = captureScreensFor(driver, __filename)
await login.login('management', 'guest')
await overview.isLoaded()

await overview.clickOnConnectionsTab()
await connections.clickOnConnection()
})

it('can list session information', async function () {
// flow control state
})

it('can list link information', async function () {
// names
// target and source information
// unconfirmed messages
// flow control
})

after(async function () {
await teardown(driver, this, captureScreen)
})
})
25 changes: 25 additions & 0 deletions selenium/test/pageobjects/ConnectionsPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const { By, Key, until, Builder } = require('selenium-webdriver')

const BasePage = require('./BasePage')


const PAGING_SECTION = By.css('div#connections-paging-section')
const PAGING_SECTION_HEADER = By.css('div#connections-paging-section h2')

const TABLE_SECTION = By.css('div#connections-table-section table')

module.exports = class ConnectionsPage extends BasePage {
async isLoaded () {
return this.waitForDisplayed(PAGING_SECTION)
}
async getPagingSectionHeaderText() {
return this.getText(PAGING_SECTION_HEADER)
}
async getConnectionsTable(firstNColumns) {
return this.getTable(TABLE_SECTION, firstNColumns)
}
async clickOnConnection(index) {
return this.click(By.css(
"div#connections-table-section table tbody tr td a[href='#/exchanges/" + vhost + "/" + name + "']"))
}
}

0 comments on commit d4d246d

Please sign in to comment.