Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
1d27611
upload artificats if test fails in CI
daviddamilola Dec 16, 2025
2e7af0e
Merge branch 'do-platform-e2e-disease-evidences-tests' into do-platfo…
daviddamilola Dec 16, 2025
0689684
bug(e2e-artifact):adjust path relative to actions context
daviddamilola Dec 16, 2025
d581c9b
Merge branch 'do-platform-e2e-test-artifacts' of https://github.com/o…
daviddamilola Dec 16, 2025
308b985
chore(artifact-e2e): increase timeout to test artifact upload
daviddamilola Dec 16, 2025
78ab88f
merge fix for tests
daviddamilola Dec 16, 2025
d747669
feat(e2e-study): add interactors and tests for study pages
daviddamilola Dec 18, 2025
d10217e
chore(e2e-study): refactor profile header interactors
daviddamilola Dec 18, 2025
7dede27
feat(e2e-variant-page): variant page interactors and base tests for t…
daviddamilola Jan 1, 2026
71ed64f
feat(e2e-variant-page): add tests for other variant widget
daviddamilola Jan 1, 2026
cea91a2
feat(e2e-drug-page): create interactors and tests for drug page
daviddamilola Jan 2, 2026
620e464
feat(e2e-fixtures): use fixtures to manage test data
daviddamilola Jan 5, 2026
8565ba4
feat(e2e-annotation): annotate smoke test to reduce CI time
daviddamilola Jan 5, 2026
e1c2ea6
Merge branch 'do-platform-e2e-disease-evidences-tests' into do-platfo…
daviddamilola Jan 6, 2026
674e05b
Merge branch 'do-platform-e2e-test-artifacts' into do-platform-e2e-st…
daviddamilola Jan 6, 2026
d9d2317
Merge branch 'do-platform-e2e-study-page' into do-platform-e2e-varian…
daviddamilola Jan 6, 2026
261a5e5
chore(biome): lint fixes
daviddamilola Jan 6, 2026
215486e
Merge branch 'do-platform-e2e-study-page' into do-platform-e2e-varian…
daviddamilola Jan 6, 2026
de54693
chore(biome): lint fixes
daviddamilola Jan 6, 2026
d357ded
chore(biome): lint fixes
daviddamilola Jan 6, 2026
225d7fc
chore(biome): lint fixes
daviddamilola Jan 6, 2026
0a9a63c
chore(biome): lint fixes
daviddamilola Jan 6, 2026
71a75d6
Merge branch 'do-platform-e2e-study-page' into do-platform-e2e-varian…
daviddamilola Jan 6, 2026
6a89751
Merge branch 'do-platform-e2e-variant-page' into do-platform-e2e-vari…
daviddamilola Jan 6, 2026
f965d6d
chore(biome): lint fixes
daviddamilola Jan 6, 2026
b07f34c
chore(biome): lint fixes
daviddamilola Jan 6, 2026
14e2033
chore(biome): lint fixes
daviddamilola Jan 6, 2026
854c3d2
chore(biome): fix linting errors
daviddamilola Jan 6, 2026
a4459d6
chore(test): fix playwright dep error
daviddamilola Jan 6, 2026
217adce
chore(e2e-annotation): remove duplicate and unused methods
daviddamilola Jan 8, 2026
3e8d236
feat(e2e): add tests and interactors for target page
daviddamilola Jan 13, 2026
107105d
chore(linting): fix lint errors and warnings
daviddamilola Jan 14, 2026
47774f3
feat(tests): add ability to configure scenarios from action
daviddamilola Jan 22, 2026
da4929c
feat(tests): formatting
daviddamilola Jan 22, 2026
6081ac7
feat(tests): add base url input
daviddamilola Jan 22, 2026
cbfc4a1
feat(tests): configure actions
daviddamilola Jan 23, 2026
91c6d59
chore(test-config): refactor test config
daviddamilola Jan 26, 2026
5d80424
feat(crediblesets):add interactors for credible set and missing study…
daviddamilola Jan 27, 2026
a88a350
chore(tests):resovle conflicts
daviddamilola Jan 30, 2026
5180dea
feature(crediblesets): add tests and interactors for credible sets
daviddamilola Jan 30, 2026
e2df725
chore(linting): fix linting
daviddamilola Jan 30, 2026
3c4bd80
chore(tests): resolve conflicts
daviddamilola Jan 30, 2026
3b7589b
feat(docs): add docs generation for interactors
daviddamilola Feb 3, 2026
bcbf223
chore(docs):lint fixes
daviddamilola Feb 18, 2026
cb8fd32
[Platform-test]: Test Interactors documentation deployment (#896)
daviddamilola Feb 18, 2026
86607ee
Revert "[Platform-test]: Test Interactors documentation deployment (#…
daviddamilola Feb 18, 2026
685308d
Merge pull request #904 from opentargets/revert-896-do-test-docs-depl…
daviddamilola Feb 18, 2026
c8f914e
[Platform-Test]: Harden csv column parsing against column name change…
daviddamilola Mar 5, 2026
124318c
Delete packages/platform-test/playwright-report/index.html
daviddamilola Mar 5, 2026
20a46fa
resolve conflicts
daviddamilola Mar 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 13 additions & 0 deletions packages/platform-test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated documentation
docs/widgets-api/

# Test results
test-results/
playwright-report/

# Node
node_modules/

# Environment
.env
.env.local
20 changes: 20 additions & 0 deletions packages/platform-test/POM/objects/widgets/AOTF/aotfActions.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
18 changes: 18 additions & 0 deletions packages/platform-test/POM/objects/widgets/AOTF/aotfTable.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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<boolean> {
return await this.getSection()
.isVisible()
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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<boolean> {
return await this.getSection()
.isVisible()
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {}
Expand Down
Loading