-
Notifications
You must be signed in to change notification settings - Fork 31
[AXON-453] Add E2E Test for Assigning Jira Issue to Self #474
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
base: main
Are you sure you want to change the base?
Conversation
}, | ||
"fields": { | ||
"equalTo": "*all" | ||
"contains": "transitions" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During implementation, the existing bts1.json mock didn't work correctly for the assign-to-self flow — specifically, the mocked endpoint for fetching issue details failed due to an invalid URL (it included a space) and unexpected query parameters. I fixed it by removing the query parameters from the URL path and correcting the broken link. If there's a cleaner or more accurate way to handle this setup, happy to take suggestions. Thanks!
e2e/tests/playwright.spec.ts
Outdated
await settingsFrame.getByLabel('Password (API token)').fill('12345'); | ||
await settingsFrame.getByRole('button', { name: 'Save Site' }).click(); | ||
|
||
await page.waitForTimeout(250); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locally this test is failing for me because this timeout is too short. Let's make it 2000
Thanks for this test. This is a good starting point, but as is this test is not really re-assigning the ticket to anybody else. To actually exercise the code, this test should:
To achieve this, you must be able to change the mocked data on the fly.
Check if you can programmatically add/modify mocks via these APIs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment
eed5d68
to
2baf89c
Compare
b4d2626
to
360b9de
Compare
// First, let's try to find the iframe by waiting for it to be visible | ||
const webviewFrame = page.frameLocator('iframe.webview'); | ||
// Try multiple possible iframe titles/selectors | ||
const possibleSelectors = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took it from here so I don't have trouble finding the iframe either
What Is This Change?
Added a complete end-to-end Playwright test to verify that a user can assign themselves to a Jira issue via the assignee field inside the webview iframe.
✅ Selecting a Jira issue from the sidebar
✅ Opening the issue tab inside iframe
✅ Verifying the current assignee ("Mocked McMock")
✅ Clearing the assignee field
✅ Typing into the assignee field to trigger the suggestions dropdown
✅ Selecting the user from the dropdown
✅ Verifying the user is assigned again
Result video
video.webm