Repository navigation
Expand test coverage and improve stability - #4
Merged
Merged
Conversation
Deploying rebill with
|
| Latest commit: |
fc47f2f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://96858fd9.rebill.pages.dev |
| Branch Preview URL: | https://feat-add-invoice-tests.rebill.pages.dev |
Greptile SummaryThis PR significantly expands test coverage for the Rebill invoice generator and fixes critical stability issues. The changes include: Test Coverage Improvements:
Stability Fixes:
Build Infrastructure:
All changes are well-tested and improve application reliability. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Test
participant Browser
participant App
participant LocalStorage
participant PDF
Note over Test,Browser: Test Setup
Test->>Browser: goto('/')
Test->>Browser: localStorage.clear()
Test->>Browser: reload()
Note over Test,PDF: Form Filling & Invoice Generation
Test->>Browser: fill('#sellerName', 'Test Seller')
Test->>Browser: fill('#invoiceNumber', 'INV-001')
Test->>Browser: fill('.item-description', 'Test Item')
Browser->>App: input event
App->>LocalStorage: saveDraft(data)
Test->>Browser: click('Generate Bill')
Browser->>App: generateBill()
App->>App: syncFromForm()
App->>LocalStorage: saveToHistory(data)
App->>App: renderInvoice()
Note over Test,PDF: PDF Download & Validation
Test->>Browser: click('#downloadBtn')
Browser->>PDF: generate PDF with html2pdf
PDF-->>Test: download event
Test->>Test: parse PDF with pdf-parse
Test->>Test: verify content
Note over Test,LocalStorage: History & JSON I/O Tests
Test->>Browser: click('#historyToggle')
Browser->>App: toggleHistoryPanel()
App->>LocalStorage: getHistory()
LocalStorage-->>App: history entries
Test->>Browser: click('.history-item')
Browser->>App: loadFromHistory(id)
App->>App: isApplyingData = true
App->>App: applyDataToForm(data)
App->>App: syncFromForm()
App->>App: isApplyingData = false
Note over Test,App: JSON Import Test
Test->>Browser: fill('#jsonData', JSON.stringify(data))
Test->>Browser: click('#importJsonBtn')
Browser->>App: importJsonData()
App->>App: isApplyingData = true
App->>App: deepMerge(base, parsed)
App->>App: applyDataToForm(merged)
App->>App: isApplyingData = false
|
Playwright test resultsDetails
|
This file contains hidden or 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
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 PR adds comprehensive E2E tests for the Rebill invoice generator, including item management, form persistence, tax/discount calculations, and multi-page PDF generation. It also fixes a stability issue in the
deepMergefunction and updates theMakefilewith test targets.