|
| 1 | +# intellij-update-notification Specification |
| 2 | + |
| 3 | +## Purpose |
| 4 | + |
| 5 | +Defines when the IntelliJ plugin tells the user that RobotCode was updated and offers to show what's new, and how the user opens the news at any time, so that users of PyCharm and IntelliJ IDEA learn about new releases as VS Code users do, without being interrupted by every dev build. |
| 6 | + |
| 7 | +## Requirements |
| 8 | + |
| 9 | +### Requirement: The plugin announces a new release version |
| 10 | + |
| 11 | +When a project becomes a Robot Framework project, because it contains Robot Framework files or a `robot.toml` or because one is opened, and the plugin runs a release version other than the one it noted last, also when it noted none yet, the plugin SHALL note the version and show a notification that names it, unless "Show whats new on update" is off. The notification's action "What's New?" SHALL open the news about the latest release in the IDE's web browser. |
| 12 | + |
| 13 | +#### Scenario: Update to a release |
| 14 | + |
| 15 | +- **WHEN** the IDE updated RobotCode from 2.7.0 to 2.8.0, and a project with Robot Framework files opens |
| 16 | +- **THEN** a notification says that RobotCode has been updated to v2.8.0, and its action "What's New?" opens `https://robotcode.io/news/latest/` in the web browser |
| 17 | + |
| 18 | +#### Scenario: First start after the installation |
| 19 | + |
| 20 | +- **WHEN** RobotCode 2.8.0 was installed in an IDE that never ran RobotCode, and a project with Robot Framework files opens |
| 21 | +- **THEN** the notification for v2.8.0 appears |
| 22 | + |
| 23 | +#### Scenario: Project without Robot Framework files |
| 24 | + |
| 25 | +- **WHEN** the IDE updated RobotCode to 2.8.0, and a project without Robot Framework files and without a `robot.toml` opens |
| 26 | +- **THEN** no notification appears, and the notification for v2.8.0 appears in the next project that becomes a Robot Framework project |
| 27 | + |
| 28 | +#### Scenario: Notification switched off |
| 29 | + |
| 30 | +- **WHEN** "Show whats new on update" is off, the IDE updated RobotCode to 2.8.0, a project with Robot Framework files opens, and the user turns the setting on afterwards |
| 31 | +- **THEN** no notification for v2.8.0 appears |
| 32 | + |
| 33 | +### Requirement: One notification per version |
| 34 | + |
| 35 | +The plugin SHALL show the notification for a version at most once per IDE installation, whatever the number of open projects, and SHALL note the version for the IDE installation, not for a project. |
| 36 | + |
| 37 | +#### Scenario: Several projects |
| 38 | + |
| 39 | +- **WHEN** the IDE updated RobotCode to 2.8.0 and opens two projects with Robot Framework files |
| 40 | +- **THEN** exactly one notification for v2.8.0 appears |
| 41 | + |
| 42 | +#### Scenario: Restart after the notification |
| 43 | + |
| 44 | +- **WHEN** the notification for v2.8.0 appeared, and the IDE restarts with the same projects |
| 45 | +- **THEN** no notification appears |
| 46 | + |
| 47 | +### Requirement: Dev builds aren't announced |
| 48 | + |
| 49 | +When the plugin runs a dev build, a version with a pre-release part such as `2.8.0-dev.508`, it SHALL NOT show the notification. It SHALL still note that version as the one it noted last. |
| 50 | + |
| 51 | +#### Scenario: Update between dev builds |
| 52 | + |
| 53 | +- **WHEN** the IDE updated RobotCode from 2.8.0-dev.483 to 2.8.0-dev.508, and a project with Robot Framework files opens |
| 54 | +- **THEN** no notification appears |
| 55 | + |
| 56 | +#### Scenario: Update from a release to a dev build |
| 57 | + |
| 58 | +- **WHEN** the IDE updated RobotCode from 2.7.0 to 2.8.0-dev.508, and a project with Robot Framework files opens |
| 59 | +- **THEN** no notification appears |
| 60 | + |
| 61 | +#### Scenario: Update from a dev build to a release |
| 62 | + |
| 63 | +- **WHEN** the IDE updated RobotCode from 2.8.0-dev.508 to 2.8.0, and a project with Robot Framework files opens |
| 64 | +- **THEN** the notification for v2.8.0 appears |
| 65 | + |
| 66 | +### Requirement: Show What's New action |
| 67 | + |
| 68 | +The menu Tools | RobotCode and the menu of the RobotCode status bar widget SHALL offer the action "Show What's New", which opens the news about the latest release in the IDE's web browser, as the notification's action does. The action SHALL be available in every project, also while RobotCode is switched off for it. |
| 69 | + |
| 70 | +#### Scenario: Action in the Tools menu |
| 71 | + |
| 72 | +- **WHEN** the user chooses Tools | RobotCode | Show What's New |
| 73 | +- **THEN** the web browser opens `https://robotcode.io/news/latest/` |
| 74 | + |
| 75 | +#### Scenario: Action in the status bar widget's menu |
| 76 | + |
| 77 | +- **WHEN** the user opens the menu of the RobotCode status bar widget |
| 78 | +- **THEN** it offers "Show What's New" |
| 79 | + |
| 80 | +#### Scenario: RobotCode switched off |
| 81 | + |
| 82 | +- **WHEN** "Disable extension" is on for the project, and the user chooses Tools | RobotCode | Show What's New |
| 83 | +- **THEN** the web browser opens `https://robotcode.io/news/latest/` |
0 commit comments