mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 00:20:07 +00:00
feat(release): show the iOS and Android apps in the 5.2.1 notice, the account settings and the user menu
The release notice moves to 5.2.1 and gets a tile across the release column with the App Store and Google Play cards, each with a QR code that opens the store page. The headliner, intro, footnote and note texts are shorter so the tile fits, in every locale. Settings > Account shows the same store cards in its right column, except inside the native app itself. The user menu footer adds round links to Patreon, Ko-fi and Buy Me a Coffee beside Discord, left out on managed installs and in the native apps like every donation link.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// FE-RN-001 to FE-RN-020
|
||||
// FE-RN-001 to FE-RN-022
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
import { render, screen } from '../../../tests/helpers/render';
|
||||
@@ -295,4 +295,23 @@ describe('ReleaseNoticeModal', () => {
|
||||
expect(document.querySelectorAll('.rn-vis-route-stop')).toHaveLength(5);
|
||||
expect(document.querySelector('.rn-vis-route-line')).not.toBeNull();
|
||||
});
|
||||
|
||||
it('FE-RN-021: an apps block draws one tile with its title and both store cards', () => {
|
||||
renderModal(withRelease({ apps: { titleKey: 'rel.apps.title' } }));
|
||||
const tile = document.querySelector('.rn-apps');
|
||||
expect(tile).toHaveTextContent('rel.apps.title');
|
||||
const stores = tile?.querySelectorAll('a.asc-card') ?? [];
|
||||
expect([...stores].map((a) => a.getAttribute('href'))).toEqual([
|
||||
'https://apps.apple.com/app/id6831237775',
|
||||
'https://play.google.com/store/apps/details?id=com.liketrek.trek',
|
||||
]);
|
||||
// On the release column, which is dark in either theme.
|
||||
expect(tile?.querySelector('.asc-row')).toHaveClass('asc-dark');
|
||||
});
|
||||
|
||||
it('FE-RN-022: without an apps block there is no apps tile', () => {
|
||||
renderModal();
|
||||
expect(document.querySelector('.rn-apps')).toBeNull();
|
||||
expect(document.querySelector('.asc-card')).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user