forked from jsnbuchanan/crowd-funder-for-time-pwa
fix a web test (all passing now)
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a class="cursor-pointer" @click="$emit('loadClaim', record.jwtId)">
|
<a class="cursor-pointer" @click="$emit('loadClaim', record.jwtId)" data-testid="circle-info-link">
|
||||||
<font-awesome icon="circle-info" class="fa-fw text-slate-500" />
|
<font-awesome icon="circle-info" class="fa-fw text-slate-500" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* Interfaces for the give records with limited contact information, good to show on a feed.
|
||||||
|
**/
|
||||||
|
|
||||||
import { GiveSummaryRecord } from "./records";
|
import { GiveSummaryRecord } from "./records";
|
||||||
|
|
||||||
// Common interface for contact information
|
// Common interface for views with summary contact information
|
||||||
export interface ContactInfo {
|
export interface ContactInfo {
|
||||||
known: boolean;
|
known: boolean;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
profileImageUrl?: string;
|
profileImageUrl?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define the contact information fields
|
// Define a subset of contact information fields
|
||||||
interface GiveContactInfo {
|
interface GiveContactInfo {
|
||||||
giver: ContactInfo;
|
giver: ContactInfo;
|
||||||
issuer: ContactInfo;
|
issuer: ContactInfo;
|
||||||
@@ -17,5 +21,5 @@ interface GiveContactInfo {
|
|||||||
image?: string;
|
image?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Combine GiveSummaryRecord with contact information using intersection type
|
// Combine GiveSummaryRecord with contact information
|
||||||
export type GiveRecordWithContactInfo = GiveSummaryRecord & GiveContactInfo;
|
export type GiveRecordWithContactInfo = GiveSummaryRecord & GiveContactInfo;
|
||||||
|
|||||||
@@ -347,10 +347,10 @@ import {
|
|||||||
GiverReceiverInputInfo,
|
GiverReceiverInputInfo,
|
||||||
OnboardPage,
|
OnboardPage,
|
||||||
} from "../libs/util";
|
} from "../libs/util";
|
||||||
import { GiveSummaryRecord } from "../interfaces";
|
import { GiveSummaryRecord } from "../interfaces/records";
|
||||||
import * as serverUtil from "../libs/endorserServer";
|
import * as serverUtil from "../libs/endorserServer";
|
||||||
import { logger } from "../utils/logger";
|
import { logger } from "../utils/logger";
|
||||||
import { GiveRecordWithContactInfo } from "../types";
|
import { GiveRecordWithContactInfo } from "../interfaces/give";
|
||||||
import { PlatformServiceFactory } from "@/services/PlatformServiceFactory";
|
import { PlatformServiceFactory } from "@/services/PlatformServiceFactory";
|
||||||
|
|
||||||
interface Claim {
|
interface Claim {
|
||||||
|
|||||||
@@ -109,11 +109,8 @@ test('Record something given', async ({ page }) => {
|
|||||||
|
|
||||||
// Refresh home view and check gift
|
// Refresh home view and check gift
|
||||||
await page.goto('./');
|
await page.goto('./');
|
||||||
await page.locator('li')
|
const item = await page.locator('li').filter({ hasText: finalTitle });
|
||||||
.filter({ hasText: finalTitle })
|
await item.locator('[data-testid="circle-info-link"]').click();
|
||||||
.locator('a.cursor-pointer')
|
|
||||||
.filter({ hasText: finalTitle })
|
|
||||||
.click();
|
|
||||||
await expect(page.getByRole('heading', { name: 'Verifiable Claim Details' })).toBeVisible();
|
await expect(page.getByRole('heading', { name: 'Verifiable Claim Details' })).toBeVisible();
|
||||||
await expect(page.getByText(finalTitle, { exact: true })).toBeVisible();
|
await expect(page.getByText(finalTitle, { exact: true })).toBeVisible();
|
||||||
const page1Promise = page.waitForEvent('popup');
|
const page1Promise = page.waitForEvent('popup');
|
||||||
|
|||||||
Reference in New Issue
Block a user