bcgov / bcgov/entity

Edit UI: mock FF instead of disabling them for testing

Open
#15,667 1 comment 0 reactions 0 assignees View on GitHub
ENTITY - DO NOT USE good first issue techdebt
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

## What is the problem?
In Edit-Ui, every view has code like this:

```javascript
// do not proceed if FF is disabled
// bypass this when Jest is running as FF are not fetched
if (!this.isJestRunning && !GetFeatureFlag('conversion-ui-enabled')) {
window.alert('Conversion filings are not available at the moment. Please check again later.')
this.$root.$emit('go-to-dashboard', true)
return
}
```

## What is the impact?
Feature flags cannot be tested and this block of code is duplicated on every view page.

## Proposed solution
Use a Jest mock for GetFeatureFlag

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.