Skip to content

Commit

Permalink
Upgrade dependencies for chrome and selenium
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcialRosales committed Nov 15, 2024
1 parent c60a842 commit b0f1fbb
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 9 deletions.
5 changes: 3 additions & 2 deletions selenium/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@
"author": "",
"license": "ISC",
"dependencies": {
"chromedriver": "^128.0.0",
"chromedriver": "^130.0.4",
"ejs": "^3.1.8",
"express": "^4.18.2",
"geckodriver": "^3.0.2",
"http-proxy": "^1.18.1",
"mqtt": "^5.3.3",
"path": "^0.12.7",
"proxy": "^1.0.2",
"selenium-webdriver": "^4.19.0",
"rhea": "^3.0.3",
"selenium-webdriver": "^4.26.0",
"xmlhttprequest": "^1.8.0"
},
"devDependencies": {
Expand Down
48 changes: 41 additions & 7 deletions selenium/test/connections/amqp10/session-flow-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,51 @@ const { buildDriver, goToHome, captureScreensFor, teardown } = require('../../ut

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

describe('Given an amqp10 connection is selected', function () {
let homePage
var container = require('rhea')
container.on('message', function (context) {
console.log("Received message : " + context.message.body)
})
container.once('sendable', function (context) {
console.log("Sending message ..")
context.sender.send({body:'Hello World!'})
})


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

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

connection = container.connect(
{'host': process.env.RABBITMQ_HOSTNAME || 'rabbitmq',
'port': process.env.RABBITMQ_AMQP_PORT || 5672,
'username' : process.env.RABBITMQ_AMQP_USERNAME || 'guest',
'password' : process.env.RABBITMQ_AMQP_PASSWORD || 'guest',
'id': "selenium-connection-id",
'container-id': "selenium-container-id"
})
connection.open_receiver('examples')
connection.open_sender('examples')

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

console.log("Wait until connections page is loaded")
await connectionsPage.isLoaded()
console.log("Getting connections ..")
connections_table = await connectionsPage.getConnectionsTable(20)
console.log("a :" + connections_table)
})

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

after(async function () {
after(async function () {
await teardown(driver, this, captureScreen)
try {
if (connection != null) {
connection.close()
}
} catch (error) {
console.error("Failed to close amqp10 connection due to " + error);
}
})

})

0 comments on commit b0f1fbb

Please sign in to comment.