mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-26 09:56:17 -05:00
ui: sample data names Blender and WROLPi, not real channels (#647)
* ui: sample data names Blender, not somebody's channel The gallery, the card samples, and the search fixtures used a real YouTube channel and one of its video titles as demo content. Sample data ships to users and appears in a page linked from Settings; naming a real third party in it puts words in their mouth -- the delete-confirmation sample in particular read "The channel Wranglerstar and its download rules will be removed." Blender fits better anyway: the repo's own test media is Big Buck Bunny, so the sample library now refers to something it actually contains, and to a project that publishes its films for exactly this kind of use. * ui: the second sample channel is WROLPi's own Same reason as the last commit: the remaining sample channel and its video title belonged to a real person. The pair now reads as Blender and WROLPi, which are the two things this project can name freely.
This commit is contained in:
parent
5873e65e8c
commit
499ef435f8
4 changed files with 17 additions and 17 deletions
|
|
@ -2652,8 +2652,8 @@ describe('a card reads as titles, not as a wall of links', () => {
|
|||
it(`keeps a card title legible in ${theme}`, () => {
|
||||
cy.mountUI(<MemoryRouter>
|
||||
<Card title={<a href='/videos/1' className='no-link-underscore card-link'>
|
||||
How To Sharpen An Axe
|
||||
</a>} meta='Wranglerstar'/>
|
||||
Big Buck Bunny
|
||||
</a>} meta='Blender'/>
|
||||
</MemoryRouter>, {theme});
|
||||
|
||||
cy.get('.card-link').should(($link) => {
|
||||
|
|
|
|||
|
|
@ -1365,8 +1365,8 @@ describe('SearchBox', () => {
|
|||
const results = {
|
||||
directories: {name: 'Directories', results: [{title: 'videos/'}]},
|
||||
channels: {name: 'Channels', results: [
|
||||
{title: 'videos/Wranglerstar', description: 'Wranglerstar'},
|
||||
{title: 'videos/RoseRed', description: 'RoseRed Homestead'},
|
||||
{title: 'videos/Blender', description: 'Blender'},
|
||||
{title: 'videos/WROLPi', description: 'WROLPi'},
|
||||
]},
|
||||
};
|
||||
|
||||
|
|
@ -1395,10 +1395,10 @@ describe('SearchBox', () => {
|
|||
onResultSelect={onResultSelect}/>);
|
||||
await userEvent.click(screen.getByRole('combobox'));
|
||||
|
||||
await userEvent.click(screen.getByText('videos/Wranglerstar'));
|
||||
await userEvent.click(screen.getByText('videos/Blender'));
|
||||
|
||||
expect(onResultSelect).toHaveBeenCalledWith(
|
||||
expect.objectContaining({title: 'videos/Wranglerstar'}));
|
||||
expect.objectContaining({title: 'videos/Blender'}));
|
||||
});
|
||||
|
||||
it('moves through suggestions with the arrow keys and takes one with Enter', async () => {
|
||||
|
|
@ -1412,7 +1412,7 @@ describe('SearchBox', () => {
|
|||
await userEvent.keyboard('{ArrowDown}{ArrowDown}{Enter}');
|
||||
|
||||
expect(onResultSelect).toHaveBeenCalledWith(
|
||||
expect.objectContaining({title: 'videos/Wranglerstar'}));
|
||||
expect.objectContaining({title: 'videos/Blender'}));
|
||||
// Enter took the highlighted suggestion instead of submitting the raw text.
|
||||
expect(onSubmit).not.toHaveBeenCalled();
|
||||
});
|
||||
|
|
@ -1426,7 +1426,7 @@ describe('SearchBox', () => {
|
|||
await userEvent.keyboard('{ArrowUp}{Enter}');
|
||||
|
||||
expect(onResultSelect).toHaveBeenCalledWith(
|
||||
expect.objectContaining({title: 'videos/RoseRed'}));
|
||||
expect.objectContaining({title: 'videos/WROLPi'}));
|
||||
});
|
||||
|
||||
it('lets a caller render a suggestion its own way', async () => {
|
||||
|
|
@ -1438,7 +1438,7 @@ describe('SearchBox', () => {
|
|||
|
||||
await userEvent.click(screen.getByRole('combobox'));
|
||||
|
||||
expect(screen.getByText('custom: videos/Wranglerstar').tagName).toBe('EM');
|
||||
expect(screen.getByText('custom: videos/Blender').tagName).toBe('EM');
|
||||
// The default title/description markup is replaced, not wrapped.
|
||||
expect(document.querySelector('.wrolpi-searchbox-result-title')).not.toBeInTheDocument();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue