Skip to content

Commit 8a661c9

Browse files
Impove logic that checks for non-visible
1 parent f87f42d commit 8a661c9

File tree

17 files changed

+71
-56
lines changed

17 files changed

+71
-56
lines changed

selenium/bin/components/forward-proxy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ start_forward-proxy() {
4242
--mount "type=bind,source=${MOUNT_HTTPD_CONFIG_DIR},target=/usr/local/apache2/conf" \
4343
${HTTPD_DOCKER_IMAGE}
4444

45-
wait_for_url $OAUTH_PROVIDER_URL ${FORWARD_PROXY_URL}
45+
#wait_for_url $OAUTH_PROVIDER_URL ${FORWARD_PROXY_URL}
4646
end "forward-proxy is ready"
4747
}

selenium/bin/suite_template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,6 @@ elif [[ "$COMMAND" == "stop-rabbitmq" ]]
524524
stop_local_rabbitmq
525525
elif [[ "$COMMAND" == "start-others" ]]
526526
then
527-
trap "teardown_components" EXIT
528527
start_local_others
529528
elif [[ "$COMMAND" == "ensure-others" ]]
530529
then

selenium/test/basic-auth/ac-management.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,35 +27,35 @@ describe('management user with vhosts permissions', function () {
2727
it('can access overview tab', async function () {
2828
await overview.clickOnOverviewTab()
2929
await overview.waitForOverviewTab()
30-
assert.ok(!await overview.isPopupWarningDisplayed())
30+
assert.ok(await overview.isPopupWarningNotDisplayed())
3131
})
3232
it('can access connections tab', async function () {
3333
await overview.clickOnConnectionsTab()
3434
await overview.waitForConnectionsTab()
35-
assert.ok(!await overview.isPopupWarningDisplayed())
35+
assert.ok(await overview.isPopupWarningNotDisplayed())
3636
})
3737
it('can access channels tab', async function () {
3838
await overview.clickOnChannelsTab()
3939
await overview.waitForChannelsTab()
40-
assert.ok(!await overview.isPopupWarningDisplayed())
40+
assert.ok(await overview.isPopupWarningNotDisplayed())
4141
})
4242
it('can access exchanges tab', async function () {
4343
await overview.clickOnExchangesTab()
4444
await overview.waitForExchangesTab()
45-
assert.ok(!await overview.isPopupWarningDisplayed())
45+
assert.ok(await overview.isPopupWarningNotDisplayed())
4646
})
4747
it('can access queues and streams tab', async function () {
4848
await overview.clickOnQueuesTab()
4949
await overview.waitForQueuesTab()
50-
assert.ok(!await overview.isPopupWarningDisplayed())
50+
assert.ok(await overview.isPopupWarningNotDisplayed())
5151
})
5252
it('can access limited options in admin tab', async function () {
5353
console.log("before clickOnAdminTab")
5454
await overview.clickOnAdminTab()
5555
console.log("before waitForAdminTab")
5656
await overview.waitForAdminTab()
5757
console.log("after waitForAdminTab")
58-
assert.ok(!await overview.isPopupWarningDisplayed())
58+
assert.ok(await overview.isPopupWarningNotDisplayed())
5959
})
6060

6161
it('cannot add/update user limits', async function () {

selenium/test/basic-auth/unauthorized.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ describe('An user without management tag', function () {
1919
overview = new OverviewPage(driver)
2020
captureScreen = captureScreensFor(driver, __filename)
2121

22-
//assert.ok(!await login.isPopupWarningDisplayed())
2322
await login.login('rabbit_no_management', 'guest')
2423
})
2524

@@ -45,8 +44,8 @@ describe('An user without management tag', function () {
4544

4645
it('should close popup warning', async function(){
4746
await delay(1000)
48-
const visible = await login.isPopupWarningDisplayed()
49-
assert.ok(!visible)
47+
const visible =
48+
assert.ok(await login.isPopupWarningNotDisplayed())
5049
})
5150

5251
})

selenium/test/multi-oauth/with-basic-auth/landing.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ describe('Given two oauth resources and basic auth enabled, an unauthenticated u
4545
})
4646

4747
it('should not have a warning message', async function () {
48-
const visible = await homePage.isWarningVisible()
49-
assert.ok(!visible)
48+
assert.ok(await homePage.isWarningNotVisible())
5049
})
5150

5251

selenium/test/multi-oauth/without-basic-auth/happy-login.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('Given there are three oauth resources but two enabled', function () {
3232
if (!await overview.isLoaded()) {
3333
throw new Error('Failed to login')
3434
}
35-
assert.ok(!await overview.isPopupWarningDisplayed())
35+
assert.ok(await overview.isPopupWarningNotDisplayed())
3636
await overview.logout()
3737
})
3838
it('prod_user registered in prodkeycloak can log in using RabbitMQ Development OAuth 2.0 resource', async function () {
@@ -46,7 +46,7 @@ describe('Given there are three oauth resources but two enabled', function () {
4646
if (!await overview.isLoaded()) {
4747
throw new Error('Failed to login')
4848
}
49-
assert.ok(!await overview.isPopupWarningDisplayed())
49+
assert.ok(await overview.isPopupWarningNotDisplayed())
5050
await overview.logout()
5151
})
5252

selenium/test/multi-oauth/without-basic-auth/landing.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ describe('Given three oauth resources but only two enabled, an unauthenticated u
3939
})
4040

4141
it('should not be presented with a login button to log in using Basic Auth', async function () {
42-
assert.ok(!await homePage.isBasicAuthSectionVisible())
42+
assert.ok(await homePage.isBasicAuthSectionNotVisible())
4343
})
4444

4545
it('should not have a warning message', async function () {
46-
assert.ok(!await homePage.isWarningVisible())
46+
assert.ok(await homePage.isWarningNotVisible())
4747
})
4848

4949

selenium/test/oauth/forward-proxy/httpd.conf

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -503,18 +503,25 @@ SSLRandomSeed connect builtin
503503
</IfModule>
504504

505505
<VirtualHost *:9092>
506-
ServerName "forward-proxy"
507-
ProxyRequests On
508-
ProxyVia On
509506
SSLEngine on
510507
SSLCertificateKeyFile ${FORWARD_PROXY_CERTS}/server_forward-proxy_key.pem
511508
SSLCertificateFile ${FORWARD_PROXY_CERTS}/server_forward-proxy_certificate.pem
512-
509+
SSLProxyMachineCertificateFile ${FORWARD_PROXY_CERTS}/server_forward-proxy_certificate.pem
510+
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
513511
SSLProxyEngine On
514-
SSLProxyVerify none
515-
SSLProxyVerifyDepth 10
516-
512+
513+
# SSLProxyVerify none
514+
# SSLProxyCheckPeerCN off
515+
# SSLProxyCheckPeerName off
516+
# SSLProxyCheckPeerExpire off
517+
518+
ProxyRequests On
519+
ProxyVia On
520+
SSLProxyProtocol +TLSv1.2
521+
LogLevel debug
522+
517523
<Proxy "*">
518524
Allow from all
525+
SSLProxyProtocol +TLSv1.2
519526
</Proxy>
520527
</VirtualHost>

selenium/test/oauth/with-basic-auth/landing.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ describe('A user which accesses any protected URL without a session where basic
3030
})
3131

3232
it('should not have a warning message', async function () {
33-
const visible = await homePage.isWarningVisible()
34-
assert.ok(!visible)
33+
assert.ok(await homePage.isWarningVisible())
3534
})
3635

3736

selenium/test/oauth/with-basic-auth/unauthorized.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ describe('An user without management tag', function () {
3535
it('should get "Not authorized" warning message', async function(){
3636
assert.equal('Not authorized', await homePage.getWarning())
3737
assert.equal('Click here to logout', await homePage.getLogoutButton())
38-
assert.ok(!await homePage.isBasicAuthSectionVisible())
39-
assert.ok(!await homePage.isOAuth2SectionVisible())
38+
assert.ok(await homePage.isBasicAuthSectionNotVisible())
39+
assert.ok(await homePage.isOAuth2SectionNotVisible())
4040
})
4141

4242
describe("After clicking on logout button", function() {
@@ -46,8 +46,7 @@ describe('An user without management tag', function () {
4646
})
4747

4848
it('should get redirected to home page again without error message', async function(){
49-
const visible = await homePage.isWarningVisible()
50-
assert.ok(!visible)
49+
assert.ok(await homePage.isWarningNotVisible())
5150
})
5251

5352
})

0 commit comments

Comments
 (0)