Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#2384 added test script in meta data source on new UI #2737

Conversation

Limraj
Copy link
Collaborator

@Limraj Limraj commented Oct 25, 2023

No description provided.

Patrykb0802 and others added 23 commits July 20, 2023 15:59
In point.vue:
- Added validateScript() method
- Added 'Run script' button to  Meta Data Point editing
- Added alert that shows result of working script
- Modified script textarea to run validateScript method
- Added new rule that is checking if script is correct

- Added script.runScript translation key to en.json
- Added correct error message when creating new data point and script field is empty

- Added delayed validation, so requests for validation are not send every letter typed

- Added handling of error when field for script is empty and you press "run script", now when field is empty and you press "run script" nothing happens

- Deleted duplicated property key dox.newUISettings
- Added validation in validateScript() method for empty text area of script

- Added script validation when focusing out of the script text area

- Added script validation when changing data point type so there is no possibility of saving with incorrect script
corrected en.json
- Added validation after adding context datapoint for script

- Added validation after editing text fields like data point name, datapoint export ID and description
- Moved error messages to alert component

- Added valdiation on removing context datapoint
- Removed validation on focus out for textareas: Data point name, export ID, description
- Added rules validation on load for data point creation form
@Limraj Limraj added this to the 2.7.7 milestone Oct 25, 2023
@github-actions
Copy link

Java Script Mocha Unit Test Results

268 tests   268 ✔️  5s ⏱️
  70 suites      0 💤
    1 files        0

Results for commit ee7c8c3.

@github-actions
Copy link

Java JUnit Test Results

2 302 tests   2 302 ✔️  48s ⏱️
     97 suites         0 💤
     97 files           0

Results for commit ee7c8c3.

Copy link
Collaborator Author

@Limraj Limraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sum up:

Problem 1

Click on 'Create new data point' for Meta Data Source;
Created Data Point with script "return 1;" as dp_1;
Refresh page and edit dp_1;
Added disabled Data Point to Script Context -> This does not trigger validation;
Expected behavior:
Also, a change in the context of the script should validate the script.

Problem 2

Click on 'Create new data point' for Meta Data Source;
Created Data Point with script "return 1;" as dp_1;
Refresh page, and edit Data Point dp_1;
Click on 'Run script' and add disabled Data Point to context, and click update -> Successfully updated script failing validation, as you can see by clicking in the Script field and then outside this field;

Problem 3

Click on 'Create new data point' for Meta Data Source;
Created Data Point with script "return 1;" as dp_1;
Refresh page, and edit Data Point dp_1;
Click on 'Run script' and add disabled Data Point to context, and click update;
Refresh page and edit dp_1;
Click on 'Run script' -> no message with the result of the script

Problem 4

Click on 'Create new data point' for Meta Data Source;
Created Data Point with script "return 1;" as dp_1;
Refresh page, and edit Data Point dp_1 -> The update button is not active, we change the description and it is still greyed out;
Expected behavior:
After changing fields such as description, or other field, the update button should be active;

Problem 5

Click on 'Create new data point' for Meta Data Source;
Created Data Point with script "return 1;" as dp_1;
Refresh page, and edit Data Point dp_1 -> The update button is not active, is greyed -> error
Expected behavior:
As in other forms, the update button should be available after opening the point edit form

Problem 6

Click on 'Create new data point' for Meta Data Source;
Created Data Point with script "return 1;" as dp_1;
Click on 'Cancel' -> The form window does not close and validates the script;
Expected behavior:
Clicking the cancel button should reset the form values ​​and close the form window.

Problem 7

Click on 'Create new data point' for Meta Data Source;
Created Data Points with script "return 1;" as dp_1, and script "return 2;" as dp_2, disabled;
Refresh page, and edit Data Point dp_1;
Added disabled dp_2 to context -> validation stop, inactive update button -> ok
Click on 'Cancel' and edit -> You can update a Meta Data Point even though the context is disabled -> error

Problem 8

Click on 'Create new data point' for Meta Data Source;
Created Data Points with script "return 1;" as dp_1, and script "return 2;" as dp_2, disabled;
Refresh page, and edit Data Point dp_1;
Change script on "return p1.value;" and click active update button -> error
Expected behavior:
After clicking update/create before the request, it has to perform additional validation.

All listed problems have been fixed.

@Limraj Limraj merged commit 824fc37 into release/2.7.7 Oct 25, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants