mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-30 10:14:53 -05:00
🐛 fix filtering in transaction table (#1622)
This commit is contained in:
committed by
GitHub
parent
05e582793d
commit
d46afab6dd
30
.github/workflows/e2e-test.yml
vendored
30
.github/workflows/e2e-test.yml
vendored
@@ -10,11 +10,11 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
functional:
|
netlify:
|
||||||
name: Functional
|
name: Wait for Netlify build to finish
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
outputs:
|
||||||
image: mcr.microsoft.com/playwright:v1.37.0-jammy
|
netlify_url: ${{ steps.netlify.outputs.url }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up environment
|
- name: Set up environment
|
||||||
@@ -25,10 +25,21 @@ jobs:
|
|||||||
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./.github/actions/netlify-wait-for-build
|
run: ./.github/actions/netlify-wait-for-build
|
||||||
|
|
||||||
|
functional:
|
||||||
|
name: Functional
|
||||||
|
needs: netlify
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: mcr.microsoft.com/playwright:v1.37.0-jammy
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up environment
|
||||||
|
uses: ./.github/actions/setup
|
||||||
- name: Run E2E Tests on Netlify URL
|
- name: Run E2E Tests on Netlify URL
|
||||||
run: yarn e2e
|
run: yarn e2e
|
||||||
env:
|
env:
|
||||||
E2E_START_URL: ${{ steps.netlify.outputs.url }}
|
E2E_START_URL: ${{ needs.netlify.outputs.netlify_url }}
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
@@ -37,6 +48,7 @@ jobs:
|
|||||||
retention-days: 30
|
retention-days: 30
|
||||||
vrt:
|
vrt:
|
||||||
name: Visual regression
|
name: Visual regression
|
||||||
|
needs: netlify
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: mcr.microsoft.com/playwright:v1.37.0-jammy
|
image: mcr.microsoft.com/playwright:v1.37.0-jammy
|
||||||
@@ -44,16 +56,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up environment
|
- name: Set up environment
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
- name: Wait for Netlify build to finish
|
|
||||||
id: netlify
|
|
||||||
env:
|
|
||||||
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: ./.github/actions/netlify-wait-for-build
|
|
||||||
- name: Run VRT Tests on Netlify URL
|
- name: Run VRT Tests on Netlify URL
|
||||||
run: yarn vrt
|
run: yarn vrt
|
||||||
env:
|
env:
|
||||||
E2E_START_URL: ${{ steps.netlify.outputs.url }}
|
E2E_START_URL: ${{ needs.netlify.outputs.netlify_url }}
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -54,6 +54,37 @@ test.describe('Transactions', () => {
|
|||||||
await expect(accountPage.transactionTable).toHaveText('No transactions');
|
await expect(accountPage.transactionTable).toHaveText('No transactions');
|
||||||
await expect(page).toHaveScreenshot(screenshotConfig(page));
|
await expect(page).toHaveScreenshot(screenshotConfig(page));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('by category', async () => {
|
||||||
|
const filterTooltip = await accountPage.filterBy('Category');
|
||||||
|
await expect(filterTooltip.page).toHaveScreenshot(screenshotConfig(page));
|
||||||
|
|
||||||
|
// Type in the autocomplete box
|
||||||
|
const autocomplete = page.getByTestId('autocomplete');
|
||||||
|
await expect(autocomplete).toHaveScreenshot(screenshotConfig(page));
|
||||||
|
|
||||||
|
// Select the active item
|
||||||
|
await page.getByRole('button', { name: 'Clothing' }).click();
|
||||||
|
await filterTooltip.applyButton.click();
|
||||||
|
|
||||||
|
// Assert that there are only clothing transactions
|
||||||
|
await expect(accountPage.getNthTransaction(0).category).toHaveText(
|
||||||
|
'Clothing',
|
||||||
|
);
|
||||||
|
await expect(accountPage.getNthTransaction(1).category).toHaveText(
|
||||||
|
'Clothing',
|
||||||
|
);
|
||||||
|
await expect(accountPage.getNthTransaction(2).category).toHaveText(
|
||||||
|
'Clothing',
|
||||||
|
);
|
||||||
|
await expect(accountPage.getNthTransaction(3).category).toHaveText(
|
||||||
|
'Clothing',
|
||||||
|
);
|
||||||
|
await expect(accountPage.getNthTransaction(4).category).toHaveText(
|
||||||
|
'Clothing',
|
||||||
|
);
|
||||||
|
await expect(page).toHaveScreenshot(screenshotConfig(page));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('creates a test transaction', async () => {
|
test('creates a test transaction', async () => {
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
@@ -43,11 +43,7 @@ export class Tooltip extends Component {
|
|||||||
// Allow clicking reach popover that mount outside of
|
// Allow clicking reach popover that mount outside of
|
||||||
// tooltips. Might need to think about this more, like what
|
// tooltips. Might need to think about this more, like what
|
||||||
// kind of things can be click that shouldn't close a tooltip?
|
// kind of things can be click that shouldn't close a tooltip?
|
||||||
if (
|
if (node.dataset.istooltip || node.dataset.reachPopover != null) {
|
||||||
node.dataset.testid === 'tooltip' ||
|
|
||||||
node.dataset.testid === this.props['data-testid'] ||
|
|
||||||
node.dataset.reachPopover != null
|
|
||||||
) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,6 +316,7 @@ export class Tooltip extends Component {
|
|||||||
{...css(contentStyle, style, styles.darkScrollbar)}
|
{...css(contentStyle, style, styles.darkScrollbar)}
|
||||||
ref={this.contentRef}
|
ref={this.contentRef}
|
||||||
data-testid={this.props['data-testid'] || 'tooltip'}
|
data-testid={this.props['data-testid'] || 'tooltip'}
|
||||||
|
data-istooltip
|
||||||
onClick={e => {
|
onClick={e => {
|
||||||
// Click events inside a tooltip (e.g. when selecting a menu item) will bubble up
|
// Click events inside a tooltip (e.g. when selecting a menu item) will bubble up
|
||||||
// through the portal to parents in the React tree (as opposed to DOM parents).
|
// through the portal to parents in the React tree (as opposed to DOM parents).
|
||||||
|
|||||||
6
upcoming-release-notes/1622.md
Normal file
6
upcoming-release-notes/1622.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
category: Bugfix
|
||||||
|
authors: [MatissJanis]
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix filtering in transaction table not working
|
||||||
Reference in New Issue
Block a user