From a7d1d5a9fb6df5a9ade2884febc78b5d3729c23c Mon Sep 17 00:00:00 2001 From: merefield Date: Thu, 16 Nov 2023 17:57:07 +0000 Subject: [PATCH] fix more FE tests --- .../admin-wizards-unsubscribed-test.js | 20 ++++++++++--------- test/javascripts/acceptance/field-test.js | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/test/javascripts/acceptance/admin-wizards-unsubscribed-test.js b/test/javascripts/acceptance/admin-wizards-unsubscribed-test.js index 973f5b1e..d186440d 100644 --- a/test/javascripts/acceptance/admin-wizards-unsubscribed-test.js +++ b/test/javascripts/acceptance/admin-wizards-unsubscribed-test.js @@ -260,11 +260,11 @@ acceptance("Admin | Custom Wizard Unsubscribed", function (needs) { await click( ".wizard-custom-step .wizard-text-editor .d-editor button.link" ); - assert.ok(exists(".insert-link.modal-body"), "hyperlink modal visible"); + assert.ok(exists(".d-modal.insert-hyperlink-modal"), "hyperlink modal visible"); - await fillIn(".modal-body .link-url", "google.com"); - await fillIn(".modal-body .link-text", "Google"); - await click(".modal-footer button.btn-primary"); + await fillIn(".d-modal__body.insert-link .inputs .link-url", "google.com"); + await fillIn(".d-modal__body.insert-link .inputs .link-text", "Google"); + await click(".d-modal__footer button.btn-primary"); let urlText = await query( ".wizard-custom-step .wizard-text-editor .d-editor-preview-wrapper a" ).innerHTML.trim(); @@ -276,24 +276,26 @@ acceptance("Admin | Custom Wizard Unsubscribed", function (needs) { await click( ".wizard-custom-step .wizard-text-editor .d-editor button.local-dates" ); + assert.ok( - exists(".discourse-local-dates-create-modal .modal-body"), + exists(".d-modal.discourse-local-dates-create-modal"), "Insert date-time modal visible" ); + assert.ok( !exists( - ".discourse-local-dates-create-modal.modal-body .advanced-options" + ".discourse-local-dates-create-modal .d-modal__body .advanced-options" ), "Advanced mode not visible" ); - await click(".modal-footer button.advanced-mode-btn"); + await click(".d-modal__footer button.advanced-mode-btn"); assert.ok( exists( - ".discourse-local-dates-create-modal .modal-body .advanced-options" + ".discourse-local-dates-create-modal .d-modal__body .advanced-options" ), "Advanced mode is visible" ); - await click(".modal-footer button.btn-primary"); + await click(".d-modal__footer button.btn-primary"); assert.ok( exists( ".wizard-custom-step .wizard-text-editor .d-editor-preview-wrapper span.discourse-local-date" diff --git a/test/javascripts/acceptance/field-test.js b/test/javascripts/acceptance/field-test.js index e9094836..67ef8c38 100644 --- a/test/javascripts/acceptance/field-test.js +++ b/test/javascripts/acceptance/field-test.js @@ -68,7 +68,7 @@ acceptance("Field | Fields", function (needs) { "This is a link to " ); assert.ok( - !exists(".insert-link.modal-body"), + !exists(".d-modal.insert-hyperlink-modal"), "no hyperlink modal by default" ); await click(