loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request 'Fix CI status link in dashboard' (#4481) from beowulf/fix-ci-status-link-on-dashboard into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4481
Reviewed-by: 0ko <0ko@noreply.codeberg.org>

+33 -1
+11
models/fixtures/commit_status.yml
··· 52 52 description: My awesome deploy service 53 53 context: deploy/awesomeness 54 54 creator_id: 2 55 + 56 + - 57 + id: 6 58 + index: 6 59 + repo_id: 62 60 + state: "failure" 61 + sha: "774f93df12d14931ea93259ae93418da4482fcc1" 62 + target_url: "/user2/test_workflows/actions" 63 + description: My awesome deploy service 64 + context: deploy/awesomeness 65 + creator_id: 2
+21
tests/e2e/dashboard-ci-status.test.e2e.js
··· 1 + // @ts-check 2 + import {test, expect} from '@playwright/test'; 3 + import {login_user, load_logged_in_context} from './utils_e2e.js'; 4 + 5 + test.beforeAll(async ({browser}, workerInfo) => { 6 + await login_user(browser, workerInfo, 'user2'); 7 + }); 8 + 9 + test('Correct link and tooltip', async ({browser}, workerInfo) => { 10 + const context = await load_logged_in_context(browser, workerInfo, 'user2'); 11 + const page = await context.newPage(); 12 + const response = await page.goto('/?repo-search-query=test_workflows'); 13 + await expect(response?.status()).toBe(200); 14 + 15 + await page.waitForLoadState('networkidle'); 16 + 17 + const repoStatus = page.locator('.dashboard-repos .repo-owner-name-list > li:nth-child(1) > a:nth-child(2)'); 18 + 19 + await expect(repoStatus).toHaveAttribute('href', '/user2/test_workflows/actions'); 20 + await expect(repoStatus).toHaveAttribute('data-tooltip-content', 'Failure'); 21 + });
+1 -1
web_src/js/components/DashboardRepoList.vue
··· 415 415 <svg-icon name="octicon-archive" :size="16"/> 416 416 </div> 417 417 </a> 418 - <a class="tw-flex tw-items-center" v-if="repo.latest_commit_status" :href="repo.latest_commit_status.TargetLink" :data-tooltip-content="repo.locale_latest_commit_status.State"> 418 + <a class="tw-flex tw-items-center" v-if="repo.latest_commit_status" :href="repo.latest_commit_status.TargetURL" :data-tooltip-content="repo.locale_latest_commit_status"> 419 419 <!-- the commit status icon logic is taken from templates/repo/commit_status.tmpl --> 420 420 <svg-icon :name="statusIcon(repo.latest_commit_status.State)" :class-name="'tw-ml-2 commit-status icon text ' + statusColor(repo.latest_commit_status.State)" :size="16"/> 421 421 </a>