feat: season/episode list on series details (#2967)

This commit is contained in:
Ryan Cohen
2022-08-24 13:09:10 +09:00
committed by GitHub
parent 67f3a3829e
commit 8a2acb7f2b
17 changed files with 377 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ const clickFirstTitleCardInSlider = (sliderTitle: string): void => {
describe('Discover', () => {
beforeEach(() => {
cy.login(Cypress.env('ADMIN_EMAIL'), Cypress.env('ADMIN_PASSWORD'));
cy.loginAsAdmin();
});
it('loads a trending item', () => {

View File

@@ -1,12 +1,12 @@
describe('Login Page', () => {
it('succesfully logs in as an admin', () => {
cy.login(Cypress.env('ADMIN_EMAIL'), Cypress.env('ADMIN_PASSWORD'));
cy.loginAsAdmin();
cy.visit('/');
cy.contains('Trending');
});
it('succesfully logs in as a local user', () => {
cy.login(Cypress.env('USER_EMAIL'), Cypress.env('USER_PASSWORD'));
cy.loginAsUser();
cy.visit('/');
cy.contains('Trending');
});

View File

@@ -1,6 +1,6 @@
describe('Movie Details', () => {
it('loads a movie page', () => {
cy.login(Cypress.env('ADMIN_EMAIL'), Cypress.env('ADMIN_PASSWORD'));
cy.loginAsAdmin();
// Try to load minions: rise of gru
cy.visit('/movie/438148');

View File

@@ -1,6 +1,6 @@
describe('General Settings', () => {
beforeEach(() => {
cy.login(Cypress.env('ADMIN_EMAIL'), Cypress.env('ADMIN_PASSWORD'));
cy.loginAsAdmin();
});
it('opens the settings page from the home page', () => {

View File

@@ -1,6 +1,6 @@
describe('TV Details', () => {
it('loads a movie page', () => {
cy.login(Cypress.env('ADMIN_EMAIL'), Cypress.env('ADMIN_PASSWORD'));
it('loads a tv details page', () => {
cy.loginAsAdmin();
// Try to load stranger things
cy.visit('/tv/66732');
@@ -9,4 +9,20 @@ describe('TV Details', () => {
'Stranger Things (2016)'
);
});
it('shows seasons and expands episodes', () => {
cy.loginAsAdmin();
// Try to load stranger things
cy.visit('/tv/66732');
// intercept request for season info
cy.intercept('/api/v1/tv/66732/season/4').as('season4');
cy.contains('Season 4').should('be.visible').scrollIntoView().click();
cy.wait('@season4');
cy.contains('Chapter Nine').should('be.visible');
});
});

View File

@@ -6,7 +6,7 @@ const visitUserEditPage = (email: string): void => {
describe('Auto Request Settings', () => {
beforeEach(() => {
cy.login(Cypress.env('ADMIN_EMAIL'), Cypress.env('ADMIN_PASSWORD'));
cy.loginAsAdmin();
});
it('should not see watchlist sync settings on an account without permissions', () => {

View File

@@ -1,6 +1,6 @@
describe('User Profile', () => {
beforeEach(() => {
cy.login(Cypress.env('ADMIN_EMAIL'), Cypress.env('ADMIN_PASSWORD'));
cy.loginAsAdmin();
});
it('opens user profile page from the home page', () => {

View File

@@ -6,7 +6,7 @@ const testUser = {
describe('User List', () => {
beforeEach(() => {
cy.login(Cypress.env('ADMIN_EMAIL'), Cypress.env('ADMIN_PASSWORD'));
cy.loginAsAdmin();
});
it('opens the user list from the home page', () => {