Tests currently use issues from microsoft/playwright and facebook/react as test data and navigation targets. These external issues can be closed, deleted, or changed without notice.
Instead, select several issues in this repo and update tests/extension.spec.js to use them exclusively.
Update TEST_ISSUES Pool
Current (line 15 in extension.spec.js):
const TEST_ISSUES = [
{ owner: 'microsoft', repo: 'playwright', number: 38673 },
{ owner: 'microsoft', repo: 'playwright', number: 38674 },
{ owner: 'facebook', repo: 'react', number: 100 },
];
After (assuming test fixture issues created):
const TEST_ISSUES = [
{ owner: 'richardkmichael', repo: 'github-bookmarked-issues', number: TBD },
{ owner: 'richardkmichael', repo: 'github-bookmarked-issues', number: TBD },
{ owner: 'richardkmichael', repo: 'github-bookmarked-issues', number: TBD },
];
Add Repository Helpers
const TEST_REPO = {
owner: 'richardkmichael',
repo: 'github-bookmarked-issues',
};
function repoUrl(repo = TEST_REPO) {
return `https://github.com/${repo.owner}/${repo.repo}`;
}
function issuesListUrl(repo = TEST_REPO) {
return `https://github.com/${repo.owner}/${repo.repo}/issues`;
}
function issueLinksSelector(repo = TEST_REPO) {
return `a[href^="/${repo.owner}/${repo.repo}/issues/"]:not([href$="/issues/"])`;
}
Hardcoded URLs and References to Update
All in tests/extension.spec.js:
Hardcoded navigation URLs
- Line 195:
page.goto('https://github.com/microsoft/playwright/issues/11975')
- Line 261:
page.goto('https://github.com/microsoft/playwright/issues')
- Line 279:
page.goto('https://github.com/microsoft/playwright')
- Line 1056:
authPage.goto('https://github.com/microsoft/playwright')
Hardcoded bookmark key checks
- Line 219:
'microsoft/playwright/issues/11975'
- Line 415-417:
'microsoft/playwright/issues/38673', etc.
Hardcoded selectors
- Line 265:
a[href^="/microsoft/playwright/issues/"]
- Line 288: same pattern
Mock route body checks (match on repo name in GraphQL body)
- Lines 1200, 1252, 1306, 1493:
body.includes('microsoft/playwright')
Mock REST API responses with hardcoded URLs
- Lines 1519-1542: mock responses with
microsoft/playwright and facebook/react URLs
Comments referencing repos
- Line 864:
// microsoft/playwright
- Line 865:
// facebook/react
Test Stability Considerations
- Mark issues with
[Test Fixture] prefix
- Lock issues to prevent comments
- At least one open and one closed issue needed
- Issues should have minimal activity
Do NOT Keep External Fallback
Self-contained testing is more reliable:
- External issues can be closed/deleted
- Fewer external dependencies
- Faster tests
Implementation Sequence
- Create 2-3 test issues with
[Test Fixture] naming
- Lock the test issues
- Add
TEST_REPO constant and helpers
- Update
TEST_ISSUES array with new issue numbers
- Replace all hardcoded URLs, selectors, and mock data
- Run tests to verify
Files to Modify
tests/extension.spec.js - Update TEST_ISSUES, add helpers, replace all hardcoded references
Tests currently use issues from
microsoft/playwrightandfacebook/reactas test data and navigation targets. These external issues can be closed, deleted, or changed without notice.Instead, select several issues in this repo and update
tests/extension.spec.jsto use them exclusively.Update TEST_ISSUES Pool
Current (line 15 in extension.spec.js):
After (assuming test fixture issues created):
Add Repository Helpers
Hardcoded URLs and References to Update
All in
tests/extension.spec.js:Hardcoded navigation URLs
page.goto('https://github.com/microsoft/playwright/issues/11975')page.goto('https://github.com/microsoft/playwright/issues')page.goto('https://github.com/microsoft/playwright')authPage.goto('https://github.com/microsoft/playwright')Hardcoded bookmark key checks
'microsoft/playwright/issues/11975''microsoft/playwright/issues/38673', etc.Hardcoded selectors
a[href^="/microsoft/playwright/issues/"]Mock route body checks (match on repo name in GraphQL body)
body.includes('microsoft/playwright')Mock REST API responses with hardcoded URLs
microsoft/playwrightandfacebook/reactURLsComments referencing repos
// microsoft/playwright// facebook/reactTest Stability Considerations
[Test Fixture]prefixDo NOT Keep External Fallback
Self-contained testing is more reliable:
Implementation Sequence
[Test Fixture]namingTEST_REPOconstant and helpersTEST_ISSUESarray with new issue numbersFiles to Modify
tests/extension.spec.js- Update TEST_ISSUES, add helpers, replace all hardcoded references