-
Notifications
You must be signed in to change notification settings - Fork 6
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
Refactor Vue Single File Components #193
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NathanWEdwards
changed the title
Move methods out of Vue SFC files.
Refactor Vue Single File Components
Jul 21, 2023
NathanWEdwards
force-pushed
the
m3-jod
branch
3 times, most recently
from
July 22, 2023 20:48
e1a9495
to
3269825
Compare
…ifecycle for omitting development dependencies.
…ge-counts 'local component'.
…ngs 'local component'.
…ups 'local component'.
…ignate if the method is registering a listener on storage changes for a Chrome Extension pop-up. Conditionally update the app's state.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This request moves several methods shared between Vue SFC's into
utils.js
.This request also adds test support; replaces the datetime manipulation library, Moment, with DayJS; does not display parentheses next to arrest citation, disposition, and offense dates on the popup page; and sets a max date to the current day users can input in date fields.
Several Vue components share method names with the same functionality. The following Vue method definitions shared between
components/filings.vue
,components/manage-counts.vue
, andcomponents/popup.vue
have been moved intoutils.js
:Several functions are present as Vue methods in components, but are only called by other Vue component methods. These helper functions that are present in multiple components have been moved into
utils.js
:Chai, Mocha, and Puppeteer have been added as development dependencies for test. The
test
NPM script has been added that invokes the following command,node ./node_modules/mocha/bin/mocha.js --require mocha-fixtures.mjs --config .mocharc.js **/*.spec.mjs
.A
test
directory has been added in the project root directory. Test utility methods and selectors are located intest-utils.mjs
. A single set of tests have been added to validate the presence of image logos and the terms of service checkbox on the app's popup. When tests are run ascreenshots
directory is created if the directory does not exist and test screenshots are output to this directory. Due to limitations with Puppeteer and the Chromium API, additional effort is needed for introducing additional tests.