mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 05:39:57 -05:00
Video downloads have many more options. Downloads are migrated.
Storing video settings in session storage to help user start downloads consistently. Applying channel tag name to new channels when download videos or channels. Initializing map tiles when importing and resetting map.
This commit is contained in:
parent
a385d4f709
commit
5621d47309
77 changed files with 5878 additions and 2541 deletions
58
app/src/components/Channels.cy.js
Normal file
58
app/src/components/Channels.cy.js
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
import React from "react";
|
||||
import {ChannelPage} from "./Channels";
|
||||
|
||||
describe(' Channels Page', () => {
|
||||
beforeEach(() => {
|
||||
// Do not return directories for these tests.
|
||||
cy.intercept('POST', '**/api/files/search_directories', {
|
||||
statusCode: 200,
|
||||
body: {
|
||||
is_dir: true, channel_directories: [], domain_directories: [],
|
||||
directories: [{path: "some directory", name: "some directory"}],
|
||||
},
|
||||
}).as('searchDirectories');
|
||||
});
|
||||
|
||||
it('New Channel page can be rendered', () => {
|
||||
cy.mountWithTags(
|
||||
<ChannelPage create={true}/>,
|
||||
{initialEntries: ['/videos/channels/new']}
|
||||
);
|
||||
cy.get('input[name="name"]').should('be.visible');
|
||||
cy.wait('@searchDirectories');
|
||||
});
|
||||
|
||||
it('Edit Channel page can be rendered', () => {
|
||||
cy.intercept('GET', '**/api/videos/channels/1', {
|
||||
statusCode: 200,
|
||||
body: {
|
||||
channel: {
|
||||
name: 'Editing Channel',
|
||||
tag_name: 'Automotive',
|
||||
id: 1,
|
||||
directory: 'some directory',
|
||||
rss_url: 'https://example.com/rss-feed',
|
||||
downloads: [],
|
||||
statistics: {
|
||||
size: 1,
|
||||
largest_video: 2,
|
||||
video_count: 3,
|
||||
length: 4,
|
||||
video_tags: 5,
|
||||
}
|
||||
}
|
||||
},
|
||||
}).as('channelFetch');
|
||||
|
||||
cy.mountWithTags(
|
||||
<ChannelPage create={false}/>,
|
||||
{initialEntries: ['/videos/channels/1']}
|
||||
);
|
||||
cy.wait('@channelFetch');
|
||||
cy.wait('@searchDirectories'); // Needed for CircleCi.
|
||||
cy.wait(500);
|
||||
cy.get('input[name="name"]').should('be.visible');
|
||||
cy.get('input[name="name"]').should('have.value', 'Editing Channel');
|
||||
cy.get('div.ui.label.large').contains('Automotive').should('be.visible');
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue