jdi-testing / jdn-ai

JDN – is the Chrome plugin for UI test automation. It helps Software Test Automation Engineer to create Page Objects for the test automation framework and start test development fast
MIT License
9 stars 3 forks source link

[US-15-4] Give the user the ability to specify an attribute that shouldn't be used for locators generation (Black / Ignore list) #191

Open AlexeyGirin opened 2 years ago

AlexeyGirin commented 2 years ago

It makes sense to complete #950 beforehand

Give user a possibility to specify attributes which shouldn't be used for locators generation

As a user AND some additional attributes are used in my project, which data has no meaning or is useless in locators generation I want to not generate code on it So that allows me to get the correct code

DESCRIPTION: User starts the locators generation and they see that in one of the locators undesired attribute is used. It is required to give user ability to exclude this attribute from locators generation so after locators recalculation new locators wouldn't contain that undesired attribute.

DEPENDENCIES:

950 - Filter refactoring

1285 - data-attributes

1359 - data-ved

ACCEPTANCE CRITERIA

DESIGN: figma

image


image image


Additionally, we can separately open the filter and manually specify the attributes that should not be used. Validation:

  1. Only Latin characters
  2. Convert to lower case automatically
  3. No spaces; when entering text into the input, if Enter or Spacebar is pressed, the entered text is saved as a tag and input continues.
  4. If text is entered into the input and ClickOut is performed, the entered text is also saved as a tag.

image

COMMENTS: Changes will be needed on both the front-end and back-end. Currently, the list of attributes is not being transmitted. Because of this, Robula considers all possible combinations.

  1. Global settings
  2. Settings during creation
  3. Filter
  4. From the locators panel or coverage, select a locator and indicate that this locator is not suitable

The fourth option was chosen (the third is also possible), as attribute settings should be made when working with locators, i.e., within an open PO.

Changing an attribute is not a modification, but rather an edit, similar to changing the locator type or switching from xpath to css.

List of attributes: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes


@AlexeyGirin deletion of an attribute from filters will require recalculation of all locators

AlexeyGirin commented 2 years ago

It is required to resolve this together with #584 (design should be consistent)

SemyonKuznetsov commented 1 year ago

old design

image

image

Iogsotot commented 2 months ago

updates for WebSokets: ignored_attributes: string [] Image

AlexeyGirin commented 2 months ago

Backend part is done