fmaclen / canutin-desktop Goto Github PK
View Code? Open in Web Editor NEWAn open-source personal finance desktop app
Home Page: https://canutin.com
License: Apache License 2.0
An open-source personal finance desktop app
Home Page: https://canutin.com
License: Apache License 2.0
warn(prisma-client) There are already 10 instances of Prisma Client actively running.
uncachedPrisma
.uncachedPrisma.$disconnect()
is called after using them but it doesn't seem like that is removing them correctly.Only a few of the methods in TrayMenu have unit tests, primarily due to difficulty mocking Electron's modules.
Specifically, we need tests for:
It wouldn't be a bad idea to go over the existing tests as there is probably quite a bit of room for improvement.
Also worth noting that the mocks in this test suite is printing an error to the console but it's not failing the test:
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '/path/to/fake/assets/fake-image.png'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
It might be a good idea to break some of these tasks into separate issues and PRs.
At the moment the tests run using 1 worker, the main reason why we can't increase the number of workers is due to: #51
Aside from being blocked by that issue there is probably a way to improve the current GitHub Actions workflow to at least parallelize each of the browser jobs.
The status bar would display:
isClosed
or Asset isSold
don't show it in Balance sheet.Prevent the body from growing past width: 1200px;
/package.json
/electron-builder.yml
Use this config as a reference: https://github.com/Canutin/svelte-currency-input/blob/main/playwright.config.ts
~100 MB
CanutinFile
's types.github/workflow
's so they take advantage of such command% npm install
% cd sveltekit && npm install
% cd sveltekit && npx prisma generate
% cd sveltekit && npx prisma migrate dev
xxx.json
endpoints and what payloads they accept[section] - Canutin
, [accountName] - Account - Canutin
openVault()
production
app is running side-by-side with the development
app there is no way to visually differentiate them.development
environment should make it obvious which one is which.The current implementation sets a timeout delay but ideally we should check if the server is indeed running before it opens the url in the user's browser.
Might be a good idea to also update the way toggleServer()
sets the this.isServerRunning
prop.
Perhaps we could try tcp-port-used
to check if the port is used.
/accounts
and /assets
isClosed
and isSold
respectively)https://playwright.dev/docs/test-snapshots
Tests to capture:
https://www.electron.build/auto-update
Blocked by #29
If we can't read the app version in SvelteKit from it's package.json
we could could use Electrons app.getVersion()
and pass it as an environment variable, for example: ELECTRON_APP_VERSION
.
// Check that the balanceGroups have the correct amounts after importing data
await importCanutinFile(baseURL!, 'minimum-data');
await page.reload();
expect(await page.locator('.card', { hasText: 'Cash' }).textContent()).toMatch('$0');
expect(await page.locator('.card', { hasText: 'Debt' }).textContent()).toMatch('$0');
expect(await page.locator('.card', { hasText: 'Investments' }).textContent()).toMatch('$0');
expect(await page.locator('.card', { hasText: 'Other assets' }).textContent()).toMatch('$7,571');
We should replace importCanutinFile()
with databaseSeed()
and add more detailed assertions (maybe in a separate test).
allowToChangeInstallationDirectory
.canutin/desktop-legacy
assetBalanceStatement.value
, accountBalanceStatement.cost
, accountBalanceStatement.value
, transaction.amount
should be formatted as currency.assetBalanceStatement.quantity
)Positive values should be in --color-greenPrimary
true
the Balance field should reflect the correct value.REF #28
At least will need to settle this error:
Rename your server hook file from src/hooks.ts to src/hooks.server.ts (because there's also client hooks now). See the PR for more information: https://github.com/sveltejs/kit/pull/6586
REF https://kit.svelte.dev/docs/layouts#error-pages
The test UI is rendered correctly when there are transactions present
varies depending on the day in which the test is run, need to make the transaction results more deterministic to avoid this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.