che icon indicating copy to clipboard operation
che copied to clipboard

Update 'OcpUserLoginPage' to login in OCP cluster without OAuth config

Open artaleks9 opened this issue 1 year ago • 0 comments

Is your task related to a problem? Please describe

The E2E test DevConsoleIntegration uses the OcpUserLoginPage method to login to OCP cluster, there is a bit hard code - waiting the LoginProviderTitle:

if (OAUTH_CONSTANTS.TS_OCP_LOGIN_PAGE_PROVIDER_TITLE !== '') {
	await this.ocpLogin.waitAndClickOnLoginProviderTitle();
}

https://github.com/eclipse/che/blob/main/tests/e2e/pageobjects/login/openshift/OcpUserLoginPage.ts#L25

In the case when is used OCP cluster without OAuth config the test DevConsoleIntegration is failure.

Describe the solution you'd like

This can be resolved by update the OcpUserLoginPage method to replace the condition expression: if (await this.ocpLogin.isIdentityProviderLinkVisible())

E.g. -> https://github.com/eclipse/che/blob/main/tests/e2e/pageobjects/login/openshift/RegularUserOcpCheLoginPage.ts#L44

This allows to run the test on OCP cluster as with OAuth config , as without the one.

Describe alternatives you've considered

No response

Additional context

No response

artaleks9 avatar Feb 15 '24 14:02 artaleks9