Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cypress/e2e/movie-details.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ describe('Movie Details', () => {
cy.visit('/movie/438148');
cy.visit('/movie/438148?manage=1');

cy.get('button[aria-label="Close panel"]').should('be.visible').click();
// Closing it while it's still animating in can leave the panel mounted
cy.get('button[aria-label="Close panel"]')
.should('be.visible')
.parents('[data-transition]')
.should('not.exist');
cy.get('button[aria-label="Close panel"]').click();
cy.location('search').should('eq', '');
cy.get('button[aria-label="Close panel"]').should('not.exist');

Expand Down
9 changes: 3 additions & 6 deletions cypress/e2e/user/profile.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ describe('User Profile', () => {
});

it('loads plex watchlist', () => {
// Title cards only load once they're on screen, so fit the watchlist without scrolling
cy.viewport(1000, 1200);
cy.intercept('/api/v1/user/[0-9]*/watchlist', {
fixture: 'watchlist.json',
}).as('getWatchlist');
Expand All @@ -22,16 +24,11 @@ describe('User Profile', () => {
cy.visit('/profile');

cy.wait('@getWatchlist');

const sliderHeader = cy.contains('.slider-header', 'Plex Watchlist');

sliderHeader.scrollIntoView();

cy.wait('@getTmdbMovie');
// Wait a little longer to make sure the movie component reloaded
cy.wait(500);

sliderHeader
cy.contains('.slider-header', 'Plex Watchlist')
.next('[data-testid=media-slider]')
.find('[data-testid=title-card]')
.first()
Expand Down
Loading