Pular para o conteúdo principal

Recommended test cases (for Atlassian)

This document describes the recommended test cases for Resource Management for Jira, with selectors and test IDs so you can reproduce or extend the tests. All "click" or "select" actions below reference either a test ID (data-testid) or a role/label selector.

Before you start: Full coverage testing requires the four roles — Admin, Team Manager, Project Manager, and Viewer. See System roles for how to create and assign them. For sanity checks you can use Admin only, as it has full visibility and full functionality.


1. Authentication & Access Control

Role-based Resource Management for Jira tab visibility

What it does: Asserts that each role (Admin, Team Manager, Project Manager, Viewer) sees the correct Resource Management for Jira subtabs per architecture.

Steps and selectors:

  1. Log in — When logged on to Jira, go to the application page.
  2. Open Resource Management for Jira — In the top nav, go to the application (e.g. the entry point for Resource Management for Jira).
  3. Wait for tab bar — Wait until the Worklogs tab is visible: getByRole('button', { name: 'Worklogs', exact: true }) (all roles have Worklogs).
  4. Check visible tabs — For each role, the visible tab buttons must match the expected set. Tab buttons use role="button" and exact name: "Worklogs", "Timesheets", "Requests", "Team Management", "Organization Structure", "Calendars", "Configuration". Viewer must not see Timesheets or Requests.

Expected tabs per role: Admin: all; Team Manager: all except Configuration; Project Manager: Worklogs, Timesheets, Requests, Organization Structure, Calendars; Viewer: Worklogs, Calendars only.


2. Team Management

Prerequisites: Env vars TM_MEMBER_NAME, TM_CALENDAR_A, TM_CALENDAR_DEFAULT (optional: TM_MEMBER_TITLE, TM_MEMBER_TEAM).

Test 1: Default calendar assignment

What it does: Sets the default calendar for a resource, checks it persists, then reverts.

Steps and selectors:

  1. Open Team Management — Click tab button with name "Team Management" (exact). Wait for data-testid="tm-root" and heading "Team Management".
  2. Filter to member — In the filter bar: data-testid="tm-filter-name" (resource name), data-testid="tm-filter-title" (title), data-testid="tm-filter-team" (team). Fill as needed, then wait for debounce.
  3. Reset filters (if needed) — Click data-testid="tm-filter-reset".
  4. Find member row — Table: data-testid="tm-table", rows tbody tr[data-testid^="tm-row-"][data-member-name="<name>"]. Get data-member-id from the row.
  5. Set default calendar — In that row, use the Default Calendar dropdown: data-testid="tm-default-calendar-<memberId>". Select option by label (e.g. calendar name).
  6. Revert — Select the original calendar again from the same dropdown.

Test 2: Rates management

What it does: Opens the rates modal, clears periods, adds a rate period, then deletes all.

Steps and selectors:

  1. Open Team Management and find the member row (same as Test 1).
  2. Open Rates modal — Click data-testid="tm-open-rates-<memberId>". Wait for data-testid="tm-modal" and data-testid="tm-period-settings-rate".
  3. Delete all periods — In data-testid="tm-period-list", each period has a delete button [data-testid$="-delete"]. Delete each period using that button.
  4. Add period — Click data-testid="tm-add-period". Wait for data-testid="tm-period-0".
  5. Set dates — For period index i: click data-testid="tm-period-<i>-from" / data-testid="tm-period-<i>-to" and choose date (e.g. via calendar tile or date picker). Optional clear: data-testid="tm-period-<i>-from-clear" / tm-period-<i>-to-clear.
  6. Set rate fieldsdata-testid="tm-period-<i>-rate-standard", tm-period-<i>-rate-overtime, tm-period-<i>-rate-weekend. Fill with numbers.
  7. Save — Click data-testid="tm-period-save". Modal closes when data-testid="tm-modal" has count 0.
  8. Teardown — Reopen rates modal and delete all periods again.

Test 3: Calendar overrides

What it does: Adds a calendar override period, saves, reopens to confirm, then deletes all.

Steps and selectors:

  1. Open Team Management and find the member.
  2. Open Calendar overrides modal — Click data-testid="tm-open-calendar-<memberId>". Wait for data-testid="tm-modal" and data-testid="tm-period-settings-calendar".
  3. Add perioddata-testid="tm-add-period". Set from/to via data-testid="tm-period-<i>-from" / data-testid="tm-period-<i>-to" (and calendar/datepicker).
  4. Set calendardata-testid="tm-period-<i>-calendar-select"; select option by label.
  5. Savedata-testid="tm-period-save". Reopen modal and confirm the period; then delete each period using [data-testid$="-delete"] in data-testid="tm-period-list" and save.

Test 4: Availability management

What it does: Adds an availability period (e.g. unavailable day and available day with working hours), saves, then deletes all.

Steps and selectors:

  1. Open Team Management and find the member.
  2. Open Availability modal — Click data-testid="tm-open-availability-<memberId>". Wait for data-testid="tm-modal" and data-testid="tm-period-settings-availability".
  3. Add perioddata-testid="tm-add-period". Set from/to with data-testid="tm-period-<i>-from" / data-testid="tm-period-<i>-to".
  4. Set typedata-testid="tm-period-<i>-availability-type" select "available" or "unavailable".
  5. Working hours (if available) — Ensure slots: data-testid="tm-period-<i>-wh-add"; set tm-period-<i>-wh-<slotIndex>-start" and -finish. Optional description: data-testid="tm-period-<i>-description".
  6. Savedata-testid="tm-period-save". Teardown: delete all periods and save.

Validation — Expect no validation errors: data-testid="tm-validation-errors" should not be visible (or count 0).


3. Structure Management (Organization structure)

Open Structure tab

  • Click button with name "Organization Structure" (exact). Wait for heading "Resource Breakdown Structure" and data-testid="structure-root". Table: data-testid="structure-table"; rows: table tbody tr[data-testid^="structure-row-"] with attributes data-row-name, data-row-type (team/member), data-row-id.

Show / Hide archived

  • Toggle: data-testid="structure-toggle-show-archived" (admin only). Or checkbox data-testid="structure-show-archived".

Comprehensive structure test (drag-and-drop, persistence, archiving)

Steps and selectors:

  1. Add team — Click data-testid="structure-add-team". New row enters edit mode: fill name in [data-testid^="structure-row-name-input-"], optionally RBS in data-testid="structure-row-rbs-code-input-<rowId>". Click first [data-testid^="structure-row-save-"] to save. Cancel: [data-testid^="structure-row-cancel-"].
  2. Select row — Click the row (e.g. RBS code cell td:nth(1) of the row, or the row itself). Confirm selection in data-testid="structure-actionbar" (text "Selected: <name>").
  3. Indent — With a row selected, click data-testid="structure-indent". Row depth increases (data-row-depth).
  4. Outdent — Click data-testid="structure-outdent". Row depth decreases.
  5. Add member — Select a team, then click data-testid="structure-add-member". Fill [data-testid^="structure-row-name-input-"] and [data-testid^="structure-row-title-input-"], then save with [data-testid^="structure-row-save-"].
  6. Expand team — Expand button: data-testid="structure-row-expand-<rowId>" (▼ = expanded, ▶ = collapsed). Click to load members.
  7. Drag row — Drag handle: data-testid="structure-row-drag-handle-<rowId>". Drag to another row; drop position (upper/lower half) determines insert before/after. Rows have data-row-id, data-row-name, data-row-type.
  8. Archive / Restore — Button on row: data-testid="structure-row-archive-<rowId>". Text is "Archive" or "Restore". Click to toggle.
  9. Persistence — Switch to another tab (e.g. button "Team Management"), then back to button "Organization Structure"; expand and verify hierarchy (e.g. child still under parent via depth and order).

Team creation and hierarchy (Test 1)

  • Select "Corporate" (click row with data-row-name="Corporate"). Click data-testid="structure-add-team", fill name, save. Select the new team, click data-testid="structure-indent" to indent under previous row; then data-testid="structure-outdent" to outdent back.

Archive / unarchive team (Test 2)

  • Find the team row by data-row-name. Click data-testid="structure-row-archive-<rowId>" (Archive), then again (Restore). Ensure "Show archived" is on via data-testid="structure-toggle-show-archived" when verifying archived rows.

Member addition (Test 3)

  • Select the team (click row). Click data-testid="structure-add-member", fill name and title in the inputs above, click save. Row locator: tr[data-row-name="<name>"][data-row-type="member"].

Member archive / unarchive (Test 4)

  • Find member row by data-row-name and type "member". Click data-testid="structure-row-archive-<rowId>" to archive, then Restore. Show-archived must be on to see archived members.

4. Calendar Management

Open Calendars tab

  • Click button with name "Calendars" (exact). Wait for data-testid="calendar-management" and heading "Calendar Management". List: data-testid="cal-list"; items [data-testid^="cal-item-"] (optionally data-calendar-default, data-calendar-name).

Calendar exceptions (Test 1)

Steps and selectors:

  1. Select default calendar — Click the calendar item that has "Default" or data-calendar-default="true". Heading (level 3) shows the calendar name.
  2. Enter edit mode — Click data-testid="cal-edit". Save button appears: data-testid="cal-save".
  3. Clear exceptions — In data-testid="cal-exception-cards", each exception has a delete button [data-testid^="cal-exception-delete-"]. Remove each exception using that button.
  4. Select date in calendar — Use .react-calendar and click a day (e.g. button.react-calendar__tile with [aria-label="<Month Day, Year>"] or abbr with that aria-label).
  5. Add non-working — Click button "Mark as Non-Working Day" (exact).
  6. Add working exception — Select another date, then button "Add Working Hours" (exact). In the exception card data-testid="cal-exception-<dateStr>", set slots: inputs id^="exception-start-<dateStr>-" and finish; add slot with button "Add Time Slot".
  7. Save — Click data-testid="cal-save". Exit edit: data-testid="cal-edit" visible again.

Calendar archive / unarchive (Test 2)

  • Select a non-default calendar from the list. Click data-testid="cal-archive-toggle". Button text toggles between "Archive" and "Unarchive".

Calendar creation (Test 3)

Steps and selectors:

  1. Create calendar — Click data-testid="cal-add-calendar-toggle". Fill name in data-testid="cal-new-calendar-name", then click data-testid="cal-create-calendar". New calendar is selected and in edit mode.
  2. Set working days — In the "Regular Working Hours" section (heading text "Regular Working Hours", then ancestor div.bg-white), use checkbox by day name (e.g. "Monday", "Tuesday") to enable/disable. Add time slots: button "Add Time Slot" in the day row; fill #start-<day>-<index> and #finish-<day>-<index>.
  3. Savedata-testid="cal-save".

5. Resource Requests

Open Requests tab

  • Click button with name "Requests" (exact). Wait for data-testid="requests-search-input". Optional: set scale via data-testid="timeline-scale-select" (e.g. "quarter"). For table view: click button "Table" (exact).

Filters

  • Filter panel: data-testid="requests-filters". Search: data-testid="requests-search-input". Show cancelled: uncheck control targeted by data-testid="requests-filter-hide-cancelled". Show closed: data-testid="requests-filter-hide-closed".

Complete workflow (PM create → submit → cancel → edit → submit → TM assign → review → PM accept → close)

Steps and selectors:

  1. Create request — Click data-testid="create-new-request-button". Edit title and details in the drawer/modal.
  2. Submit — On the request, click button "Submit" (exact). Submit modal: heading "Submit Resource Request"; choose team, then button "Submit Request" (exact).
  3. Cancel — Click button "Cancel" (exact) on the request. Then show cancelled: uncheck data-testid="requests-filter-hide-cancelled".
  4. Edit — Find request by title: data-testid="request-title" with text matching the request name. Panel: timeline uses data-testid="request-left-panel", table uses data-testid="request-table-row". Click button "Edit" (exact). Edit and save.
  5. Submit againbutton "Submit" (exact), choose team, button "Submit Request" (exact).
  6. Assign (TM)button "Assign" (exact). Review modal: heading "Review Resource Assignments". Add assignment: button "New Assignment" (exact). Set resource, allocation; optional new period: data-testid="rr-new-period-button", then data-testid="rr-new-period-start", data-testid="rr-new-period-end", data-testid="rr-new-period-capacity", data-testid="rr-new-period-save". Confirm: button "Confirm Assignments" (exact).
  7. Send for Reviewbutton "Send for Review" (exact).
  8. Accept (PM)button "Accept" (exact). Review modal heading "Review Resource Request"; confirm with data-testid="rr-confirm-request".
  9. Closebutton "Close" (exact). Show closed: uncheck data-testid="requests-filter-hide-closed" to verify.

Request panel / state — State is in data-testid="request-state". Actions are button with exact names: "Submit", "Assign", "Send for Review", "Accept", "Reject", "Edit", "Close", "Cancel".