mirror of https://github.com/Kylart/KawAnime.git
Fixed test to adapt to SubsPlease
This commit is contained in:
parent
32f75688f3
commit
ae14147505
|
@ -14,17 +14,17 @@ module.exports = function () {
|
|||
it('should fill in the form and show the magnet modal', function () {
|
||||
return this.app.client
|
||||
.$('.downloader #name').hasFocus().should.eventually.be.true
|
||||
.$('.downloader #name').addValue('Sakura Trick')
|
||||
.keys([ 'Tab' ])
|
||||
.$('.downloader #name').addValue('Vanitas no Carte')
|
||||
.keys(['Tab'])
|
||||
.$('.downloader #from').hasFocus().should.eventually.be.true
|
||||
.$('.downloader #from').addValue('4')
|
||||
.keys([ 'Tab' ])
|
||||
.keys(['Tab'])
|
||||
.$('.downloader #until').hasFocus().should.eventually.be.true
|
||||
.$('.downloader #until').addValue('8')
|
||||
.keys([ 'Tab', 'ArrowRight', 'ArrowLeft', 'ArrowLeft', 'ArrowRight', 'ArrowRight' ]) // Should select 1080p quality
|
||||
.keys(['Tab', 'ArrowRight', 'ArrowLeft', 'ArrowLeft', 'ArrowRight', 'ArrowRight']) // Should select 1080p quality
|
||||
.$('.qualities div[role="radiogroup"] div:nth-child(4) input').hasFocus().should.eventually.be.true
|
||||
.saveScreenshot('test/screenshots/downloader_modal_filled.png')
|
||||
.keys([ 'Tab', 'Enter' ])
|
||||
.keys(['Tab', 'Enter'])
|
||||
.waitUntil(() => this.app.client.$('#magnet-modal').isVisible(), 10000)
|
||||
.pause(500)
|
||||
.isVisible('.qualities').should.eventually.be.false
|
||||
|
@ -36,14 +36,14 @@ module.exports = function () {
|
|||
it('should open the magnet modal with the correct magnets', function () {
|
||||
return this.app.client
|
||||
.saveScreenshot('test/screenshots/downloader_results.png')
|
||||
.getText('#magnet-modal').should.eventually.include('Results for Sakura Trick')
|
||||
.getText('#magnet-modal').should.eventually.include('Results for Vanitas no Carte')
|
||||
.$('#magnet-modal div:nth-child(3) > div > div > button').click()
|
||||
.waitUntil(async () => (await this.app.client.$('#magnet-modal div:nth-child(3) > div > div').getAttribute('aria-expanded')) === 'true')
|
||||
.pause(500)
|
||||
.saveScreenshot('test/screenshots/downloader_results_expanded.png')
|
||||
.getText('#magnet-modal > div:nth-child(3) > div > div > div > div > div:nth-child(5)').should.eventually.include('Sakura Trick - Ep. 4')
|
||||
.getText('#magnet-modal > div:nth-child(3) > div > div > div > div > div:nth-child(1)').should.eventually.include('Sakura Trick - Ep. 8')
|
||||
.getText('#magnet-modal > div:nth-child(3) > div > div > div > div > div:nth-child(2)').should.eventually.include('Sakura Trick - Ep. 7')
|
||||
.getText('#magnet-modal > div:nth-child(3) > div > div > div > div > div:nth-child(5)').should.eventually.include('Vanitas no Carte - Ep. 4')
|
||||
.getText('#magnet-modal > div:nth-child(3) > div > div > div > div > div:nth-child(1)').should.eventually.include('Vanitas no Carte - Ep. 8')
|
||||
.getText('#magnet-modal > div:nth-child(3) > div > div > div > div > div:nth-child(2)').should.eventually.include('Vanitas no Carte - Ep. 7')
|
||||
})
|
||||
|
||||
it('should close the magnet modal when hitting the escape key', async function () {
|
||||
|
|
Loading…
Reference in New Issue