Upgrade dependencies for chrome and selenium
This commit is contained in:
parent
0b9ab515ac
commit
b864957d94
|
@ -13,7 +13,7 @@
|
|||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"chromedriver": "^128.0.0",
|
||||
"chromedriver": "^130.0.4",
|
||||
"ejs": "^3.1.8",
|
||||
"express": "^4.18.2",
|
||||
"geckodriver": "^3.0.2",
|
||||
|
@ -21,7 +21,8 @@
|
|||
"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": {
|
||||
|
|
|
@ -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 () {
|
||||
|
@ -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);
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue