Skip to content

Commit b0f1fbb

Browse files
Upgrade dependencies for chrome and selenium
1 parent c60a842 commit b0f1fbb

File tree

2 files changed

+44
-9
lines changed

2 files changed

+44
-9
lines changed

selenium/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@
1313
"author": "",
1414
"license": "ISC",
1515
"dependencies": {
16-
"chromedriver": "^128.0.0",
16+
"chromedriver": "^130.0.4",
1717
"ejs": "^3.1.8",
1818
"express": "^4.18.2",
1919
"geckodriver": "^3.0.2",
2020
"http-proxy": "^1.18.1",
2121
"mqtt": "^5.3.3",
2222
"path": "^0.12.7",
2323
"proxy": "^1.0.2",
24-
"selenium-webdriver": "^4.19.0",
24+
"rhea": "^3.0.3",
25+
"selenium-webdriver": "^4.26.0",
2526
"xmlhttprequest": "^1.8.0"
2627
},
2728
"devDependencies": {

selenium/test/connections/amqp10/session-flow-control.js

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,51 @@ const { buildDriver, goToHome, captureScreensFor, teardown } = require('../../ut
55

66
const LoginPage = require('../../pageobjects/LoginPage')
77
const OverviewPage = require('../../pageobjects/OverviewPage')
8-
const ConnectionsTab = require('../../pageobjects/ConnectionsTab')
8+
const ConnectionsPage = require('../../pageobjects/ConnectionsPage')
99

10-
describe('Given an amqp10 connection is selected', function () {
11-
let homePage
10+
var container = require('rhea')
11+
container.on('message', function (context) {
12+
console.log("Received message : " + context.message.body)
13+
})
14+
container.once('sendable', function (context) {
15+
console.log("Sending message ..")
16+
context.sender.send({body:'Hello World!'})
17+
})
18+
19+
20+
describe('Given an amqp10 connection is selected', function () {
1221
let captureScreen
13-
let connections
22+
let connectionsPage
23+
let connection
1424

1525
before(async function () {
1626
driver = buildDriver()
1727
await goToHome(driver)
1828
login = new LoginPage(driver)
1929
overview = new OverviewPage(driver)
20-
connections = new ConnectionsTab(driver)
30+
connectionsPage = new ConnectionsPage(driver)
2131
captureScreen = captureScreensFor(driver, __filename)
2232
await login.login('management', 'guest')
2333
await overview.isLoaded()
34+
35+
connection = container.connect(
36+
{'host': process.env.RABBITMQ_HOSTNAME || 'rabbitmq',
37+
'port': process.env.RABBITMQ_AMQP_PORT || 5672,
38+
'username' : process.env.RABBITMQ_AMQP_USERNAME || 'guest',
39+
'password' : process.env.RABBITMQ_AMQP_PASSWORD || 'guest',
40+
'id': "selenium-connection-id",
41+
'container-id': "selenium-container-id"
42+
})
43+
connection.open_receiver('examples')
44+
connection.open_sender('examples')
2445

2546
await overview.clickOnConnectionsTab()
26-
await connections.clickOnConnection()
47+
48+
console.log("Wait until connections page is loaded")
49+
await connectionsPage.isLoaded()
50+
console.log("Getting connections ..")
51+
connections_table = await connectionsPage.getConnectionsTable(20)
52+
console.log("a :" + connections_table)
2753
})
2854

2955
it('can list session information', async function () {
@@ -37,7 +63,15 @@ describe('Given an amqp10 connection is selected', function () {
3763
// flow control
3864
})
3965

40-
after(async function () {
66+
after(async function () {
4167
await teardown(driver, this, captureScreen)
68+
try {
69+
if (connection != null) {
70+
connection.close()
71+
}
72+
} catch (error) {
73+
console.error("Failed to close amqp10 connection due to " + error);
74+
}
4275
})
76+
4377
})

0 commit comments

Comments
 (0)