Skip to content

project create/update: configurable test-id attribute priority list (--test-id-attributes) #339

Description

@ruili-testsprite

Problem

Customers who tag their UI with their own DOM attribute (e.g. Akkio: data-element on ~1,700 elements) get exported test code that ignores those tags — locators fall back to text/role chains or absolute xpath, which do not survive reruns. The execution engine can now prefer a configured attribute list (automation-layer PR #154, backend PR TestSprite/backend-v2.0#1153), but there is no way to set it from the CLI.

Proposal

Project-level, ordered attribute list on project create / project update:

testsprite project update <id> --test-id-attributes data-element,data-testid
testsprite project update <id> --clear-test-id-attributes

Wire: testIdAttributes: string[] (null clears) on POST/PATCH /api/cli/v1/projects; project get renders it when reported. Mirrors the --step-timeout precedent. V3-native projects only (mirrored projects answer PRECONDITION_FAILED test_id_attributes_native_only).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions