diff --git a/package.json b/package.json index 46c9815d4..e050dbf20 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,9 @@ "check": "npx biome check --formatter-enabled=true .", "check:fix": "npx biome check --formatter-enabled=true --write .", "prepare": "husky install", - "test_workflow": "act -W '.github/workflows/e2e-ci.yml' --action-offline-mode --container-architecture linux/amd64" + "test_workflow": "act -W '.github/workflows/e2e-ci.yml' --action-offline-mode --container-architecture linux/amd64", + "docs:test_interactors": "turbo run docs:test_interactors --filter=platform-test", + "docs:test_interactors:serve": "turbo run docs:test_interactors:serve --filter=platform-test" }, "devDependencies": { "@biomejs/biome": "2.2.4", diff --git a/packages/platform-test/.gitignore b/packages/platform-test/.gitignore new file mode 100644 index 000000000..c70a83975 --- /dev/null +++ b/packages/platform-test/.gitignore @@ -0,0 +1,13 @@ +# Generated documentation +docs/widgets-api/ + +# Test results +test-results/ +playwright-report/ + +# Node +node_modules/ + +# Environment +.env +.env.local diff --git a/packages/platform-test/POM/objects/widgets/AOTF/aotfActions.ts b/packages/platform-test/POM/objects/widgets/AOTF/aotfActions.ts index 7b3cc6c50..62b735e12 100644 --- a/packages/platform-test/POM/objects/widgets/AOTF/aotfActions.ts +++ b/packages/platform-test/POM/objects/widgets/AOTF/aotfActions.ts @@ -1,5 +1,25 @@ import type { Locator, Page } from "@playwright/test"; +/** + * Interactor for AOTF (Association On-The-Fly) table action controls. + * + * Provides methods to interact with the AOTF table's control panel including: + * - Name filtering + * - Advanced facets/filters + * - Column options and weight controls + * - Export functionality + * - Display mode switching (Associations/Prioritisation view) + * + * @example + * ```typescript + * const actions = new AotfActions(page); + * await actions.searchByName("BRAF"); + * await actions.switchToPrioritisationView(); + * await actions.openExportMenu(); + * ``` + * + * @category AOTF + */ export class AotfActions { page: Page; diff --git a/packages/platform-test/POM/objects/widgets/AOTF/aotfTable.ts b/packages/platform-test/POM/objects/widgets/AOTF/aotfTable.ts index 073652c48..5272e9fa9 100644 --- a/packages/platform-test/POM/objects/widgets/AOTF/aotfTable.ts +++ b/packages/platform-test/POM/objects/widgets/AOTF/aotfTable.ts @@ -1,5 +1,23 @@ import type { Locator, Page } from "@playwright/test"; +/** + * Interactor for the Association On-The-Fly (AOTF) Table component. + * + * The AOTF table displays target-disease associations with scores across + * different data types. It supports multiple sections (Pinned, Uploaded, Core) + * and provides functionality for sorting, filtering, and pagination. + * + * @example + * ```typescript + * const table = new AotfTable(page); + * await table.waitForTableLoad(); + * const rowCount = await table.getRowCount(); + * const entityName = await table.getEntityName(0); + * ``` + * + * @category AOTF + * @remarks Section ID: `associations-table` + */ export class AotfTable { page: Page; diff --git a/packages/platform-test/POM/objects/widgets/Bibliography/bibliographySection.ts b/packages/platform-test/POM/objects/widgets/Bibliography/bibliographySection.ts index afbc92d63..4dc713630 100644 --- a/packages/platform-test/POM/objects/widgets/Bibliography/bibliographySection.ts +++ b/packages/platform-test/POM/objects/widgets/Bibliography/bibliographySection.ts @@ -1,5 +1,23 @@ import type { Locator, Page } from "@playwright/test"; +/** + * Interactor for the Bibliography section widget. + * + * Displays literature references and publications related to a target, disease, + * or drug. Supports searching through literature, pagination, and external + * PubMed links. + * + * @example + * ```typescript + * const biblio = new BibliographySection(page); + * await biblio.waitForSectionLoad(); + * const count = await biblio.getLiteratureCount(); + * await biblio.searchLiterature("BRAF mutation"); + * ``` + * + * @category Bibliography + * @remarks Section ID: `bibliography` + */ export class BibliographySection { page: Page; diff --git a/packages/platform-test/POM/objects/widgets/CredibleSet/locus2GeneSection.ts b/packages/platform-test/POM/objects/widgets/CredibleSet/locus2GeneSection.ts index d54f3832d..79b7a64a0 100644 --- a/packages/platform-test/POM/objects/widgets/CredibleSet/locus2GeneSection.ts +++ b/packages/platform-test/POM/objects/widgets/CredibleSet/locus2GeneSection.ts @@ -1,17 +1,39 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Locus-to-Gene (L2G) section on Credible Set page - * Section ID: locus2gene + * Interactor for Locus-to-Gene (L2G) section on Credible Set page. + * + * The L2G section displays gene prioritization scores based on various + * evidence sources. Uses a HeatmapTable to visualize scores across + * different features. + * + * @example + * ```typescript + * const l2g = new Locus2GeneSection(page); + * await l2g.waitForLoad(); + * const geneCount = await l2g.getTableRows(); + * const topGene = await l2g.getTargetGeneName(0); + * const score = await l2g.getL2GScore(0); + * ``` + * + * @category CredibleSet + * @remarks Section ID: `locus2gene` */ export class Locus2GeneSection { constructor(private page: Page) {} - // Section container + /** + * Get the main section container element. + * @returns Locator for the section container + */ getSection(): Locator { return this.page.locator("[data-testid='section-locus2gene']"); } + /** + * Check if the section is currently visible on the page. + * @returns Promise resolving to true if visible, false otherwise + */ async isSectionVisible(): Promise { return await this.getSection() .isVisible() diff --git a/packages/platform-test/POM/objects/widgets/KnownDrugs/knownDrugsSection.ts b/packages/platform-test/POM/objects/widgets/KnownDrugs/knownDrugsSection.ts index 7e5aeb373..945db167e 100644 --- a/packages/platform-test/POM/objects/widgets/KnownDrugs/knownDrugsSection.ts +++ b/packages/platform-test/POM/objects/widgets/KnownDrugs/knownDrugsSection.ts @@ -1,5 +1,24 @@ import type { Locator, Page } from "@playwright/test"; +/** + * Interactor for the Known Drugs / Clinical Precedence section. + * + * Displays drugs that have been used to treat a disease or target, + * including clinical trial information and approval status. + * Supports searching, filtering, and pagination. + * + * @example + * ```typescript + * const drugs = new ClinicalPrecedenceSection(page); + * await drugs.waitForSectionLoad(); + * const rowCount = await drugs.getRowCount(); + * const drugName = await drugs.getDrugName(0); + * await drugs.searchDrug("aspirin"); + * ``` + * + * @category KnownDrugs + * @remarks Section ID: `knowndrugs` + */ export class ClinicalPrecedenceSection { page: Page; diff --git a/packages/platform-test/POM/objects/widgets/Variant/variantEffectSection.ts b/packages/platform-test/POM/objects/widgets/Variant/variantEffectSection.ts index 9e6a5cecd..335e14a66 100644 --- a/packages/platform-test/POM/objects/widgets/Variant/variantEffectSection.ts +++ b/packages/platform-test/POM/objects/widgets/Variant/variantEffectSection.ts @@ -1,16 +1,39 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Variant Effect section + * Interactor for Variant Effect / In-Silico Predictors section. + * + * Displays computational predictions of variant effects from various + * in-silico prediction methods. Supports both table and chart views + * for visualizing prediction scores. + * + * @example + * ```typescript + * const variantEffect = new VariantEffectSection(page); + * await variantEffect.waitForLoad(); + * const methodName = await variantEffect.getMethodName(0); + * const prediction = await variantEffect.getPrediction(0); + * await variantEffect.switchToChartView(); + * ``` + * + * @category Variant + * @remarks Section ID: `in-silico-predictors` */ export class VariantEffectSection { constructor(private page: Page) {} - // Section container + /** + * Get the main section container element. + * @returns Locator for the section container + */ getSection(): Locator { return this.page.locator("[data-testid='section-in-silico-predictors']"); } + /** + * Check if the section is currently visible. + * @returns Promise resolving to true if visible, false otherwise + */ async isSectionVisible(): Promise { return await this.getSection() .isVisible() diff --git a/packages/platform-test/POM/objects/widgets/shared/GWASCredibleSetsSection.ts b/packages/platform-test/POM/objects/widgets/shared/GWASCredibleSetsSection.ts index 0a711c638..5b8359266 100644 --- a/packages/platform-test/POM/objects/widgets/shared/GWASCredibleSetsSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/GWASCredibleSetsSection.ts @@ -1,8 +1,35 @@ import type { Locator, Page } from "@playwright/test"; /** - * Shared interactor for GWAS Credible Sets section - * Used in both Variant and Study pages + * Interactor for the GWAS Credible Sets section (shared across Variant and Study pages). + * + * Displays fine-mapped credible sets from GWAS studies, representing the set of + * variants most likely to contain the causal variant. Information includes: + * - **Credible set ID**: Unique identifier linking to detailed credible set page + * - **Lead variant**: The most significant variant in the set + * - **Study information**: GWAS study ID and reported trait + * - **L2G gene**: Top gene from Locus-to-Gene prediction + * - **Posterior probability**: Statistical confidence for causal variants + * + * Used for both Variant pages (showing credible sets containing the variant) + * and Study pages (showing all credible sets from a study). + * + * @example + * ```typescript + * const gwasCredibleSets = new GWASCredibleSetsSection(page); + * await gwasCredibleSets.waitForLoad(); + * + * // Get credible set details + * const rowCount = await gwasCredibleSets.getTableRows(); + * const credibleSetId = await gwasCredibleSets.getCredibleSetId(0); + * + * // Navigate to related pages + * await gwasCredibleSets.clickCredibleSetLink(0); + * await gwasCredibleSets.clickStudyLink(0); + * ``` + * + * @category shared + * @remarks Section ID: `gwas-credible-sets` */ export class GWASCredibleSetsSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/adverseEventsSection.ts b/packages/platform-test/POM/objects/widgets/shared/adverseEventsSection.ts index 39f557d20..009db5cdc 100644 --- a/packages/platform-test/POM/objects/widgets/shared/adverseEventsSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/adverseEventsSection.ts @@ -1,7 +1,27 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Adverse Events section + * Interactor for the Adverse Events (Pharmacovigilance) section on Drug pages. + * + * Displays adverse event data from the FDA Adverse Event Reporting System (FAERS), + * including event names with MedDRA links, reported event counts, and log likelihood + * ratios indicating the strength of the drug-adverse event association. + * + * @example + * ```typescript + * const adverseEvents = new PharmacovigilanceSection(page); + * await adverseEvents.waitForLoad(); + * + * // Get number of adverse events + * const rowCount = await adverseEvents.getTableRows(); + * + * // Get details of first adverse event + * const eventName = await adverseEvents.getAdverseEventName(0); + * const llr = await adverseEvents.getLogLikelihoodRatio(0); + * ``` + * + * @category shared + * @remarks Section ID: `adverseevents` */ export class PharmacovigilanceSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/cancerHallmarksSection.ts b/packages/platform-test/POM/objects/widgets/shared/cancerHallmarksSection.ts index 01317d159..d7fada21e 100644 --- a/packages/platform-test/POM/objects/widgets/shared/cancerHallmarksSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/cancerHallmarksSection.ts @@ -1,9 +1,32 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Cancer Hallmarks section on Target page - * Displays cancer hallmarks with role in cancer chips and a table of hallmark effects - * Uses only data-testid selectors for reliable, predictable testing + * Interactor for the Cancer Hallmarks section on Target pages. + * + * Displays cancer hallmark annotations based on the "Hallmarks of Cancer" framework, + * showing the target's role in cancer progression. The section includes: + * - **Role in Cancer chips**: Visual indicators of oncogene/tumor suppressor roles + * - **Hallmark effects table**: Detailed breakdown of hallmark impacts with literature evidence + * + * Data is sourced from manually curated literature with links to supporting publications. + * + * @example + * ```typescript + * const cancerHallmarks = new CancerHallmarksSection(page); + * await cancerHallmarks.waitForLoad(); + * + * // Check role in cancer + * const roleLabel = await cancerHallmarks.getRoleInCancerChipLabel(0); + * + * // Search hallmarks table + * await cancerHallmarks.search("proliferation"); + * + * // Access publications + * await cancerHallmarks.clickPublicationsDrawer(); + * ``` + * + * @category shared + * @remarks Section ID: `cancerhallmarks` */ export class CancerHallmarksSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/chemicalProbesSection.ts b/packages/platform-test/POM/objects/widgets/shared/chemicalProbesSection.ts index d04e695ca..5b9c42505 100644 --- a/packages/platform-test/POM/objects/widgets/shared/chemicalProbesSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/chemicalProbesSection.ts @@ -1,9 +1,35 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Chemical Probes section on Target page - * Displays chemical probes with quality ratings and mechanisms of action - * Uses only data-testid selectors for reliable, predictable testing + * Interactor for the Chemical Probes section on Target pages. + * + * Displays high-quality chemical probes that can be used to investigate + * target biology. Data is sourced from the Chemical Probes Portal and includes: + * - **Probe names**: Identifiers with links to external resources + * - **Quality ratings**: Probe quality assessments (e.g., "Best available", "Historical") + * - **Mechanisms of action**: How the probe interacts with the target + * - **Selectivity information**: Off-target effects and specificity data + * + * Chemical probes are small molecules designed to selectively modulate protein + * function for research purposes. + * + * @example + * ```typescript + * const chemicalProbes = new ChemicalProbesSection(page); + * await chemicalProbes.waitForLoad(); + * + * // Check if probes are available + * const hasProbes = await chemicalProbes.isTableVisible(); + * + * // Search for specific probe + * await chemicalProbes.search("JQ1"); + * + * // Download probe data + * await chemicalProbes.clickDataDownloader(); + * ``` + * + * @category shared + * @remarks Section ID: `chemicalprobes` */ export class ChemicalProbesSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/comparativeGenomicsSection.ts b/packages/platform-test/POM/objects/widgets/shared/comparativeGenomicsSection.ts index cb4f5682c..63e022c7c 100644 --- a/packages/platform-test/POM/objects/widgets/shared/comparativeGenomicsSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/comparativeGenomicsSection.ts @@ -1,9 +1,37 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Comparative Genomics section on Target page - * Displays orthologues and paralogues with a chart and table view - * Uses only data-testid selectors for reliable, predictable testing + * Interactor for the Comparative Genomics section on Target pages. + * + * Displays evolutionary conservation data showing homologous genes across species. + * Data is sourced from Ensembl Compara and includes: + * - **Orthologues**: Genes in other species that evolved from a common ancestor + * - **Paralogues**: Genes within the same species arising from gene duplication + * - **Homology types**: One-to-one, one-to-many, many-to-many relationships + * - **Sequence identity**: Percentage similarity between protein sequences + * + * The section supports two visualization modes: + * - **Chart view**: Phylogenetic tree visualization of homologues + * - **Table view**: Detailed tabular data with search and pagination + * + * @example + * ```typescript + * const compGenomics = new ComparativeGenomicsSection(page); + * await compGenomics.waitForLoad(); + * + * // Switch between views + * await compGenomics.switchToChartView(); + * const chartVisible = await compGenomics.isChartVisible(); + * + * await compGenomics.switchToTableView(); + * await compGenomics.search("mouse"); + * + * // Download data + * await compGenomics.clickDataDownloader(); + * ``` + * + * @category shared + * @remarks Section ID: `compgenomics` */ export class ComparativeGenomicsSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/depMapSection.ts b/packages/platform-test/POM/objects/widgets/shared/depMapSection.ts index 9ecef669a..e334c645c 100644 --- a/packages/platform-test/POM/objects/widgets/shared/depMapSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/depMapSection.ts @@ -1,8 +1,31 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Cancer DepMap section on Target page - * Displays gene essentiality data from DepMap as a visualization plot + * Interactor for the Cancer DepMap (Dependency Map) section on Target pages. + * + * Displays gene essentiality data from the Broad Institute's DepMap project, + * showing how essential a gene is for cancer cell survival across different + * cell lines and cancer types. The visualization helps identify: + * - **Essential genes**: Required for cell survival (potential drug targets) + * - **Non-essential genes**: Not required for survival + * - **Cancer-specific dependencies**: Genes essential only in certain cancer types + * + * Data is derived from genome-wide CRISPR-Cas9 knockout screens. + * + * @example + * ```typescript + * const depMap = new DepMapSection(page); + * await depMap.waitForLoad(); + * + * // Check if essentiality plot is displayed + * const plotVisible = await depMap.isPlotVisible(); + * + * // Export data + * await depMap.clickExportData(); + * ``` + * + * @category shared + * @remarks Section ID: `depmapessentiality` */ export class DepMapSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/drugWarningsSection.ts b/packages/platform-test/POM/objects/widgets/shared/drugWarningsSection.ts index 067e36ee1..a79b4db44 100644 --- a/packages/platform-test/POM/objects/widgets/shared/drugWarningsSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/drugWarningsSection.ts @@ -1,7 +1,31 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Drug Warnings section + * Interactor for the Drug Warnings section on Drug pages. + * + * Displays regulatory safety warnings and alerts associated with a drug, + * including FDA black box warnings, withdrawals, and safety communications. + * Information includes: + * - **Warning type**: Category of the safety alert + * - **Warning description**: Details about the safety concern + * - **Adverse events**: Links to related MedDRA terms + * - **References**: Links to regulatory sources + * + * @example + * ```typescript + * const warnings = new DrugWarningsSection(page); + * await warnings.waitForLoad(); + * + * // Get warning details + * const rowCount = await warnings.getTableRows(); + * const warningType = await warnings.getWarningType(0); + * + * // Search warnings + * await warnings.search("cardiac"); + * ``` + * + * @category shared + * @remarks Section ID: `drugwarnings` */ export class DrugWarningsSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/enhancerToGenePredictionsSection.ts b/packages/platform-test/POM/objects/widgets/shared/enhancerToGenePredictionsSection.ts index cf96239b3..71b0a3722 100644 --- a/packages/platform-test/POM/objects/widgets/shared/enhancerToGenePredictionsSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/enhancerToGenePredictionsSection.ts @@ -1,7 +1,31 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Enhancer-to-Gene Predictions section on Variant page + * Interactor for the Enhancer-to-Gene (E2G) Predictions section on Variant pages. + * + * Displays predictions linking non-coding variants in enhancer regions to their + * potential target genes. Uses machine learning models to predict regulatory + * relationships based on: + * - **E2G Score**: Confidence score for the enhancer-gene link + * - **Target gene**: The predicted regulated gene + * - **Tissue/cell type**: Context where the regulation is predicted + * - **Distance**: Genomic distance between variant and gene + * + * Helps interpret the functional impact of non-coding GWAS variants. + * + * @example + * ```typescript + * const e2g = new EnhancerToGenePredictionsSection(page); + * await e2g.waitForLoad(); + * + * // Get predictions + * const rowCount = await e2g.getTableRows(); + * const geneName = await e2g.getTargetGeneName(0); + * const score = await e2g.getE2GScore(0); + * ``` + * + * @category shared + * @remarks Section ID: `enhancer-to-gene-predictions` */ export class EnhancerToGenePredictionsSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/evaSection.ts b/packages/platform-test/POM/objects/widgets/shared/evaSection.ts index 8b3d43795..cd9db34ea 100644 --- a/packages/platform-test/POM/objects/widgets/shared/evaSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/evaSection.ts @@ -1,7 +1,32 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for EVA/ClinVar section on Variant page + * Interactor for the EVA/ClinVar section on Variant pages. + * + * Displays clinical variant annotations from the European Variation Archive (EVA) + * and NCBI ClinVar database. Information includes: + * - **Clinical significance**: Pathogenic, benign, uncertain significance, etc. + * - **Associated diseases**: Conditions linked to the variant + * - **Review status**: Level of evidence supporting the classification + * - **Submitter information**: Organizations that submitted the annotation + * + * Essential for understanding the clinical relevance of genetic variants. + * + * @example + * ```typescript + * const eva = new EVASection(page); + * await eva.waitForLoad(); + * + * // Get clinical annotations + * const rowCount = await eva.getTableRows(); + * const significance = await eva.getClinicalSignificance(0); + * + * // Navigate to disease + * await eva.clickDiseaseLink(0); + * ``` + * + * @category shared + * @remarks Section ID: `eva` */ export class EVASection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/expressionSection.ts b/packages/platform-test/POM/objects/widgets/shared/expressionSection.ts index faf18f404..28a5890c6 100644 --- a/packages/platform-test/POM/objects/widgets/shared/expressionSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/expressionSection.ts @@ -1,18 +1,40 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Baseline Expression section on Target page - * Displays RNA and protein expression data with tabs (Summary, GTEx) - * Uses only data-testid selectors for reliable, predictable testing + * Interactor for Baseline Expression section on Target page. + * + * Displays RNA and protein expression data with multiple tabs: + * - **Summary**: Overview of expression across tissues + * - **GTEx**: Detailed GTEx expression data + * + * Uses data-testid selectors for reliable, predictable testing. + * + * @example + * ```typescript + * const expression = new ExpressionSection(page); + * await expression.waitForLoad(); + * await expression.clickGtexTab(); + * const isGtexVisible = await expression.isGtexContentVisible(); + * ``` + * + * @category shared + * @remarks Section ID: `expressions` */ export class ExpressionSection { constructor(private page: Page) {} - // Section container + /** + * Get the main section container element. + * @returns Locator for the section container + */ getSection(): Locator { return this.page.locator("[data-testid='section-expressions']"); } + /** + * Check if the section is currently visible. + * @returns Promise resolving to true if visible, false otherwise + */ async isSectionVisible(): Promise { return await this.getSection() .isVisible() diff --git a/packages/platform-test/POM/objects/widgets/shared/geneOntologySection.ts b/packages/platform-test/POM/objects/widgets/shared/geneOntologySection.ts index 715776656..bfa736f63 100644 --- a/packages/platform-test/POM/objects/widgets/shared/geneOntologySection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/geneOntologySection.ts @@ -1,9 +1,33 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Gene Ontology section on Target page - * Displays GO annotations organized by aspect (Molecular Function, Biological Process, Cellular Component) - * Uses only data-testid selectors for reliable, predictable testing + * Interactor for the Gene Ontology (GO) section on Target pages. + * + * Displays functional annotations from the Gene Ontology Consortium, organized + * by three aspects: + * - **Molecular Function (MF)**: Activities at the molecular level (e.g., kinase activity) + * - **Biological Process (BP)**: Larger biological programs (e.g., cell division) + * - **Cellular Component (CC)**: Locations within the cell (e.g., nucleus) + * + * Each annotation includes evidence codes and links to supporting publications. + * + * @example + * ```typescript + * const geneOntology = new GeneOntologySection(page); + * await geneOntology.waitForLoad(); + * + * // Search GO terms + * await geneOntology.search("kinase"); + * + * // Access publications + * await geneOntology.clickPublicationsDrawer(); + * + * // Download data + * await geneOntology.clickDataDownloader(); + * ``` + * + * @category shared + * @remarks Section ID: `geneontology` */ export class GeneOntologySection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/geneticConstraintSection.ts b/packages/platform-test/POM/objects/widgets/shared/geneticConstraintSection.ts index 86af7cfd3..dd87689d4 100644 --- a/packages/platform-test/POM/objects/widgets/shared/geneticConstraintSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/geneticConstraintSection.ts @@ -1,8 +1,33 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Genetic Constraint section on Target page - * Displays constraint metrics from gnomAD + * Interactor for the Genetic Constraint section on Target pages. + * + * Displays evolutionary constraint metrics from gnomAD (Genome Aggregation Database), + * indicating how tolerant a gene is to different types of mutations. Metrics include: + * - **pLI (Loss-of-function intolerance)**: Probability gene is intolerant to LoF variants + * - **LOEUF**: Loss-of-function observed/expected upper bound fraction + * - **Missense constraint**: Z-score for missense variant depletion + * - **Synonymous constraint**: Z-score for synonymous variant depletion + * + * High constraint scores suggest the gene is essential and mutations may be disease-causing. + * + * @example + * ```typescript + * const constraint = new GeneticConstraintSection(page); + * await constraint.waitForLoad(); + * + * // Get constraint metrics + * const rowCount = await constraint.getTableRows(); + * const constraintType = await constraint.getConstraintType(0); + * const score = await constraint.getScore(0); + * + * // Link to gnomAD + * await constraint.clickGnomadLink(); + * ``` + * + * @category shared + * @remarks Section ID: `geneticconstraint` */ export class GeneticConstraintSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/indicationsSection.ts b/packages/platform-test/POM/objects/widgets/shared/indicationsSection.ts index 1fe765009..ce327fb63 100644 --- a/packages/platform-test/POM/objects/widgets/shared/indicationsSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/indicationsSection.ts @@ -1,7 +1,32 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Indications section + * Interactor for the Indications section on Drug pages. + * + * Displays therapeutic indications (approved uses) for a drug, sourced from + * ChEMBL and other regulatory databases. Information includes: + * - **Indication name**: Disease or condition the drug treats + * - **Max phase**: Highest clinical trial phase reached + * - **References**: Links to supporting regulatory sources + * + * Shows both approved indications and those in clinical development. + * + * @example + * ```typescript + * const indications = new IndicationsSection(page); + * await indications.waitForLoad(); + * + * // Get indication details + * const rowCount = await indications.getTableRows(); + * const indicationName = await indications.getIndicationName(0); + * const maxPhase = await indications.getMaxPhase(0); + * + * // Navigate to disease page + * await indications.clickIndicationLink(0); + * ``` + * + * @category shared + * @remarks Section ID: `indications` */ export class IndicationsSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/mechanismsOfActionSection.ts b/packages/platform-test/POM/objects/widgets/shared/mechanismsOfActionSection.ts index 9dd7c29f0..099010300 100644 --- a/packages/platform-test/POM/objects/widgets/shared/mechanismsOfActionSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/mechanismsOfActionSection.ts @@ -1,7 +1,33 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Mechanisms of Action section + * Interactor for the Mechanisms of Action section on Drug pages. + * + * Displays how a drug exerts its therapeutic effect, including the molecular + * targets and the type of interaction. Data sourced from ChEMBL includes: + * - **Mechanism of action**: Description of drug-target interaction + * - **Target name**: Protein or gene the drug acts upon + * - **Action type**: Inhibitor, agonist, antagonist, etc. + * - **References**: Supporting literature and database links + * + * Essential for understanding drug pharmacology and potential off-target effects. + * + * @example + * ```typescript + * const moa = new MechanismsOfActionSection(page); + * await moa.waitForLoad(); + * + * // Get mechanism details + * const rowCount = await moa.getTableRows(); + * const mechanism = await moa.getMechanismOfAction(0); + * const targetName = await moa.getTargetName(0); + * + * // Navigate to target page + * await moa.clickTargetLink(0, 0); + * ``` + * + * @category shared + * @remarks Section ID: `mechanismsofaction` */ export class MechanismsOfActionSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/molecularInteractionsSection.ts b/packages/platform-test/POM/objects/widgets/shared/molecularInteractionsSection.ts index 6a7848b14..126a5ea9a 100644 --- a/packages/platform-test/POM/objects/widgets/shared/molecularInteractionsSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/molecularInteractionsSection.ts @@ -1,9 +1,35 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Molecular Interactions section on Target page - * Displays protein-protein interactions with tabs for different sources (IntAct, Signor, Reactome, String) - * Uses only data-testid selectors for reliable, predictable testing + * Interactor for the Molecular Interactions section on Target pages. + * + * Displays protein-protein interactions (PPIs) from multiple curated databases, + * organized in tabs by data source: + * - **IntAct**: Experimentally validated physical interactions + * - **Signor**: Causal signaling relationships + * - **Reactome**: Pathway-based functional interactions + * - **String**: Predicted and experimental interaction networks + * + * Each interaction includes confidence scores, interaction types, and literature evidence. + * + * @example + * ```typescript + * const interactions = new MolecularInteractionsSection(page); + * await interactions.waitForLoad(); + * + * // Switch between data sources + * await interactions.clickIntactTab(); + * await interactions.clickSignorTab(); + * + * // Search interactions + * await interactions.search("MAPK"); + * + * // Download data + * await interactions.clickDataDownloader(); + * ``` + * + * @category shared + * @remarks Section ID: `interactions` */ export class MolecularInteractionsSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/molecularStructureSection.ts b/packages/platform-test/POM/objects/widgets/shared/molecularStructureSection.ts index f2f309595..cf77d265d 100644 --- a/packages/platform-test/POM/objects/widgets/shared/molecularStructureSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/molecularStructureSection.ts @@ -1,7 +1,29 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Molecular Structure section on Variant page + * Interactor for the Molecular Structure section on Variant pages. + * + * Displays 3D protein structure visualization showing the variant's location + * within the protein. Uses AlphaFold predicted structures when experimental + * structures are unavailable. Features include: + * - **3D structure viewer**: Interactive protein structure visualization + * - **Variant mapping**: Highlights the variant position on the structure + * - **Confidence scores**: AlphaFold pLDDT scores for structure reliability + * + * Helps understand the potential structural impact of amino acid changes. + * + * @example + * ```typescript + * const structure = new MolecularStructureSection(page); + * await structure.waitForLoad(); + * + * // Check if structure is available + * const hasStructure = await structure.hasStructureViewer(); + * const viewerVisible = await structure.isAlphaFoldViewerVisible(); + * ``` + * + * @category shared + * @remarks Section ID: `molecular-structure` */ export class MolecularStructureSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/mousePhenotypesSection.ts b/packages/platform-test/POM/objects/widgets/shared/mousePhenotypesSection.ts index 09a3f6d88..92c2cfed1 100644 --- a/packages/platform-test/POM/objects/widgets/shared/mousePhenotypesSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/mousePhenotypesSection.ts @@ -1,8 +1,33 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Mouse Phenotypes section on Target page - * Displays phenotypes observed in mouse models with gene knockouts + * Interactor for the Mouse Phenotypes section on Target pages. + * + * Displays phenotypes observed in mouse models with gene knockouts or mutations, + * sourced from the International Mouse Phenotyping Consortium (IMPC) and MGI. + * Information includes: + * - **Phenotype categories**: Grouped by biological system (e.g., cardiovascular, nervous) + * - **Phenotype labels**: Specific observed effects with Mammalian Phenotype Ontology terms + * - **Biological models**: Details about the mouse strains and genetic modifications + * + * Valuable for predicting potential effects of target modulation in humans. + * + * @example + * ```typescript + * const mousePhenotypes = new MousePhenotypesSection(page); + * await mousePhenotypes.waitForLoad(); + * + * // Get phenotype details + * const rowCount = await mousePhenotypes.getTableRows(); + * const category = await mousePhenotypes.getPhenotypeCategory(0); + * const label = await mousePhenotypes.getPhenotypeLabel(0); + * + * // View biological models + * await mousePhenotypes.clickBiologicalModelsDrawer(0); + * ``` + * + * @category shared + * @remarks Section ID: `mousephenotypes` */ export class MousePhenotypesSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/pathwaysSection.ts b/packages/platform-test/POM/objects/widgets/shared/pathwaysSection.ts index 1b4fc84b8..6353b10c0 100644 --- a/packages/platform-test/POM/objects/widgets/shared/pathwaysSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/pathwaysSection.ts @@ -1,8 +1,32 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Pathways section on Target page - * Displays Reactome pathway membership + * Interactor for the Pathways section on Target pages. + * + * Displays biological pathway membership from Reactome, showing which cellular + * processes and signaling cascades involve the target gene. Information includes: + * - **Pathway name**: Specific pathway the target participates in + * - **Top-level pathway**: Parent category (e.g., Signal Transduction, Metabolism) + * - **Pathway browser link**: Direct link to interactive Reactome pathway diagram + * + * Helps understand the broader biological context and functions of a target. + * + * @example + * ```typescript + * const pathways = new PathwaysSection(page); + * await pathways.waitForLoad(); + * + * // Get pathway details + * const rowCount = await pathways.getTableRows(); + * const pathwayName = await pathways.getPathwayName(0); + * const topLevel = await pathways.getTopLevelPathway(0); + * + * // Navigate to Reactome + * await pathways.clickPathwayBrowserLink(0); + * ``` + * + * @category shared + * @remarks Section ID: `pathways` */ export class PathwaysSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/pharmacogenomicsSection.ts b/packages/platform-test/POM/objects/widgets/shared/pharmacogenomicsSection.ts index 280922be4..5f4d51c77 100644 --- a/packages/platform-test/POM/objects/widgets/shared/pharmacogenomicsSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/pharmacogenomicsSection.ts @@ -2,7 +2,33 @@ import type { Locator, Page } from "@playwright/test"; import { fillPolling } from "../../../../utils/fillPolling"; /** - * Interactor for Pharmacogenomics section + * Interactor for the Pharmacogenomics section on Target and Drug pages. + * + * Displays genetic variants that affect drug response, sourced from PharmGKB. + * This information is crucial for personalized medicine and includes: + * - **Genotype/Haplotype**: Specific genetic variant or combination + * - **Drug**: Medication affected by the genetic variant + * - **Phenotype**: Clinical outcome or drug response + * - **Evidence level**: Strength of the pharmacogenomic association + * - **Gene**: The gene containing the variant + * + * @example + * ```typescript + * const pharmaco = new PharmacogenomicsSection(page); + * await pharmaco.waitForLoad(); + * + * // Get pharmacogenomic associations + * const rowCount = await pharmaco.getTableRows(); + * const genotype = await pharmaco.getGenotypeId(0); + * const drugName = await pharmaco.getDrugName(0, 0); + * + * // Navigate to related pages + * await pharmaco.clickDrugLink(0, 0); + * await pharmaco.clickGeneLink(0); + * ``` + * + * @category shared + * @remarks Section ID: `pharmacogenetics` */ export class PharmacogenomicsSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/qtlCredibleSetsSection.ts b/packages/platform-test/POM/objects/widgets/shared/qtlCredibleSetsSection.ts index 917c75a1b..f00f4eb8d 100644 --- a/packages/platform-test/POM/objects/widgets/shared/qtlCredibleSetsSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/qtlCredibleSetsSection.ts @@ -1,7 +1,33 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for QTL Credible Sets section on Variant page + * Interactor for the QTL Credible Sets section on Variant pages. + * + * Displays molecular QTL (Quantitative Trait Loci) credible sets containing + * the variant, including expression QTLs (eQTLs), splicing QTLs (sQTLs), + * and protein QTLs (pQTLs). Information includes: + * - **Credible set ID**: Links to detailed credible set analysis + * - **Study**: QTL study identifier and type (eQTL, sQTL, pQTL) + * - **Affected gene**: Gene whose expression/splicing is affected + * - **Tissue**: Biological context where the QTL effect is observed + * + * Helps link non-coding variants to their molecular effects on gene regulation. + * + * @example + * ```typescript + * const qtlCredibleSets = new QTLCredibleSetsSection(page); + * await qtlCredibleSets.waitForLoad(); + * + * // Get QTL data + * const rowCount = await qtlCredibleSets.getTableRows(); + * + * // Navigate to related pages + * await qtlCredibleSets.clickCredibleSetLink(0); + * await qtlCredibleSets.clickAffectedGeneLink(0); + * ``` + * + * @category shared + * @remarks Section ID: `qtl-credible-sets` */ export class QTLCredibleSetsSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/safetySection.ts b/packages/platform-test/POM/objects/widgets/shared/safetySection.ts index 8b0531160..d3fc8f6a9 100644 --- a/packages/platform-test/POM/objects/widgets/shared/safetySection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/safetySection.ts @@ -1,9 +1,34 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Safety section on Target page - * Displays known safety liabilities with effects and biosamples - * Uses only data-testid selectors for reliable, predictable testing + * Interactor for the Safety section on Target pages. + * + * Displays known safety liabilities associated with modulating the target, + * aggregated from multiple sources including literature and toxicology databases. + * Information includes: + * - **Safety event**: Type of adverse effect observed + * - **Biosystems/Organs**: Affected biological systems + * - **Effects**: Specific observed outcomes + * - **Studies**: Links to supporting studies and publications + * + * Critical for target safety assessment in drug discovery. + * + * @example + * ```typescript + * const safety = new SafetySection(page); + * await safety.waitForLoad(); + * + * // Get safety liabilities + * const rowCount = await safety.getTableRowCount(); + * const eventName = await safety.getSafetyEventName(0); + * + * // Access supporting evidence + * await safety.clickBiosystemsDrawer(0); + * await safety.clickPublicationsDrawer(0); + * ``` + * + * @category shared + * @remarks Section ID: `safety` */ export class SafetySection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/subcellularLocationSection.ts b/packages/platform-test/POM/objects/widgets/shared/subcellularLocationSection.ts index 3d6733856..751268f5f 100644 --- a/packages/platform-test/POM/objects/widgets/shared/subcellularLocationSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/subcellularLocationSection.ts @@ -1,9 +1,35 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Subcellular Location section on Target page - * Displays protein localization data with a visualization - * Uses only data-testid selectors for reliable, predictable testing + * Interactor for the Subcellular Location section on Target pages. + * + * Displays protein localization data from the Human Protein Atlas (HPA) and + * UniProt, showing where in the cell the protein is found. Features include: + * - **Cell diagram**: Visual representation of protein location + * - **Location tabs**: HPA Main, HPA Additional, HPA Extracellular, UniProt + * - **Confidence levels**: Reliability of localization data + * + * Important for understanding protein function and drug accessibility. + * + * @example + * ```typescript + * const location = new SubcellularLocationSection(page); + * await location.waitForLoad(); + * + * // Check visualization + * const diagramVisible = await location.isCellDiagramVisible(); + * + * // Switch between data sources + * await location.clickHpaMainTab(); + * await location.clickUniprotTab(); + * + * // Get location details + * const locationCount = await location.getLocationCount(); + * const locationName = await location.getLocationName(0); + * ``` + * + * @category shared + * @remarks Section ID: `subcellularlocation` */ export class SubcellularLocationSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/tractabilitySection.ts b/packages/platform-test/POM/objects/widgets/shared/tractabilitySection.ts index d015f5da3..392febef6 100644 --- a/packages/platform-test/POM/objects/widgets/shared/tractabilitySection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/tractabilitySection.ts @@ -1,18 +1,42 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Tractability section on Target page - * Displays tractability assessment across different modalities (Small molecule, Antibody, PROTAC, Other) - * Uses only data-testid selectors for reliable, predictable testing + * Interactor for Tractability section on Target page. + * + * Displays tractability assessment across different therapeutic modalities: + * - **Small molecule (SM)**: Druggability for small molecule interventions + * - **Antibody (AB)**: Accessibility for antibody-based therapies + * - **PROTAC (PR)**: Suitability for proteolysis targeting chimeras + * - **Other (OC)**: Other clinical modalities + * + * Uses data-testid selectors for reliable, predictable testing. + * + * @example + * ```typescript + * const tractability = new TractabilitySection(page); + * await tractability.waitForLoad(); + * const smEnabled = await tractability.getSmallMoleculeEnabledCount(); + * const abEnabled = await tractability.getAntibodyEnabledCount(); + * ``` + * + * @category shared + * @remarks Section ID: `tractability` */ export class TractabilitySection { constructor(private page: Page) {} - // Section container + /** + * Get the main section container element. + * @returns Locator for the section container + */ getSection(): Locator { return this.page.locator("[data-testid='section-tractability']"); } + /** + * Check if the section is currently visible. + * @returns Promise resolving to true if visible, false otherwise + */ async isSectionVisible(): Promise { return await this.getSection() .isVisible() diff --git a/packages/platform-test/POM/objects/widgets/shared/uniprotVariantsSection.ts b/packages/platform-test/POM/objects/widgets/shared/uniprotVariantsSection.ts index 85000f79b..fe88df461 100644 --- a/packages/platform-test/POM/objects/widgets/shared/uniprotVariantsSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/uniprotVariantsSection.ts @@ -1,7 +1,31 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for UniProt Variants section on Variant page + * Interactor for the UniProt Variants section on Variant pages. + * + * Displays variant annotations from UniProtKB, including natural variants, + * disease-associated mutations, and sequence conflicts. Information includes: + * - **Disease/Phenotype**: Associated conditions from UniProt annotations + * - **Variant description**: Functional impact and literature evidence + * - **Cross-references**: Links to disease databases (OMIM, etc.) + * + * Complements ClinVar data with protein-focused variant annotations. + * + * @example + * ```typescript + * const uniprotVariants = new UniProtVariantsSection(page); + * await uniprotVariants.waitForLoad(); + * + * // Get variant annotations + * const rowCount = await uniprotVariants.getTableRows(); + * + * // Navigate to disease pages + * const diseaseCount = await uniprotVariants.getDiseaseLinksCount(0); + * await uniprotVariants.clickDiseaseLink(0, 0); + * ``` + * + * @category shared + * @remarks Section ID: `uniprot-variants` */ export class UniProtVariantsSection { constructor(private page: Page) {} diff --git a/packages/platform-test/POM/objects/widgets/shared/variantEffectPredictorSection.ts b/packages/platform-test/POM/objects/widgets/shared/variantEffectPredictorSection.ts index 9adb07b11..98e836ecd 100644 --- a/packages/platform-test/POM/objects/widgets/shared/variantEffectPredictorSection.ts +++ b/packages/platform-test/POM/objects/widgets/shared/variantEffectPredictorSection.ts @@ -1,7 +1,35 @@ import type { Locator, Page } from "@playwright/test"; /** - * Interactor for Variant Effect Predictor/Transcript Consequences section + * Interactor for the Variant Effect Predictor (VEP) / Transcript Consequences section. + * + * Displays predicted consequences of a variant on overlapping transcripts, + * computed using Ensembl's Variant Effect Predictor. Information includes: + * - **Gene**: Affected gene with link to target page + * - **Transcript ID**: Specific transcript affected + * - **Predicted consequence**: SO term describing the variant effect + * - **Impact**: Severity classification (HIGH, MODERATE, LOW, MODIFIER) + * - **Amino acid change**: For coding variants, the resulting protein change + * + * Essential for understanding the functional impact of genetic variants. + * + * @example + * ```typescript + * const vep = new VariantEffectPredictorSection(page); + * await vep.waitForLoad(); + * + * // Get transcript consequences + * const rowCount = await vep.getTableRows(); + * const geneName = await vep.getGeneName(0); + * const consequence = await vep.getPredictedConsequence(0); + * const impact = await vep.getImpact(0); + * + * // Navigate to gene + * await vep.clickGeneLink(0); + * ``` + * + * @category shared + * @remarks Section ID: `variant-effect-predictor` */ export class VariantEffectPredictorSection { constructor(private page: Page) {} diff --git a/packages/platform-test/docs/WIDGETS_README.md b/packages/platform-test/docs/WIDGETS_README.md new file mode 100644 index 000000000..9dda6bded --- /dev/null +++ b/packages/platform-test/docs/WIDGETS_README.md @@ -0,0 +1,94 @@ +# Platform Test Widgets API + +Welcome to the API documentation for the Platform Test widget classes. + +## Overview + +This documentation covers all Page Object Model (POM) widget classes used for end-to-end testing in the Open Targets Platform. These widgets provide a clean API for interacting with various UI sections during Playwright tests. + +The documentation is generated using [TypeDoc](https://typedoc.org/) from JSDoc comments in the TypeScript source files. + +## Widget Categories + +### AOTF (Association On-The-Fly) +Widgets for the associations table and its controls: +- **AotfTable** - Main associations table interactions +- **AotfActions** - Table control panel (filters, export, view modes) + +### CredibleSet +Credible Set page section widgets for variant analysis: +- **Locus2GeneSection** - L2G gene prioritization scores +- **GWASColocSection** - GWAS colocalisation data +- **MolQTLColocSection** - Molecular QTL colocalisation +- **CredibleSetVariantsSection** - Variants in the credible set +- **CredibleSetEnhancerToGenePredictionsSection** - E2G predictions + +### Shared Widgets +Widgets used across multiple entity pages (Target, Disease, Drug, etc.): +- **ExpressionSection** - Baseline expression data +- **TractabilitySection** - Tractability assessment +- **SafetySection** - Safety liabilities +- **BibliographySection** - Literature references +- And many more... + +### Study +Study page section widgets: +- **QTLCredibleSetsSection** - QTL credible sets +- **SharedTraitStudiesSection** - Shared trait studies + +### Variant +Variant page section widgets: +- **VariantEffectSection** - In-silico predictions + +## Usage Example + +```typescript +import { test, expect } from "@playwright/test"; +import { Locus2GeneSection } from "../POM/objects/widgets/CredibleSet/locus2GeneSection"; + +test("L2G section displays data", async ({ page }) => { + await page.goto("/credible-set/GCST005647_12_56486014_C_T"); + + const l2gSection = new Locus2GeneSection(page); + + // Wait for section to load + await l2gSection.waitForLoad(); + + // Verify section is visible + expect(await l2gSection.isSectionVisible()).toBe(true); + + // Check table has data + const rowCount = await l2gSection.getTableRows(); + expect(rowCount).toBeGreaterThan(0); +}); +``` + +## Contributing + +When adding new widget classes: + +1. Add comprehensive JSDoc comments to the class and its methods +2. Follow the existing naming conventions +3. Run `yarn docs:test_interactors` to regenerate documentation +4. Ensure all public methods have JSDoc descriptions + +## Regenerating Documentation + +```bash +# Generate documentation +yarn docs:test_interactors + +# Generate and serve documentation locally +yarn docs:test_interactors:serve +``` + +## JSDoc Tags + +TypeDoc supports standard JSDoc tags. Here are the most useful ones: + +- `@param` - Document function parameters +- `@returns` - Document return values +- `@example` - Provide usage examples +- `@category` - Group classes by category +- `@see` - Reference related items +- `@deprecated` - Mark deprecated methods diff --git a/packages/platform-test/package.json b/packages/platform-test/package.json index b88e199e7..734703612 100644 --- a/packages/platform-test/package.json +++ b/packages/platform-test/package.json @@ -8,15 +8,21 @@ }, "devDependencies": { "@playwright/test": "^1.36.2", + "@types/node": "^25.2.0", "@types/papaparse": "^5.5.2", "dotenv": "^17.2.3", - "start-server-and-test": "^2.0.4" + "start-server-and-test": "^2.0.4", + "ts-node": "^10.9.2", + "typedoc": "^0.28.16", + "typescript": "^5.9.3" }, "scripts": { "dev-test": "playwright test", "dev-test:smoke": "playwright test --grep @smoke", "test:platform:e2e": "start-server-and-test \"(cd ../../apps/platform && yarn run serve)\" http://localhost:4173 \"playwright test\"", - "test:platform:e2e:smoke": "start-server-and-test \"(cd ../../apps/platform && yarn run serve)\" http://localhost:4173 \"playwright test --grep @smoke\"" + "test:platform:e2e:smoke": "start-server-and-test \"(cd ../../apps/platform && yarn run serve)\" http://localhost:4173 \"playwright test --grep @smoke\"", + "docs:test_interactors": "typedoc", + "docs:test_interactors:serve": "yarn docs:test_interactors && npx serve docs/widgets-api" }, "keywords": [], "author": "", diff --git a/packages/platform-test/playwright-report/index.html b/packages/platform-test/playwright-report/index.html deleted file mode 100644 index dcfcdb11a..000000000 --- a/packages/platform-test/playwright-report/index.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - Playwright Test Report - - - - -
- - - diff --git a/packages/platform-test/tsconfig.docs.json b/packages/platform-test/tsconfig.docs.json new file mode 100644 index 000000000..b68ee612e --- /dev/null +++ b/packages/platform-test/tsconfig.docs.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "moduleResolution": "node", + "lib": ["ES2020", "DOM"], + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "declarationMap": true, + "outDir": "./dist", + "rootDir": "." + }, + "include": ["POM/objects/widgets/**/*.ts"], + "exclude": ["node_modules", "dist", "docs"] +} diff --git a/packages/platform-test/typedoc.json b/packages/platform-test/typedoc.json new file mode 100644 index 000000000..b1c76454c --- /dev/null +++ b/packages/platform-test/typedoc.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["POM/objects/widgets"], + "entryPointStrategy": "expand", + "out": "docs/widgets-api", + "name": "Platform Test Widgets API", + "readme": "docs/WIDGETS_README.md", + "includeVersion": true, + "excludePrivate": true, + "excludeProtected": false, + "excludeInternal": true, + "disableSources": false, + "categorizeByGroup": true, + "defaultCategory": "Other", + "categoryOrder": ["AOTF", "CredibleSet", "shared", "Study", "Variant", "*"], + "groupOrder": ["Classes", "Functions", "Variables", "*"], + "navigation": { + "includeCategories": true, + "includeGroups": true + }, + "searchInComments": true, + "searchInDocuments": true, + "plugin": [], + "exclude": ["**/index.ts", "**/*.spec.ts", "**/*.test.ts"], + "tsconfig": "tsconfig.docs.json" +} diff --git a/packages/platform-test/types/index.ts b/packages/platform-test/types/index.ts index 6f155692b..7142cf84e 100644 --- a/packages/platform-test/types/index.ts +++ b/packages/platform-test/types/index.ts @@ -51,25 +51,31 @@ export interface TestConfig { withQTLColoc?: string; }; } /** - * CSV row structure from Google Sheet + * CSV row as array of strings (using indices instead of header names for resilience) */ +export type CSVRow = string[]; -export interface CSVRow { - "Testing Scenario": string; - drug_page_primary: string; - variant_primary: string; - variant_with_pharmacogenetics: string; - variant_with_qtl: string; - target_primary: string; - target_incomplete: string; - target_aotf_diseases: string; - disease_primary: string; - disease_name: string; - disease_alternatives: string; - disease_aotf_genes: string; - study_gwas: string; - study_qtl: string; - credible_set: string; - credible_set_GWAS_coloc: string; - credible_set_QTL_coloc: string; -} +/** + * Column indices for the Google Sheet CSV + * Using indices instead of header names makes parsing resilient to column name changes + * Update these indices if column order changes in the sheet + */ +export const CSV_COLUMNS = { + TESTING_SCENARIO: 0, + DRUG_PAGE_PRIMARY: 1, + VARIANT_PRIMARY: 2, + VARIANT_WITH_PHARMACOGENETICS: 3, + VARIANT_WITH_QTL: 4, + TARGET_PRIMARY: 5, + TARGET_INCOMPLETE: 6, + TARGET_AOTF_DISEASES: 7, + DISEASE_PRIMARY: 8, + DISEASE_NAME: 10, + DISEASE_ALTERNATIVES: 11, + DISEASE_AOTF_GENES: 9, + STUDY_GWAS: 12, + STUDY_QTL: 13, + CREDIBLE_SET: 14, + CREDIBLE_SET_GWAS_COLOC: 15, + CREDIBLE_SET_QTL_COLOC: 16, +} as const; diff --git a/packages/platform-test/utils/csvRowToTestConfig.ts b/packages/platform-test/utils/csvRowToTestConfig.ts index cd9216c49..2cc390938 100644 --- a/packages/platform-test/utils/csvRowToTestConfig.ts +++ b/packages/platform-test/utils/csvRowToTestConfig.ts @@ -1,53 +1,56 @@ import type { CSVRow, TestConfig } from "../types"; +import { CSV_COLUMNS } from "../types"; import { parseCsvStringToArray } from "../utils/parseCsvStringToArray"; /** - * Convert a CSV row to TestConfig structure + * Convert a CSV row (array of strings) to TestConfig structure + * Uses column indices for resilience against header name changes */ - export function csvRowToTestConfig(row: CSVRow): TestConfig { + const col = CSV_COLUMNS; + return { drug: { - primary: row.drug_page_primary, + primary: row[col.DRUG_PAGE_PRIMARY] || "", alternatives: { - withWarnings: row.drug_page_primary, - withAdverseEvents: row.drug_page_primary, + withWarnings: row[col.DRUG_PAGE_PRIMARY] || "", + withAdverseEvents: row[col.DRUG_PAGE_PRIMARY] || "", }, }, variant: { - primary: row.variant_primary, - withMolecularStructure: row.variant_primary, - withPharmacogenomics: row.variant_with_pharmacogenetics, - withQTL: row.variant_with_qtl || undefined, - withEVA: row.variant_primary || undefined, + primary: row[col.VARIANT_PRIMARY] || "", + withMolecularStructure: row[col.VARIANT_PRIMARY] || "", + withPharmacogenomics: row[col.VARIANT_WITH_PHARMACOGENETICS] || "", + withQTL: row[col.VARIANT_WITH_QTL] || undefined, + withEVA: row[col.VARIANT_PRIMARY] || undefined, }, target: { - primary: row.target_primary || undefined, - alternatives: parseCsvStringToArray(row.target_incomplete), - aotfDiseases: parseCsvStringToArray(row.target_aotf_diseases), + primary: row[col.TARGET_PRIMARY] || undefined, + alternatives: parseCsvStringToArray(row[col.TARGET_INCOMPLETE] || ""), + aotfDiseases: parseCsvStringToArray(row[col.TARGET_AOTF_DISEASES] || ""), }, disease: { - primary: row.disease_primary, - name: row.disease_name || undefined, - alternatives: parseCsvStringToArray(row.disease_alternatives), - aotfGenes: parseCsvStringToArray(row.disease_aotf_genes), + primary: row[col.DISEASE_PRIMARY] || "", + name: row[col.DISEASE_NAME] || undefined, + alternatives: parseCsvStringToArray(row[col.DISEASE_ALTERNATIVES] || ""), + aotfGenes: parseCsvStringToArray(row[col.DISEASE_AOTF_GENES] || ""), }, study: { gwas: { - primary: row.study_gwas, + primary: row[col.STUDY_GWAS] || "", alternatives: [], }, - qtl: row.study_qtl + qtl: row[col.STUDY_QTL] ? { - primary: row.study_qtl, + primary: row[col.STUDY_QTL], alternatives: [], } : undefined, }, credibleSet: { - primary: row.credible_set || undefined, - withGWASColoc: row.credible_set_GWAS_coloc || undefined, - withQTLColoc: row.credible_set_QTL_coloc || undefined, + primary: row[col.CREDIBLE_SET] || undefined, + withGWASColoc: row[col.CREDIBLE_SET_GWAS_COLOC] || undefined, + withQTLColoc: row[col.CREDIBLE_SET_QTL_COLOC] || undefined, }, }; } diff --git a/packages/platform-test/utils/fetchConfigFromSheet.ts b/packages/platform-test/utils/fetchConfigFromSheet.ts index 14ba7b43f..5a0a707af 100644 --- a/packages/platform-test/utils/fetchConfigFromSheet.ts +++ b/packages/platform-test/utils/fetchConfigFromSheet.ts @@ -1,9 +1,11 @@ import Papa from "papaparse"; import type { CSVRow, TestConfig } from "../types"; +import { CSV_COLUMNS } from "../types"; import { csvRowToTestConfig } from "./csvRowToTestConfig"; /** * Fetch test configuration from Google Sheet CSV URL + * Uses column indices instead of header names for resilience against column name changes */ export async function fetchConfigFromSheet( url: string, @@ -24,23 +26,30 @@ export async function fetchConfigFromSheet( } const csvText = await response.text(); + // Parse without headers - we'll use indices instead for resilience const parseResult = Papa.parse(csvText, { - header: true, + header: false, skipEmptyLines: true, - transformHeader: (header) => header.trim(), }); if (parseResult.errors.length > 0) { console.error("CSV parsing errors:", parseResult.errors); } - const rows = parseResult.data; + // Skip the header row (index 0) and get data rows + const rows = parseResult.data.slice(1); - // Find the row matching the scenario name - const matchingRow = rows.find((row) => row["Testing Scenario"] === scenarioName); + // Find the row matching the scenario name using the TESTING_SCENARIO column index + const matchingRow = rows.find( + (row) => row[CSV_COLUMNS.TESTING_SCENARIO]?.trim() === scenarioName + ); if (!matchingRow) { + const availableScenarios = rows + .map((r) => r[CSV_COLUMNS.TESTING_SCENARIO]) + .filter(Boolean) + .join(", "); console.error( - `Scenario "${scenarioName}" not found in CSV. Available scenarios: ${rows.map((r) => r["Testing Scenario"]).join(", ")}` + `Scenario "${scenarioName}" not found in CSV. Available scenarios: ${availableScenarios}` ); return null; } diff --git a/turbo.json b/turbo.json index 89d0574d8..212927718 100644 --- a/turbo.json +++ b/turbo.json @@ -41,6 +41,13 @@ "build-ppp": { "dependsOn": ["^build"], "outputs": ["bundle-platform/**"] + }, + "docs:test_interactors": { + "outputs": ["docs/widgets-api/**"] + }, + "docs:test_interactors:serve": { + "cache": false, + "persistent": true } } } diff --git a/yarn.lock b/yarn.lock index 58bc924e4..84d14cdb0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -690,6 +690,13 @@ resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.2.4.tgz#c8e21413120fe073fa49b78fdd987022941ff66f" integrity sha512-3Y4V4zVRarVh/B/eSHczR4LYoSVyv3Dfuvm3cWs5w/HScccS0+Wt/lHOcDTRYeHjQmMYVC3rIRWqyN2EI52+zg== +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + "@ebi-gene-expression-group/anatomogram@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@ebi-gene-expression-group/anatomogram/-/anatomogram-2.4.0.tgz#1bf29826fc5639e5873c7fe1919059dfcec93f46" @@ -1102,6 +1109,17 @@ dependencies: prop-types "^15.8.1" +"@gerrit0/mini-shiki@^3.17.0": + version "3.22.0" + resolved "https://registry.yarnpkg.com/@gerrit0/mini-shiki/-/mini-shiki-3.22.0.tgz#017179c8ebebd572321e734feb0de143d21c8bfc" + integrity sha512-jMpciqEVUBKE1QwU64S4saNMzpsSza6diNCk4MWAeCxO2+LFi2FIFmL2S0VDLzEJCxuvCbU783xi8Hp/gkM5CQ== + dependencies: + "@shikijs/engine-oniguruma" "^3.22.0" + "@shikijs/langs" "^3.22.0" + "@shikijs/themes" "^3.22.0" + "@shikijs/types" "^3.22.0" + "@shikijs/vscode-textmate" "^10.0.2" + "@graphiql/react@^0.10.0": version "0.10.0" resolved "https://registry.yarnpkg.com/@graphiql/react/-/react-0.10.0.tgz#8d888949dc6c9ddebe0817aeba3e2c164bfbb1bb" @@ -2010,16 +2028,24 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@jridgewell/resolve-uri@^3.1.0": +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== -"@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0": version "1.5.5" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.28": version "0.3.31" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" @@ -2421,6 +2447,41 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.3.tgz#38ae84f4c04226c1d56a3b17296ef1e0460ecdfe" integrity sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ== +"@shikijs/engine-oniguruma@^3.22.0": + version "3.22.0" + resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-3.22.0.tgz#d16b66ed18470bc99f5026ec9f635695a10cb7f5" + integrity sha512-DyXsOG0vGtNtl7ygvabHd7Mt5EY8gCNqR9Y7Lpbbd/PbJvgWrqaKzH1JW6H6qFkuUa8aCxoiYVv8/YfFljiQxA== + dependencies: + "@shikijs/types" "3.22.0" + "@shikijs/vscode-textmate" "^10.0.2" + +"@shikijs/langs@^3.22.0": + version "3.22.0" + resolved "https://registry.yarnpkg.com/@shikijs/langs/-/langs-3.22.0.tgz#949338647714b89314efbd333070b0c0263b232a" + integrity sha512-x/42TfhWmp6H00T6uwVrdTJGKgNdFbrEdhaDwSR5fd5zhQ1Q46bHq9EO61SCEWJR0HY7z2HNDMaBZp8JRmKiIA== + dependencies: + "@shikijs/types" "3.22.0" + +"@shikijs/themes@^3.22.0": + version "3.22.0" + resolved "https://registry.yarnpkg.com/@shikijs/themes/-/themes-3.22.0.tgz#0a316f0b1bda2dea378dd0c9d7e0a703f36af2c3" + integrity sha512-o+tlOKqsr6FE4+mYJG08tfCFDS+3CG20HbldXeVoyP+cYSUxDhrFf3GPjE60U55iOkkjbpY2uC3It/eeja35/g== + dependencies: + "@shikijs/types" "3.22.0" + +"@shikijs/types@3.22.0", "@shikijs/types@^3.22.0": + version "3.22.0" + resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-3.22.0.tgz#43fe92d163742424e794894cb27ce6ce1b4ca8a8" + integrity sha512-491iAekgKDBFE67z70Ok5a8KBMsQ2IJwOWw3us/7ffQkIBCyOQfm/aNwVMBUriP02QshIfgHCBSIYAl3u2eWjg== + dependencies: + "@shikijs/vscode-textmate" "^10.0.2" + "@types/hast" "^3.0.4" + +"@shikijs/vscode-textmate@^10.0.2": + version "10.0.2" + resolved "https://registry.yarnpkg.com/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz#a90ab31d0cc1dfb54c66a69e515bf624fa7b2224" + integrity sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg== + "@sideway/address@^4.1.5": version "4.1.5" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.5.tgz#4bc149a0076623ced99ca8208ba780d65a99b9d5" @@ -2555,6 +2616,26 @@ json5 "^2.2.3" lodash.sortby "^4.7.0" +"@tsconfig/node10@^1.0.7": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.12.tgz#be57ceac1e4692b41be9de6be8c32a106636dba4" + integrity sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + "@types/babel__core@^7.20.5": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" @@ -2808,6 +2889,13 @@ resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.16.tgz#8ebe53d69efada7044454e3305c19017d97ced2a" integrity sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg== +"@types/hast@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa" + integrity sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ== + dependencies: + "@types/unist" "*" + "@types/history@^4.7.11": version "4.7.11" resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.11.tgz#56588b17ae8f50c53983a524fc3cc47437969d64" @@ -2834,6 +2922,13 @@ dependencies: undici-types "~6.21.0" +"@types/node@^25.2.0": + version "25.2.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-25.2.0.tgz#015b7d228470c1dcbfc17fe9c63039d216b4d782" + integrity sha512-DZ8VwRFUNzuqJ5khrvwMXHmvPe+zGayJhr2CDNiKB1WBE1ST8Djl00D0IC4vvNmHMdj6DlbYRIaFE7WHjlDl5w== + dependencies: + undici-types "~7.16.0" + "@types/papaparse@^5.5.2": version "5.5.2" resolved "https://registry.yarnpkg.com/@types/papaparse/-/papaparse-5.5.2.tgz#cb450a1cd183deb43728e593eb1ac2da60f4fa4d" @@ -2907,6 +3002,11 @@ "@types/prop-types" "*" csstype "^3.2.2" +"@types/unist@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c" + integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== + "@types/uuid@^9.0.1": version "9.0.8" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.8.tgz#7545ba4fc3c003d6c756f651f3bf163d8f0f29ba" @@ -3004,6 +3104,18 @@ dependencies: tslib "^2.3.0" +acorn-walk@^8.1.1: + version "8.3.4" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== + dependencies: + acorn "^8.11.0" + +acorn@^8.11.0, acorn@^8.4.1: + version "8.15.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" + integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== + add-dom-event-listener@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/add-dom-event-listener/-/add-dom-event-listener-1.1.0.tgz#6a92db3a0dd0abc254e095c0f1dc14acbbaae310" @@ -3062,6 +3174,11 @@ apollo-utilities@^1.3.4: ts-invariant "^0.4.0" tslib "^1.10.0" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + arg@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" @@ -3619,6 +3736,11 @@ crc-32@~1.2.0, crc-32@~1.2.1: resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-fetch@^3.1.4, cross-fetch@^3.1.5: version "3.2.0" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.2.0.tgz#34e9192f53bc757d6614304d9e5e6fb4edb782e3" @@ -4267,6 +4389,11 @@ detect-libc@^1.0.3: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== +diff@^4.0.1: + version "4.0.4" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.4.tgz#7a6dbfda325f25f07517e9b518f897c08332e07d" + integrity sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -5470,6 +5597,13 @@ linkify-it@^3.0.1: dependencies: uc.micro "^1.0.1" +linkify-it@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-5.0.0.tgz#9ef238bfa6dc70bd8e7f9572b52d369af569b421" + integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ== + dependencies: + uc.micro "^2.0.0" + lint-staged@^14.0.1: version "14.0.1" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-14.0.1.tgz#57dfa3013a3d60762d9af5d9c83bdb51291a6232" @@ -5600,6 +5734,16 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +lunr@^2.3.9: + version "2.3.9" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + map-cache@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -5621,6 +5765,18 @@ markdown-it@^12.2.0: mdurl "^1.0.1" uc.micro "^1.0.5" +markdown-it@^14.1.0: + version "14.1.0" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-14.1.0.tgz#3c3c5992883c633db4714ccb4d7b5935d98b7d45" + integrity sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== + dependencies: + argparse "^2.0.1" + entities "^4.4.0" + linkify-it "^5.0.0" + mdurl "^2.0.0" + punycode.js "^2.3.1" + uc.micro "^2.1.0" + math-intrinsics@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" @@ -5631,6 +5787,11 @@ mdurl@^1.0.1: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== +mdurl@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0" + integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== + memoize-one@^5.0.0: version "5.2.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" @@ -6165,6 +6326,11 @@ ps-tree@1.2.0: dependencies: event-stream "=3.3.4" +punycode.js@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" + integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== + quadprog@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/quadprog/-/quadprog-1.6.1.tgz#1cd3b13700de9553ef939a6fa73d0d55ddb2f082" @@ -7152,6 +7318,25 @@ ts-log@^2.2.3: resolved "https://registry.yarnpkg.com/ts-log/-/ts-log-2.2.7.tgz#4f4512144898b77c9984e91587076fcb8518688e" integrity sha512-320x5Ggei84AxzlXp91QkIGSw5wgaLT6GeAH0KsqDmRZdVWW2OiSeVvElVoatk3f7nicwXlElXsoFkARiGE2yg== +ts-node@^10.9.2: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + tslib@^1.10.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -7565,6 +7750,17 @@ type-fest@^1.0.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== +typedoc@^0.28.16: + version "0.28.16" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.28.16.tgz#3901672c48746587fa24390077d07317a1fd180f" + integrity sha512-x4xW77QC3i5DUFMBp0qjukOTnr/sSg+oEs86nB3LjDslvAmwe/PUGDWbe3GrIqt59oTqoXK5GRK9tAa0sYMiog== + dependencies: + "@gerrit0/mini-shiki" "^3.17.0" + lunr "^2.3.9" + markdown-it "^14.1.0" + minimatch "^9.0.5" + yaml "^2.8.1" + typeface-inter@^3.3.0: version "3.18.1" resolved "https://registry.yarnpkg.com/typeface-inter/-/typeface-inter-3.18.1.tgz#24cccdf29923f318589783997be20a662cd3ab9c" @@ -7575,7 +7771,7 @@ typeface-roboto-mono@^1.1.13: resolved "https://registry.yarnpkg.com/typeface-roboto-mono/-/typeface-roboto-mono-1.1.13.tgz#2af8662db8f9119c00efd55d6ed8877d2a69ec94" integrity sha512-pnzDc70b7ywJHin/BUFL7HZX8DyOTBLT2qxlJ92eH1UJOFcENIBXa9IZrxsJX/gEKjbEDKhW5vz/TKRBNk/ufQ== -typescript@^5.0.0, typescript@^5.2.2: +typescript@^5.0.0, typescript@^5.2.2, typescript@^5.9.3: version "5.9.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== @@ -7595,6 +7791,11 @@ uc.micro@^1.0.1, uc.micro@^1.0.5: resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== +uc.micro@^2.0.0, uc.micro@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" + integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== + unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -7681,6 +7882,11 @@ uuid@^9.0.0, uuid@^9.0.1: resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + vite-plugin-compression@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/vite-plugin-compression/-/vite-plugin-compression-0.5.1.tgz#a75b0d8f48357ebb377b65016da9f20885ef39b6" @@ -7881,7 +8087,7 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yaml@^2.3.1: +yaml@^2.3.1, yaml@^2.8.1: version "2.8.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.2.tgz#5694f25eca0ce9c3e7a9d9e00ce0ddabbd9e35c5" integrity sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A== @@ -7947,6 +8153,11 @@ yargs@^17.0.0, yargs@^17.5.1: y18n "^5.0.5" yargs-parser "^21.1.1" +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"