Skip to content

Commit 176e126

Browse files
committed
fix tests
1 parent bf648bd commit 176e126

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

app/components/Package/List.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ defineExpose({
236236
:result="item"
237237
:heading-level="headingLevel"
238238
:show-publisher="showPublisher"
239-
:index="index"
239+
:index="(currentPage - 1) * numericPageSize + index"
240240
:search-query="searchQuery"
241241
:class="
242242
index >= newSearchBatchSize &&

test-org-page.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const { chromium } = require('playwright');
2+
3+
(async () => {
4+
const browser = await chromium.launch();
5+
const page = await browser.newPage();
6+
7+
// Navigate to the org page
8+
await page.goto('http://localhost:3000/org/atcute', { waitUntil: 'networkidle' });
9+
10+
// Wait a bit for hydration
11+
await page.waitForTimeout(3000);
12+
13+
// Check what elements exist
14+
const allArticles = await page.locator('article').count();
15+
console.log('Total articles:', allArticles);
16+
17+
// Check for data-result-index
18+
const withIndex = await page.locator('[data-result-index]').count();
19+
console.log('Articles with data-result-index:', withIndex);
20+
21+
// Get the first few articles' HTML
22+
const firstArticle = await page.locator('article').first().innerHTML();
23+
console.log('First article HTML (first 500 chars):', firstArticle.substring(0, 500));
24+
25+
await browser.close();
26+
})();
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@atcute/client": "write",
3+
"@atcute/oauth-browser-client": "write"
4+
}

0 commit comments

Comments
 (0)