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

New Change Request System Tests #2826

Merged
merged 4 commits into from
Sep 8, 2024

Conversation

Peyton-McKee
Copy link
Contributor

@Peyton-McKee Peyton-McKee commented Sep 8, 2024

Changes

System Tests For Creating a Change Request.
Theres an issue wher I could not figure out the change request number by like getting the title and then parsing out the number, i had it working at one point then it stopped working.

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes # (issue #)

Comment on lines +7 to +37
const SELECTORS = {
LOADING_INDICATOR: testIdBuilder('loader'),
LOGIN_ICON: testIdBuilder('LoginIcon'),
DEV_LOGIN_TEXT: 'Local Dev User',
CR_ROW: (title) => `[data-testid="${title}crRow"]`,
CR_ROW: (title) => testIdBuilder(`${title}crRow`),
NEW_CHANGE_REQUEST_BUTTON: 'New Change Request',
ALL_CHANGE_REQUESTS_TAB: 'All Change Requests',
CHANGE_REQUEST_TABLE: '[data-testid="Change Request Table"]'
CHANGE_REQUEST_TABLE: testIdBuilder('Change Request Table'),
PROJECT_OR_WORKPACKAGE_PLACEHOLDER: placeholderBuilder('Select a project or work package'),
ISSUE_BUTTON: 'ISSUE',
DEFINITION_CHANGE_BUTTON: 'DEFINITION_CHANGE',
OTHER_BUTTON: 'OTHER',
WHAT_DESCRIPTOR: 'What needs to be changed',
WHY_DESCRIPTOR: 'Why does this need to be changed',
WHY_TYPE_OPTION: (index) => `[name="why.${index}.type"]`,
WHY_EXPLAIN_TEXT_BOX: (index) => idBuilder(`why.${index}.explain-input`),
ADD_REASON: 'ADD REASON',
WHY_DELETE_OPTION: testIdBuilder('DeleteIcon'),
EXPLAIN_TEXT_BOX_PLACEHOLDER: placeholderBuilder('Explain *'),
ADD_PROPOSED_SOLUTION_BUTTON: '+ Add Solution',
PROPOSED_SOLUTION_DESCRIPTION_INPUT: idBuilder('description-input'),
PROPOSED_SOLUTION_SCOPE_INPUT: idBuilder('scopeImpact-input'),
PROPOSED_SOLUTION_BUDGET_INPUT: idBuilder('budgetImpact-input'),
PROPOSED_SOLUTION_TIMELINE_INPUT: idBuilder('timelineImpact-input'),
ADD_BUTTON: new RegExp('^Add$', 'g'),
SUBMIT_BUTTON: new RegExp('^Submit$', 'g'),
DIALOG: '[role="dialog"]',
ACTIONS_BUTTON: 'Actions',
ACTIONS_BUTTON_DELETE: 'Delete',
CONFIRM_DELETE_TEXT_INPUT: idBuilder('identifier-input'),
CHANGE_REQUEST_TITLE: new RegExp('Change Request #\\d+$')
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think we should create a different list of selectors for each type of test, that might be a little cleaner as this list would start getting rlly big

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 probably a good idea.

@Peyton-McKee Peyton-McKee merged commit 4e5ec12 into develop Sep 8, 2024
4 checks passed
@Peyton-McKee Peyton-McKee deleted the New-Change-Request-System-Tests branch September 8, 2024 22:30
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