Fixed test to adapt to SubsPlease

This commit is contained in:
Kylart 2021-08-31 17:40:20 +02:00
parent 32f75688f3
commit ae14147505
1 changed files with 9 additions and 9 deletions

View File

@ -14,7 +14,7 @@ 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')
.$('.downloader #name').addValue('Vanitas no Carte')
.keys(['Tab'])
.$('.downloader #from').hasFocus().should.eventually.be.true
.$('.downloader #from').addValue('4')
@ -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 () {