From ae14147505d348a30ec48393ebcf158d440df9c0 Mon Sep 17 00:00:00 2001 From: Kylart Date: Tue, 31 Aug 2021 17:40:20 +0200 Subject: [PATCH] Fixed test to adapt to SubsPlease --- test/app/downloader.spec.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/app/downloader.spec.js b/test/app/downloader.spec.js index f5a0fed..3157f29 100644 --- a/test/app/downloader.spec.js +++ b/test/app/downloader.spec.js @@ -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 () {