Skip to content

Commit ac24c37

Browse files
committed
fix(test): fix test with default provider tmdb anime
1 parent d762123 commit ac24c37

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

cypress/e2e/providers/tvdb.cy.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ describe('TVDB Integration', () => {
55
metadataSettings: '/settings/metadata',
66
tomorrowIsOursTvShow: '/tv/72879',
77
monsterTvShow: '/tv/225634',
8+
dragonnBallZKayAnime: '/tv/61709',
89
};
910

1011
const SELECTORS = {
@@ -20,6 +21,7 @@ describe('TVDB Integration', () => {
2021
seasonSelector: '[data-testid="season-selector"]',
2122
season1: 'Season 1',
2223
season2: 'Season 2',
24+
season3: 'Season 3',
2325
episodeList: '[data-testid="episode-list"]',
2426
episode9: '9 - Hang Men',
2527
};
@@ -71,6 +73,9 @@ describe('TVDB Integration', () => {
7173
// Supposons que vous avez ajouté data-testid au div parent du Select
7274
cy.get('[data-testid="tv-indexer-selector"]').click();
7375

76+
// get id react-select-4-option-1
77+
cy.get('[id^="react-select-4-option-"]').contains('TheTVDB').click();
78+
7479
// Test the connection
7580
testAndVerifyMetadataConnection().then(({ response }) => {
7681
expect(response.statusCode).to.equal(200);
@@ -124,4 +129,21 @@ describe('TVDB Integration', () => {
124129
// Verify specific episode exists
125130
cy.contains(SELECTORS.episode9).should('be.visible');
126131
});
132+
133+
it('should display "Dragon Ball Z Kai" show information with multiple only 2 seasons from TVDB', () => {
134+
// Navigate to the TV show
135+
cy.visit(ROUTES.dragonnBallZKayAnime);
136+
137+
// Intercept season 1 request
138+
cy.intercept('/api/v1/tv/61709/season/1').as('season1');
139+
140+
// Select Season 2 and verify it visible
141+
cy.contains(SELECTORS.season2)
142+
.should('be.visible')
143+
.scrollIntoView()
144+
.click();
145+
146+
// select season 3 and verify it not visible
147+
cy.contains(SELECTORS.season3).should('not.exist');
148+
});
127149
});

server/lib/settings/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class Settings {
423423
tautulli: {},
424424
metadataSettings: {
425425
tv: IndexerType.TMDB,
426-
anime: IndexerType.TVDB,
426+
anime: IndexerType.TMDB,
427427
},
428428
radarr: [],
429429
sonarr: [],

0 commit comments

Comments
 (0)