Skip to content

Conversation

@asirvadAbrahamVarghese
Copy link
Contributor

CP4AIOPS-18932:
Add test to cover:
 - Validate form elements
 - Validate reset and apply functionalities
 
@miq-bot add-label cypress
@miq-bot add-label test
@miq-bot assign @jrafanie

@asirvadAbrahamVarghese asirvadAbrahamVarghese requested a review from a team as a code owner October 28, 2025 10:43
@asirvadAbrahamVarghese asirvadAbrahamVarghese force-pushed the service-requests-form-automation-testing branch 2 times, most recently from 0ac63bc to 20b1181 Compare October 28, 2025 10:45
@asirvadAbrahamVarghese
Copy link
Contributor Author

asirvadAbrahamVarghese commented Oct 28, 2025

TODO:

Add changes from
#9689
#9690
#9691

@asirvadAbrahamVarghese asirvadAbrahamVarghese force-pushed the service-requests-form-automation-testing branch 4 times, most recently from b7b7b84 to 4cf95df Compare October 29, 2025 11:30
@jrafanie jrafanie closed this Oct 29, 2025
@jrafanie jrafanie reopened this Oct 29, 2025
@asirvadAbrahamVarghese asirvadAbrahamVarghese force-pushed the service-requests-form-automation-testing branch 2 times, most recently from fc56d7a to e38467e Compare October 30, 2025 05:06
@asirvadAbrahamVarghese asirvadAbrahamVarghese changed the title Added automated tests with cypress for Service Requests form [WIP] - Added automated tests with cypress for Service Requests form Oct 31, 2025
@asirvadAbrahamVarghese asirvadAbrahamVarghese force-pushed the service-requests-form-automation-testing branch from e38467e to c4e6f6f Compare November 5, 2025 09:41
@asirvadAbrahamVarghese asirvadAbrahamVarghese force-pushed the service-requests-form-automation-testing branch from c4e6f6f to 08fc52a Compare November 6, 2025 06:19
@asirvadAbrahamVarghese asirvadAbrahamVarghese changed the title [WIP] - Added automated tests with cypress for Service Requests form Added automated tests with cypress for Service Requests form Nov 6, 2025
@asirvadAbrahamVarghese asirvadAbrahamVarghese force-pushed the service-requests-form-automation-testing branch from 08fc52a to d14b54b Compare November 6, 2025 06:49
cy.menu(SERVICES_MENU_OPTION, REQUESTS_MENU_OPTION);
/* Reset */
cy.getFormSelectFieldById({ selectId: 'selectedUser' }).select(
'Test User 1'
Copy link
Member

Choose a reason for hiding this comment

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

Is this a user we created or a hardcoded value? The name of the user is curious. If it's coming from the factory, the number is not required to be 1:

spec/factories/user.rb:    sequence(:name)   { |s| "Test User #{s}" }

Maybe a more generic grep like select would grab the first "Test User" from the select.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah this user is created by factory
Changed the logic to pick any option by value except "all", so that if the username changes later from “Test User” to something else, the test won’t fail

}).click();
cy.gtlGetRows([0]).then((data) => {
expect(data.length).to.equal(3);
});
Copy link
Member

Choose a reason for hiding this comment

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

Does it make sense to make this a function? It feels like the different filter sections are doing similar things and verifying their results.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that makes sense

@asirvadAbrahamVarghese asirvadAbrahamVarghese force-pushed the service-requests-form-automation-testing branch 2 times, most recently from dae33e5 to 296a7a8 Compare November 18, 2025 06:27
@asirvadAbrahamVarghese asirvadAbrahamVarghese force-pushed the service-requests-form-automation-testing branch 2 times, most recently from f3a3d62 to 77e1133 Compare November 19, 2025 05:27
@asirvadAbrahamVarghese asirvadAbrahamVarghese force-pushed the service-requests-form-automation-testing branch from 77e1133 to 260fb76 Compare November 19, 2025 05:51
Copy link
Member

@jrafanie jrafanie left a comment

Choose a reason for hiding this comment

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

LGTM

@jrafanie jrafanie merged commit c09cd18 into ManageIQ:master Nov 19, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants