From e34a1054a2e015466054be49693cdc2834582c09 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 31 Mar 2018 22:08:24 -0700 Subject: [PATCH] fix tests --- tests/spec/002-login-spec.js | 2 +- tests/spec/108-compose-dialog.js | 4 ++-- tests/utils.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/spec/002-login-spec.js b/tests/spec/002-login-spec.js index 77d10be7..ec2d5e2f 100644 --- a/tests/spec/002-login-spec.js +++ b/tests/spec/002-login-spec.js @@ -49,7 +49,7 @@ test('Logs in and logs out of localhost:3000', async t => { .expect($('.acct-handle').innerText).eql('@foobar') .expect($('.acct-display-name').innerText).eql('foobar') .click($('button').withText('Log out')) - .click($('#modal-dialog button').withText('OK')) + .click($('.modal-dialog button').withText('OK')) .expect($('.container').innerText) .contains("You're not logged in to any instances") }) diff --git a/tests/spec/108-compose-dialog.js b/tests/spec/108-compose-dialog.js index 1dbe0f3f..516de283 100644 --- a/tests/spec/108-compose-dialog.js +++ b/tests/spec/108-compose-dialog.js @@ -10,14 +10,14 @@ fixture`108-compose-dialog.js` test('can compose using a dialog', async t => { await t.useRole(foobarRole) await scrollToStatus(t, 15) - await t.expect(modalDialog.getAttribute('aria-hidden')).eql('true') + await t.expect(modalDialog.exists).notOk() .expect(composeButton.getAttribute('aria-label')).eql('Compose') await sleep(2000) await t.click(composeButton) .expect(modalDialog.hasAttribute('aria-hidden')).notOk() .typeText(modalDialog.find('.compose-box-input'), 'hello from the modal') .click(modalDialog.find('.compose-box-button-compose')) - .expect(modalDialog.getAttribute('aria-hidden')).eql('true') + .expect(modalDialog.exists).notOk() await sleep(5000) await scrollToTopOfTimeline(t) await t.hover(getNthStatus(0)) diff --git a/tests/utils.js b/tests/utils.js index 778c01d2..d11bc87d 100644 --- a/tests/utils.js +++ b/tests/utils.js @@ -6,7 +6,7 @@ const SCROLL_INTERVAL = 3 export const settingsButton = $('nav a[aria-label=Settings]') export const instanceInput = $('#instanceInput') -export const modalDialog = $('#modal-dialog') +export const modalDialog = $('.modal-dialog') export const modalDialogContents = $('.modal-dialog-contents') export const closeDialogButton = $('.close-dialog-button') export const notificationsNavButton = $('nav a[href="/notifications"]')