Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing RDS UI changes and the application to instance binding #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ikanias
Copy link
Collaborator

@ikanias ikanias commented Mar 12, 2023

Fixed the changes Dev added to RDS UI and verified that the test of binding an application to a DBSC works properly.

@@ -30,7 +30,7 @@ User Creates Service Binding Between ${databaseProvider} DBSC Instance And Impor
${bindName}= Update Service Binding ${newProject} ${instanceUUID} ${appname}
Set Test Variable ${bindName}
Create Service Binding ${newProject}
Wait Until Keyword Succeeds 3x 1s Wait Until Page Contains Element ${elemSrvcBindArrow}
Wait Until Keyword Succeeds 10x 1s Wait Until Page Contains Element ${elemSrvcBindArrow}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias Do we need 10s wait time?

Copy link
Collaborator Author

@ikanias ikanias Mar 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrrajan if we use less then that most of the times the test will fail. Happend to me a lot when I ran the tests.

Copy link
Collaborator

@mrrajan mrrajan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias I have added review comments and Please attach the test results

${btnMenuOptDropDownUpd}= Replace String ${btnMenuOptDropDown} <<menuopt>> ${option}
Element Should Be Visible ${btnMenuOptDropDownUpd}
Click Element ${btnMenuOptDropDownUpd}
Wait Until Keyword Succeeds 10s 1s Wait Until Element Is Visible ${btnMenuDropDown}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias Do we need this change? The earlier one was dynamic and capable of selecting dropdown values from given menu option like
"Select Import Database Provider Account From Configure Button DropDown"
"Select Create Database Instance From Configure Button DropDown"

Copy link
Collaborator Author

@ikanias ikanias Mar 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous one is not working anymore and the tests are failing over it, because the 'menu' we were looking for does not exist anymore in the DOM

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias Can you please review again, As the keyword "Select ${option} From ${menu} Button DropDown" updated dynamically and it worked as expected. Attached the screenshot
Screenshot from 2023-03-29 16-11-44

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange... Sure will try again

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way it worked for me too before even when I removed these lines:
${btnMenuOptDropDownUpd}= Replace String ${btnMenuOptDropDown} <> ${option}
Element Should Be Visible ${btnMenuOptDropDownUpd}
Click Element ${btnMenuOptDropDownUpd}
So probably these commands(the ones I removed) are either redundant or not used.
The function 'Select {option} from {menu} Button DropDown' worked for me as well

Element Should Be Visible ${btnMenuOptDropDown}
Click Element ${btnMenuOptDropDown}

Select ${option} From ${menu} Button DropDown Provision
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias As mentioned on the above, this is been already handled with existing keyword

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in my previous reply, the 'menu' parameter is not working properly anymore and is not displayed in the DOM anymore

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@@ -284,6 +288,14 @@ User Imports ${isv} Provider Account Using CLI
Provider Account Imported Successfully Using CLI
Wait Until Keyword Succeeds 4x 5s Describe Provider Account Using OC CLI

User Navigates To Add ${databaseProvider} Topology Screen From Developer View
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias Duplicate - Keyword "User Navigates To Add Topology Screen From Developer View" available under import_provider_account.resource file, where the database provider can be send as a parameter like "User Navigates To Add Topology Screen From Developer View MongoDB"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK got it. I see that the other function is:
User Navigates To Add Topology Screen From Developer View
[Arguments] ${databaseProvider} ${ns}=${operatorNamespace} ${developer}=False
User Selects Developer View
User Filters ${ns} Namespace On Project Dropdown
User Navigates To Developers Catalog Add Screen
IF "${developer}"=="False"
User Clicks On Cloud Hosted Database Menu
User Selects ${databaseProvider} Tile Under Cloud Hosted Database
Click Element ${btnDBProvAddTopology}
END

Is this the one we should keep?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK got you. fixed it to be as you described.

@@ -322,8 +334,10 @@ Import Provider Account Failure For DBaaS Policy
Wait Until Page Contains Element ${errCreateDBaaSPolicy} timeout=20s

User Navigates To Import ${databaseProvider} Provider Account On Developer View
User Navigates To Add Topology Screen From Developer View ${databaseProvider} ${DBaaSTestNS}
User Navigates To Import Provider Account Screen From Developer View
Wait Until Page Contains Element ${txtNoDBInstance} timeout=15s
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias The existing keywords should not be removed for the success of other test cases. I hope this section has been included to mitigate No database instance error message, which can be handled with conditional block.


*** Keywords ***
User Navigates To Create Database Instance Screen From Database Access Page
User Navigates To Database Access Under Data Services
Wait Until Page Contains Element ${titleDatabaseAccess}
Select Create Database Instance From Configure Button DropDown
Select Create Database Instance From Configuration Button DropDown Provision
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias This is been discussed on earlier comment

Copy link
Collaborator Author

@ikanias ikanias Mar 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the value in the drop down list was changed, so I changed the name of the function. The reason is to verify that if there are other tests or keywords that are using the old keyword.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please review as I recall version 0.5.0 uses "Configure" option and "Configuration" used in earlier versions.

Select Create Database Instance From Configure Button DropDown
Select Create Database Instance From Configuration Button DropDown Provision

Select ${option} From ${menu} Button DropDown Provision
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate

Copy link
Collaborator Author

@ikanias ikanias Mar 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as the previous comment

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review with earlier comments

@@ -36,10 +44,20 @@ Toggle Database Provider Drop Down ${isv_name}
... Toggle RDS Database ${engine} Drop Down

Toggle RDS Database ${engine} Drop Down
Select From List By Label ${engineTypeDrpDwn} Select one
Select From List By Label ${engineTypeDrpDwn} ${engine}
#Select From List By Label ${engineTypeDrpDwn} Select one
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias Please remove the commented keywords and keep the comments. Do we need 15s x 2s wait time for the value on list to be selected?

Copy link
Collaborator Author

@ikanias ikanias Mar 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you are saying. I just wanted to leave the commented keywords so we would know how to change back when the bug will be fixed. This is temporary.
If this is still an issue I will remove it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias Can you please review as the bug marked as done and unresolved. And Please review the wait time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK will check.

Element Should Be Visible ${engineTypeDrpDwnOptn}

Toggle RDS Instance Class Drop Down
#Select From List By Label ${instClassDrpDwn} Select one
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias Please remove the commented keyword

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this is because of the same reason as my previous comment. If this is still an issue I will remove it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review

@@ -27,8 +27,9 @@ ${btnCreateEnabled} //button[contains(.,"Create") and @aria-disabled
${lblDBInstSuccess} //h2[contains(.,"Database instances") and contains(.,"successful")]
${btnViewProviderAcc} //button[contains(.,"View Provider Accounts")]
${tblInstanceTable} id:instance-table
${btnMenuDropDown} //button[contains(.,"<<menu>>")]
${btnMenuOptDropDown} //a[contains(.,"<<menuopt>>")]
${btnMenuDropDown} //*[@id="toggle-id-4"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These might removed based on the above comments

Copy link
Collaborator Author

@ikanias ikanias Mar 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at my previous comments. The "menu" we look for does not exist anymore in the DOM and it fails all the tests.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review based on the earlier comments

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@@ -6,7 +6,7 @@ Object Repository for Installed Operators Screen
${elemDbaasStatus} //a[contains(.,"OpenShift Database Access Operator")]//ancestor::tr/td[contains(.,"Succeeded")]
${titleDbaasOperator} //h1[contains(.,"OpenShift Database Access Operator") and contains(@class,"logo__name")]
${elemDbaasInvStatus} //td[contains(.,"<<paname>>")]/parent::tr/td[contains(.,"SpecSynced, InventoryReady")]
${titleDbaasInventories} //h1[contains(.,"DBaaSInventories")]
${titleDbaasInventories} //h1[contains(.,"DBaaSInventorys")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikanias Do we still have this error? I hope this is been handled with keyword "User Is On DBaaSInventory Screen" on navigation.resource file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that it was fixed and should be working on 4.13 but they did not mention which version of 4.13.
In the time when I ran the tests it was still displayed with a 'Y'.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, We do have the object recorded on the same file on line 18. And on keyword -

User Is On DBaaSInventory Screen
this issue being handled. Please let me know if the test case failed without these changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK will check

Copy link
Collaborator

@mrrajan mrrajan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes

@@ -284,6 +288,14 @@ User Imports ${isv} Provider Account Using CLI
Provider Account Imported Successfully Using CLI
Wait Until Keyword Succeeds 4x 5s Describe Provider Account Using OC CLI

#User Navigates To Add ${databaseProvider} Topology Screen From Developer View
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the commented sections

@@ -27,8 +27,9 @@ ${btnCreateEnabled} //button[contains(.,"Create") and @aria-disabled
${lblDBInstSuccess} //h2[contains(.,"Database instances") and contains(.,"successful")]
${btnViewProviderAcc} //button[contains(.,"View Provider Accounts")]
${tblInstanceTable} id:instance-table
${btnMenuDropDown} //button[contains(.,"<<menu>>")]
${btnMenuOptDropDown} //a[contains(.,"<<menuopt>>")]
${btnMenuDropDown} //*[@id="toggle-id-4"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review based on the earlier comments

@@ -6,7 +6,7 @@ Object Repository for Installed Operators Screen
${elemDbaasStatus} //a[contains(.,"OpenShift Database Access Operator")]//ancestor::tr/td[contains(.,"Succeeded")]
${titleDbaasOperator} //h1[contains(.,"OpenShift Database Access Operator") and contains(@class,"logo__name")]
${elemDbaasInvStatus} //td[contains(.,"<<paname>>")]/parent::tr/td[contains(.,"SpecSynced, InventoryReady")]
${titleDbaasInventories} //h1[contains(.,"DBaaSInventories")]
${titleDbaasInventories} //h1[contains(.,"DBaaSInventorys")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, We do have the object recorded on the same file on line 18. And on keyword -

User Is On DBaaSInventory Screen
this issue being handled. Please let me know if the test case failed without these changes.

@mergify
Copy link
Contributor

mergify bot commented May 8, 2023

This pull request now has conflicts with the target branch. Please resolve conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants