-
-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
183 changed files
with
13,272 additions
and
5,040 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
organization: overseerr | ||
defaultSticker: clcyagj1j329008l468ya8pu2 | ||
stickers: | ||
- id: clcyagj1j329008l468ya8pu2 | ||
alias: overseerr-contributor |
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,41 @@ | ||
name: 'CodeQL' | ||
|
||
on: | ||
push: | ||
branches: ['develop'] | ||
pull_request: | ||
branches: ['develop'] | ||
schedule: | ||
- cron: '50 7 * * 5' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [javascript] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
queries: +security-and-quality | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: '/language:${{ matrix.language }}' |
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,163 @@ | ||
describe('Discover Customization', () => { | ||
beforeEach(() => { | ||
cy.loginAsAdmin(); | ||
cy.intercept('/api/v1/settings/discover').as('getDiscoverSliders'); | ||
}); | ||
|
||
it('show the discover customization settings', () => { | ||
cy.visit('/'); | ||
|
||
cy.get('[data-testid=discover-start-editing]').click(); | ||
|
||
cy.get('[data-testid=create-slider-header') | ||
.should('contain', 'Create New Slider') | ||
.scrollIntoView(); | ||
|
||
// There should be some built in options | ||
cy.get('[data-testid=discover-slider-edit-mode]').should( | ||
'contain', | ||
'Recently Added' | ||
); | ||
cy.get('[data-testid=discover-slider-edit-mode]').should( | ||
'contain', | ||
'Recent Requests' | ||
); | ||
}); | ||
|
||
it('can drag to re-order elements and save to persist the changes', () => { | ||
let dataTransfer = new DataTransfer(); | ||
cy.visit('/'); | ||
|
||
cy.get('[data-testid=discover-start-editing]').click(); | ||
|
||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.first() | ||
.trigger('dragstart', { dataTransfer }); | ||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.eq(1) | ||
.trigger('drop', { dataTransfer }); | ||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.eq(1) | ||
.trigger('dragend', { dataTransfer }); | ||
|
||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.eq(1) | ||
.should('contain', 'Recently Added'); | ||
|
||
cy.get('[data-testid=discover-customize-submit').click(); | ||
cy.wait('@getDiscoverSliders'); | ||
|
||
cy.reload(); | ||
|
||
cy.get('[data-testid=discover-start-editing]').click(); | ||
|
||
dataTransfer = new DataTransfer(); | ||
|
||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.eq(1) | ||
.should('contain', 'Recently Added'); | ||
|
||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.first() | ||
.trigger('dragstart', { dataTransfer }); | ||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.eq(1) | ||
.trigger('drop', { dataTransfer }); | ||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.eq(1) | ||
.trigger('dragend', { dataTransfer }); | ||
|
||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.eq(1) | ||
.should('contain', 'Recent Requests'); | ||
|
||
cy.get('[data-testid=discover-customize-submit').click(); | ||
cy.wait('@getDiscoverSliders'); | ||
}); | ||
|
||
it('can create a new discover option and remove it', () => { | ||
cy.visit('/'); | ||
cy.intercept('/api/v1/settings/discover/*').as('discoverSlider'); | ||
cy.intercept('/api/v1/search/keyword*').as('searchKeyword'); | ||
|
||
cy.get('[data-testid=discover-start-editing]').click(); | ||
|
||
const sliderTitle = 'Custom Keyword Slider'; | ||
|
||
cy.get('#sliderType').select('TMDB Movie Keyword'); | ||
|
||
cy.get('#title').type(sliderTitle); | ||
// First confirm that an invalid keyword doesn't allow us to submit anything | ||
cy.get('#data').type('invalidkeyword{enter}', { delay: 100 }); | ||
cy.wait('@searchKeyword'); | ||
|
||
cy.get('[data-testid=create-discover-option-form]') | ||
.find('button') | ||
.should('be.disabled'); | ||
|
||
cy.get('#data').clear(); | ||
cy.get('#data').type('time travel{enter}', { delay: 100 }); | ||
|
||
// Confirming we have some results | ||
cy.contains('.slider-header', sliderTitle) | ||
.next('[data-testid=media-slider]') | ||
.find('[data-testid=title-card]'); | ||
|
||
cy.get('[data-testid=create-discover-option-form]').submit(); | ||
|
||
cy.wait('@discoverSlider'); | ||
cy.wait('@getDiscoverSliders'); | ||
cy.wait(1000); | ||
|
||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.first() | ||
.should('contain', sliderTitle); | ||
|
||
// Make sure its still there even if we reload | ||
cy.reload(); | ||
|
||
cy.get('[data-testid=discover-start-editing]').click(); | ||
|
||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.first() | ||
.should('contain', sliderTitle); | ||
|
||
// Verify it's not rendering on our discover page (its still disabled!) | ||
cy.visit('/'); | ||
|
||
cy.get('.slider-header').should('not.contain', sliderTitle); | ||
|
||
cy.get('[data-testid=discover-start-editing]').click(); | ||
|
||
// Enable it, and check again | ||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.first() | ||
.find('[role="checkbox"]') | ||
.click(); | ||
|
||
cy.get('[data-testid=discover-customize-submit').click(); | ||
cy.wait('@getDiscoverSliders'); | ||
|
||
cy.visit('/'); | ||
|
||
cy.contains('.slider-header', sliderTitle) | ||
.next('[data-testid=media-slider]') | ||
.find('[data-testid=title-card]'); | ||
|
||
cy.get('[data-testid=discover-start-editing]').click(); | ||
|
||
// let's delete it and confirm its deleted. | ||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.first() | ||
.find('[data-testid=discover-slider-remove-button]') | ||
.click(); | ||
|
||
cy.wait('@discoverSlider'); | ||
cy.wait('@getDiscoverSliders'); | ||
cy.wait(1000); | ||
|
||
cy.get('[data-testid=discover-slider-edit-mode]') | ||
.first() | ||
.should('not.contain', sliderTitle); | ||
}); | ||
}); |
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
Oops, something went wrong.