-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #225 from openzim/ui-revamp-homepage
Create homepage UI for channels in `zimui`
- Loading branch information
Showing
47 changed files
with
2,223 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-143 KB
scraper/src/youtube2zim/templates/assets/font/Roboto-LightItalic.ttf
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { defineConfig } from 'cypress' | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
setupNodeEvents() { | ||
// implement node event listeners here | ||
}, | ||
baseUrl: 'http://localhost:5173' | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
describe('home page for a channel', () => { | ||
beforeEach(() => { | ||
cy.intercept('GET', '/channel.json', { fixture: 'channel/channel.json' }).as('getChannel') | ||
cy.intercept('GET', '/playlists/uploads_from_openzim_testing-917Q.json', { | ||
fixture: 'channel/playlists/uploads_from_openzim_testing-917Q.json' | ||
}).as('getUploads') | ||
cy.visit('/') | ||
cy.wait('@getChannel') | ||
cy.wait('@getUploads') | ||
}) | ||
|
||
it('loads the videos tab', () => { | ||
cy.contains('2 videos').should('be.visible') | ||
cy.contains('Coffee Machine').should('be.visible') | ||
cy.contains('Timelapse').should('be.visible') | ||
}) | ||
|
||
it('loads the playlist tab', () => { | ||
cy.intercept('GET', '/playlists.json', { fixture: 'channel/playlists.json' }).as('getPlaylists') | ||
cy.contains('.v-btn__content', 'Playlists').click() | ||
cy.url().should('include', '/playlists') | ||
cy.wait('@getPlaylists') | ||
|
||
cy.contains('3 playlists').should('be.visible') | ||
cy.contains('Timelapses').should('be.visible') | ||
cy.contains('Trailers').should('be.visible') | ||
cy.contains('Coffee').should('be.visible') | ||
}) | ||
|
||
it('opens and loads "About Channel" dialog', () => { | ||
cy.contains('.v-btn__content', 'About Channel').click() | ||
cy.contains('Description for openZIM_testing').should('be.visible') | ||
cy.contains('Jun 4, 2024').should('be.visible') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"id": "UC8elThf5TGMpQfQc_VE917Q", | ||
"title": "openZIM_testing", | ||
"description": "-", | ||
"channelName": "openZIM_testing", | ||
"channelDescription": "Description for openZIM_testing", | ||
"profilePath": "profile.jpg", | ||
"bannerPath": "banner.jpg", | ||
"joinedDate": "2024-06-04T13:30:16.232286Z", | ||
"collectionType": "channel", | ||
"mainPlaylist": "uploads_from_openzim_testing-917Q" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"playlists": [ | ||
{ | ||
"slug": "timelapses-QgGI", | ||
"id": "PLMK6hZr9PcsjcF5mnaQk8Fi-xnb0AQgGI", | ||
"title": "Timelapses", | ||
"thumbnailPath": "videos/9TgosbGRsTk/video.webp", | ||
"videosCount": 2, | ||
"mainVideoSlug": "timelapse-9Tgo" | ||
}, | ||
{ | ||
"slug": "trailers-5Gph", | ||
"id": "PLMK6hZr9PcshJpNSRVaKReGlwhVlh5Gph", | ||
"title": "Trailers", | ||
"thumbnailPath": "videos/TcMBFSGVi1c/video.webp", | ||
"videosCount": 1, | ||
"mainVideoSlug": "marvel_studios_avengers_endgame_official_trailer-TcMB" | ||
}, | ||
{ | ||
"slug": "coffee-O2wS", | ||
"id": "PLMK6hZr9PcsjTJ5u2z-khzvDNXlqdO2wS", | ||
"title": "Coffee", | ||
"thumbnailPath": "videos/DYvYGQHYScc/video.webp", | ||
"videosCount": 1, | ||
"mainVideoSlug": "coffee_machine-DYvY" | ||
} | ||
] | ||
} |
30 changes: 30 additions & 0 deletions
30
zimui/cypress/fixtures/channel/playlists/uploads_from_openzim_testing-917Q.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"id": "UU8elThf5TGMpQfQc_VE917Q", | ||
"author": { | ||
"channelId": "UC8elThf5TGMpQfQc_VE917Q", | ||
"channelTitle": "openZIM_testing", | ||
"profilePath": "channels/UC8elThf5TGMpQfQc_VE917Q/profile.jpg", | ||
"bannerPath": "channels/UC8elThf5TGMpQfQc_VE917Q/banner.jpg" | ||
}, | ||
"title": "Uploads from openZIM_testing", | ||
"description": "", | ||
"publicationDate": "2024-06-04T14:57:45Z", | ||
"thumbnailPath": "videos/DYvYGQHYScc/video.webp", | ||
"videos": [ | ||
{ | ||
"slug": "coffee_machine-DYvY", | ||
"id": "DYvYGQHYScc", | ||
"title": "Coffee Machine", | ||
"thumbnailPath": "videos/DYvYGQHYScc/video.webp", | ||
"duration": "PT9S" | ||
}, | ||
{ | ||
"slug": "timelapse-9Tgo", | ||
"id": "9TgosbGRsTk", | ||
"title": "Timelapse", | ||
"thumbnailPath": "videos/9TgosbGRsTk/video.webp", | ||
"duration": "PT11S" | ||
} | ||
], | ||
"videosCount": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/// <reference types="cypress" /> | ||
// *********************************************** | ||
// This example commands.ts shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('login', (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) | ||
// | ||
// declare global { | ||
// namespace Cypress { | ||
// interface Chainable { | ||
// login(email: string, password: string): Chainable<void> | ||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element> | ||
// } | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// *********************************************************** | ||
// This example support/e2e.ts is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import './commands' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"noEmit": true, | ||
// be explicit about types included | ||
// to avoid clashing with Jest types | ||
"types": ["cypress"] | ||
}, | ||
"include": ["../node_modules/cypress", "./**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Oops, something went wrong.