Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Treats LocalView route types when PopToVIew #269

Merged
merged 10 commits into from
Oct 9, 2020

Conversation

hectorcustodiozup
Copy link
Contributor

@hectorcustodiozup hectorcustodiozup commented Oct 6, 2020

closes #258
- What I did
Fixed problem where pop to view navigation would not work if the route passed was an identifier instead of URL
- How I did it
Checked the type of the route and verified any existing Identifiers that would match
- How to verify it
Run the branch and try to use navigation action pop to view
- Description for the changelog

Fixes popToView action with LocalView

Copy link
Contributor

@Tiagoperes Tiagoperes left a comment

Choose a reason for hiding this comment

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

No core, é sempre necessário fazer testes quando se implementa uma feature ou um fix.

No caso do fix, se existia algo quebrado que não era detectado por um teste é pq tínhamos uma falha e um ou mais testes novos, que detectam essa falha, devem ser criados.

Sugestão:

  • should pop to a local view
  • should pop to first view matching the route: teste aquele caso em que eu falei que a sua regra não funcionaria, se tem url e screenIds iguais em diferentes rotas.

src/beagle-view/navigator/index.ts Outdated Show resolved Hide resolved
src/beagle-view/navigator/index.ts Outdated Show resolved Hide resolved
src/beagle-view/navigator/index.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@Tiagoperes Tiagoperes left a comment

Choose a reason for hiding this comment

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

Hector, lendo os novos testes, percebi um outro bug no popToView. Como está relacionado ao que vc fez, acho interessante já corrigir.

Além disso, na minha opinião, faltou um teste para verificar melhor que tudo funciona.

Explico melhor nos comentários quais os problemas e o que deve ser feito para corrigi-los.

__tests__/unit/beagle-view/navigator.spec.ts Outdated Show resolved Hide resolved
src/beagle-view/navigator/index.ts Show resolved Hide resolved
src/beagle-view/navigator/index.ts Show resolved Hide resolved
src/beagle-view/navigator/index.ts Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2020

Code coverage

Filename Statements Branches Functions Lines
src/logger/index.ts 79.17% 70% 90% 81.82%
src/beagle-view/navigator/index.ts 97.2% 93.65% 100% 100%
src/error/BeagleNavigationError.ts 100% 100% 100% 100%
src/error/BeagleError.ts 100% 100% 100% 100%
src/beagle-view/render/expression.ts 98.99% 97.33% 100% 100%
src/operation/index.ts 100% 100% 100% 100%
src/operation/array.ts 100% 100% 100% 100%
src/operation/logic.ts 100% 100% 100% 100%
src/operation/number.ts 100% 100% 100% 100%
src/operation/other.ts 100% 100% 100% 100%
src/operation/string.ts 100% 100% 100% 100%
src/utils/automaton.ts 100% 100% 100% 100%
src/error/BeagleNotFoundError.ts 100% 100% 100% 100%
src/error/BeagleParseError.ts 100% 100% 100% 100%
src/beagle-view/render/context.ts 100% 100% 100% 100%
src/action/set-context.ts 100% 85.71% 100% 100%
src/beagle-tree/index.ts 100% 100% 100% 100%
src/beagle-tree/iteration.ts 97.14% 91.67% 87.5% 100%
src/beagle-tree/manipulation.ts 90.91% 71.43% 100% 100%
src/beagle-tree/reading.ts 97.62% 95.83% 100% 100%
src/action/index.ts 100% 100% 100% 100%
src/action/add-children.ts 100% 90.91% 100% 100%
src/action/send-request.ts 100% 92.31% 100% 100%
src/error/BeagleNetworkError.ts 100% 100% 100% 100%
src/action/alert.ts 100% 100% 100% 100%
src/action/confirm.ts 100% 100% 100% 100%
src/action/submit-form.ts 25% 0% 0% 25%
src/action/condition.ts 100% 100% 100% 100%
src/action/navigation/index.ts 100% 66.67% 100% 100%
src/utils/url.ts 100% 100% 100% 100%
src/utils/string.ts 100% 100% 100% 100%
src/utils/object.ts 100% 66.67% 100% 100%
src/beagle-view/render/action.ts 100% 100% 100% 100%
src/service/beagle-service/index.ts 100% 100% 100% 100%
src/beagle-view/index.ts 90.32% 69.23% 89.29% 91.67%
src/beagle-view/render/index.ts 95.59% 86.67% 100% 96.77%
src/beagle-view/render/component.ts 100% 100% 100% 100%
src/beagle-view/render/navigation.ts 97.06% 96% 100% 100%
src/beagle-view/render/styling.ts 94.66% 90.36% 100% 99.14%
src/beagle-view/render/type-checker.ts 100% 100% 100% 100%
src/service/beagle-service/configuration.ts 100% 100% 100% 100%
src/metadata/parser.ts 94.44% 87.5% 100% 100%
src/legacy/middlewares.ts 100% 100% 100% 100%
src/service/beagle-service/services.ts 100% 100% 100% 100%
src/service/network/remote-cache/index.ts 100% 100% 100% 100%
src/service/network/default-headers/index.ts 100% 100% 100% 100%
src/service/network/url-builder/index.ts 100% 100% 100% 100%
src/service/network/view-client/index.ts 97.92% 94.37% 100% 97.73%
src/error/BeagleCacheError.ts 100% 100% 100% 100%
src/error/BeagleExpiredCacheError.ts 100% 100% 100% 100%
src/service/global-context/index.ts 100% 91.67% 100% 100%
src/service/view-content-manager/index.ts 100% 100% 100% 100%
src/metadata/decorator.ts 100% 100% 100% 100%
src/legacy/beagle-context.ts 100% 100% 100% 100%
src/index.ts 100% 100% 100% 100%

@carolinegoncalveszup carolinegoncalveszup merged commit b030329 into master Oct 9, 2020
@carolinegoncalveszup carolinegoncalveszup deleted the fix/pop-to-view-navigation branch October 9, 2020 18:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poptoview can't possibly navigate to a screen
3 participants