Skip to content
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

Layout fixes #29

Merged
merged 8 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/settings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test('locale settings work', async ({page}) => {
await page.getByTestId('navbar-link-log').click();
await expect(page.getByTestId('veggie-search-input')).toHaveAttribute(
'placeholder',
'Etsi kasviksia',
'Kirjaa viikon kasvikset',
);
});

Expand Down
30 changes: 13 additions & 17 deletions e2e/stats.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ test('shows last five weeks', async ({page}) => {
await page.getByTestId('veggie-search-button').click();
await page.getByText('Apricot').click();
await page.goto('stats');
await page.getByTestId('stats-dropdown-button').click();
await page.getByTestId('stats-dropdown-option-1').click();
await page.getByTestId('stats-tab-1').click();
await expect(page.getByTestId('weekly-amounts-chart')).toBeVisible();
await expect(page.getByTestId('weekly-categories-chart')).toBeVisible();
await expect(page.locator('#weekly-amounts-table')).toBeAttached();
Expand All @@ -46,14 +45,23 @@ test('shows all time stats', async ({page}) => {
await page.getByText('Apricot').click();
await page.getByText('Avocado').click();
await page.goto('stats');
await page.getByTestId('stats-dropdown-button').click();
await page.getByTestId('stats-dropdown-option-2').click();
await page.getByTestId('stats-tab-2').click();
await expect(page.getByTestId('all-time-weeks')).toHaveText('In Total 1 Weeks');
await expect(page.getByTestId('all-time-over-30')).toHaveText('Over 30 Veggies in 0 Weeks');
await expect(page.getByTestId('all-time-unique')).toHaveText('In Total 2 Unique Veggies');
await expect(page.getByTestId('all-time-at-most')).toHaveText('At Most 2 Veggies in a Week');
});

test('shows veggie list', async ({page}) => {
await page.goto('/');
await page.getByTestId('home-start-button').click();
await page.getByTestId('veggie-search-button').click();
await page.getByText('Apricot').click();
await page.goto('stats');
await page.getByTestId('stats-tab-3').click();
await expect(page.getByTestId('veggie-list-status-apricot')).toHaveText('(complete)');
});

test('shows achievements', async ({page}) => {
await page.goto('/');
await page.getByTestId('home-start-button').click();
Expand All @@ -66,21 +74,9 @@ test('shows achievements', async ({page}) => {
}
await page.getByTestId('dialog-close-button').click();
await page.goto('stats');
await page.getByTestId('stats-dropdown-button').click();
await page.getByTestId('stats-dropdown-option-3').click();
await page.getByTestId('stats-tab-4').click();
await expect(page.getByTestId('badge-experimenterFruit-3')).toHaveAttribute(
'aria-disabled',
'false',
);
});

test('shows veggie list', async ({page}) => {
await page.goto('/');
await page.getByTestId('home-start-button').click();
await page.getByTestId('veggie-search-button').click();
await page.getByText('Apricot').click();
await page.goto('stats');
await page.getByTestId('stats-dropdown-button').click();
await page.getByTestId('stats-dropdown-option-4').click();
await expect(page.getByTestId('veggie-list-status-apricot')).toHaveText('(complete)');
});
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import pluginVitest from '@vitest/eslint-plugin';
import pluginPlaywright from 'eslint-plugin-playwright';
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
import {includeIgnoreFile} from '@eslint/compat';
import pluginVueA11y from 'eslint-plugin-vuejs-accessibility';
import {fileURLToPath} from 'node:url';

export default [
Expand All @@ -13,6 +14,7 @@ export default [
files: ['**/*.{ts,mts,tsx,vue}'],
},

...pluginVueA11y.configs['flat/recommended'],
...pluginVue.configs['flat/essential'],
...vueTsEslintConfig(),

Expand Down
Loading