-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use config manager in Importers #54
Conversation
Merge #53 to make these validations pass |
The consistent naming convention in the repo is camelCase for directories and files so I would rename:
|
@@ -1,14 +1,7 @@ | |||
/* eslint-disable max-len */ | |||
import { createScraper, SCRAPERS } from 'israeli-bank-scrapers-core'; | |||
import { createScraper } from 'israeli-bank-scrapers-core'; | |||
import getChrome from './downloadChromium'; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change broke the import in Launch.spec.js
and importers.vue.spec.js
@@ -76,34 +68,23 @@ export default { | |||
data() { | |||
return { | |||
importing: false, | |||
// TODO: show browser should be in config. Also maybe one for all accounts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and yes. In general I think the common usecase is scrape all importers and then this type of configuration is global
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. See comments
35893e4
to
da1548d
Compare
|
||
// Remove when https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/625 closed | ||
const skip = process.env.GITHUB_ACTIONS && process.platform === 'win32'; | ||
// const skip = process.env.GITHUB_ACTIONS && process.platform === 'win32'; | ||
const skip = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test got stuck both locally and in the ci. When debugging locally it seems it got stuck running testWithSpectron
. Didn't even get to the tests themselves.
In this change, I'm using Vuex (the official state manage for Vue) to hold and represent the
config
object fromconfigManager
.Then, I'm using
vuex-persist
. This is a little library to create a Vuex Plugin- a function that called every time the state is changed. Withvuex-persist
I can define a handler for a specific module, so I created a handler for theconfig
Vuex module, to load this state fromconfigManager
and save it withconfigManager
every time it changes.This leads us to the fact that the state will always be the same as the config. We have to remember this in both directions.