#153 | Widget automated tests fixed and refactored#226
#153 | Widget automated tests fixed and refactored#226szymon-owczarzak merged 9 commits intomasterfrom
Conversation
|
|
||
| export function fillDynamicTab(type = 'Text', version = '') { | ||
| const name = `${type}${version}`; | ||
| if (name !== 'White Space' && name !== 'Checkbox') { |
There was a problem hiding this comment.
Lets get rid of this if so we don't need to change this in future
| @@ -0,0 +1,79 @@ | |||
| import { fillDynamicTab } from './widgetDynamicTab' | |||
|
|
|||
| class Widget { | |||
There was a problem hiding this comment.
Encapsulates widget configuration, and widget related assertions.
There was a problem hiding this comment.
maybe it is worth mention about it in readme.
There was a problem hiding this comment.
Yes that is true and i will, but after i finish refactoring - this is just a part of refactor not the final structure.
I want to unblock all hanging PR for now.
| const name = Widgets[widget].name; | ||
| const title = `Test-${name}`; | ||
| let version = ''; | ||
| if (name == 'SonarQube') { |
There was a problem hiding this comment.
Lets get rid of this if and make tests less spagetized
| name: 'AEM Healthcheck', | ||
| endpoint: 'endpoint1', | ||
| schedulePeriod: '500', | ||
| schedulePeriod: '3', |
There was a problem hiding this comment.
does it mean widget is refreshed each 3 millisecond during the test?
There was a problem hiding this comment.
every 3 seconds until it is deleted
There was a problem hiding this comment.
Are you sure it is 3 seconds? Does it mean it was set to 500 seconds previously?
There was a problem hiding this comment.
Yes I'm sure.
| @@ -0,0 +1,79 @@ | |||
| import { fillDynamicTab } from './widgetDynamicTab' | |||
|
|
|||
| class Widget { | |||
There was a problem hiding this comment.
maybe it is worth mention about it in readme.
Trying to fix this annoying bug that causes our tests to fail randomly.
I hereby agree to the terms of the Cogboard Contributor License Agreement.