Skip to content

Commit

Permalink
Release v0.6.0 changes (#58)
Browse files Browse the repository at this point in the history
* #52: Add search capability to the Terra Wdio tool window

* Fix a NPE related to toggling statistics.

* #53: add support for terra-functional-testing in the currently available feature set

* Fix disposal logic of the root and spec node

* #53: Update Terra wdio quick documentation provider to retrieve values from a dedicated bundle, and added links to terra-functional-testing documentation

* #53: Add inspection to validate various Terra helper properties. Define sections in TerraBundle for better readablity. Move methods from TerraWdioInspectionBase to TerraWdioPsiUtil.

* Improve Terra Functional Testing specific screenshot name resolution and add unit test for error handling of collecting screenshots

* #44, #53: Add inspection to convert Terra.it helpers to Terra.validates forms. Replace some information in the readme with custom badges.

* #53: Create inspections to validate the presence of screenshot names and the absence of duplicate screenshot names. Implement NoopResourceManager for projects not using any of the Terra libraries.Remove some commented out code.
  • Loading branch information
Tamás Balog authored Jul 24, 2021
1 parent c5cb51b commit af0d1aa
Show file tree
Hide file tree
Showing 206 changed files with 5,108 additions and 1,553 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

### 0.6.0

#### ADDED SUPPORT FOR TERRA-FUNCTIONAL-TESTING
[#53](https://github.com/picimako/terra-support/issues/53): Added support for the new terra-functional-testing npm package that brings
a couple of changes to how Terra wdio testing is conducted.

Whether terra-functional-testing or terra-toolkit is used is determined by whether `@cerner/terra-functional-testing` or `terra-toolkit`
is included in the dependencies of the project's root package.json. If none of them is found, plugin features will not execute.

Areas of changes:
- Updated the screenshot name resolution logic to use only the name argument of `Terra.validates` calls. This affected references, inlay hints,
navigation to screenshot usage actions and inspections. See [Terra Upgrade Guide/Screenshots](https://engineering.cerner.com/terra-ui/dev_tools/cerner/terra-functional-testing/upgrade-guides/version-1-upgrade-guide#screenshots).
- Updated screenshot context string resolution to include the theme in the context string. This affects the reference suggestions and the Diff and Reference/Latest previews.
- Unused screenshot seeking logic is updated as well.
- Screenshot gutter icons no longer suggest screenshots when the name argument of a `Terra.validates` call is missing,
since it is not a valid usage in terra-functional-testing.
- Inspections validating mismatch tolerance are updated to handle the renamed `mismatchTolerance` property along with `misMatchTolerance`.
- Various actions are updated to handle the new theme-specific folder structure.
- Added an inspection to report when the name parameter of a screenshot validation is missing.
- Added an inspection to report when more than one screenshot validation has the same name parameter, since these names must be unique.

#### BUGFIX
- Fixed the disposal logic of the Terra wdio tree nodes.

### 0.5.1

#### BUGFIX
Expand Down
38 changes: 10 additions & 28 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,32 @@ If you would like to contribute, first make sure to check out the document about

## Table of contents

- [Git branching](#git-branching)
- [How to add new File Templates](#how-to-add-new-file-templates)
- [Implementing inspections](#implementing-inspections)
- [Blocking vs. non-blocking inspection types](#blocking-vs-non-blocking-inspection-types)
- [Steps to implement an inspection](#steps-to-implement-an-inspection)
- [Unit testing](#unit-testing)
- [Helper code snippets](#helper-code-snippets)

## Git branching

When you start working on a separate Git branch, please make sure the branch is named according to its purpose as follows:

<branch_type>/#<issue_number>-<branch_name>

where branch_type may be `feature`, `bugfix` or `doc`, e.g. **feature/#23-add-new-inspection**.

Commit messages doesn't have to contain the issue numbers.

## How to add new File Templates

In order to add File Template under *Settings > Editor > File and Code Template > Files tab*, place your template file under `src/main/resources/fileTemplates`.

The file must be named as follows: `<template name>.<file extension of created file>.ft`, for example for a JavaScript file it could be `Jest test file.js.ft`.

## Implementing inspections

### Blocking vs. non-blocking inspection types

Inspections are structured and implemented in a way to have as less duplication and duplicated code execution as possible.
Inspections are structured and implemented in a way to have as few duplication as possible.

Since severity can only be assigned on a per inspection/implementation class basis (or extension point basis, depending on the viewpoint), inspection implementations are
separated into **blocking** and **non-blocking** types. (The naming is kind of arbitrary but reflects its purpose. Also, this separation is not a JetBrains standard but is introduced
here for better performance and maintenance.
Since severity can only be assigned on an inspection-class (or extension point) basis, inspection implementations are
separated into **blocking** and **non-blocking** types. (The naming is kind of arbitrary but reflects its purpose. This distinction is not a JetBrains standard but is introduced
here for better performance and maintenance.)

**Blocking** inspections are registered with `ERROR` severity level in the `plugin.xml`, and each problem registered in the `ProblemsHolder` within the implementation
**Blocking** inspections are registered with `ERROR` severity level in the `plugin.xml`, and each problem registered in the `ProblemsHolder`
is considered a problem that would either cause the test execution not to start, or to fail because in insufficient value was provided that is not considered a valid input.

These classes have their names extended with the word `Blocking`, see e.g. `TerraDescribeViewportsBlockingInspection`.
These classes have their names postfixed with `Blocking`, e.g. `TerraDescribeViewportsBlockingInspection`.

**Non-blocking** inspections are registered with `WARNING` severity level (or even lower) in the `plugin.xml`, and each problem registered in the `ProblemsHolder` within the implementation
is considered a problem that would not cause the test execution not to start, or to fail, rather values or construct that would have unintended consequences of the test execution, or might
mislead users.
**Non-blocking** inspections are registered with `WARNING` (or lower) severity level. Each problem registered in the `ProblemsHolder`
is considered a problem that would not cause the test execution not to start, or to fail, rather values or constructs that are not optimal, would have unintended consequences of the test execution,
or might mislead users.

These classes don't have `Blocking` in their names, see e.g. `TerraDescribeViewportsInspection`.
These classes don't have `Blocking` in their names, e.g. `TerraDescribeViewportsInspection`.

### Steps to implement an inspection

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ for working with Terra screenshots.
### Inlay Hints

Inlay Hints are small labels injected into the code, that provide extra (often otherwise invisible) information about the code.
The [current Inlay Hints](docs/terra_screenshots.md#inlay-hints) for Terra include displaying screenshot names and global Terra CSS selectors.
The [current Inlay Hints](docs/terra_helpers.md#inlay-hints) for Terra include displaying screenshot names and global Terra CSS selectors.

## Terra features and settings

You can navigate to further documentation categorized mostly by Terra features.

- [Terra Screenshots](docs/terra_screenshots.md)
- [Terra Helpers](docs/terra_helpers.md)
- [Terra Viewports](docs/terra_viewports.md)
- [Terra UI and components](docs/terra_ui.md)
- [Terra Wdio Tool Window](docs/terra_wdio_tool_window.md)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/replate_terra_it_quick_fix_simple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 3 additions & 5 deletions changelog.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<h4>0.5.1</h4>
<h4>0.6.0</h4>

<b>Bugfix</b>
<b>Terra-functional-testing support</b>
<ul>
<li>Fixed an issue with the diff and latest/reference previews due to API changes in IJ 2021.1. It caused the IDE
to become unresponsive after opening either of these previews, due to a null value under the hood.</li>
<li>Added support for the new terra-functional-testing npm package that is aimed to replace terra-toolkit in the long run.<br>For the detailed list of changes, see the full <a href="https://github.com/picimako/terra-support/blob/master/CHANGELOG.md#060">Changelog</a> on GitHub.</li>
</ul>

Loading

0 comments on commit af0d1aa

Please sign in to comment.