From 2aa5790c1e28c65dea29aab10fcad1b91e35fb84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ja=CC=81n=20Mikla=CC=81s=CC=8C?= Date: Mon, 12 Oct 2020 14:58:01 +0200 Subject: [PATCH] Fix acceptance tests [MAILPOET-2780] --- assets/js/src/subscribers/heading.jsx | 2 +- tests/acceptance/SaveNotificationAsDraftCest.php | 2 +- tests/acceptance/SubscriberManagementCest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/src/subscribers/heading.jsx b/assets/js/src/subscribers/heading.jsx index a844968b02..fb8f6c96f3 100644 --- a/assets/js/src/subscribers/heading.jsx +++ b/assets/js/src/subscribers/heading.jsx @@ -18,7 +18,7 @@ const SubscribersHeading = ({ history, location }) => ( }} > {plusIcon} - {MailPoet.I18n.t('new')} + {MailPoet.I18n.t('new')} click($saveAsDraftButton); $i->waitForElement('[data-automation-id="newsletters_listing_tabs"]'); $i->waitForText('Draft Test Post Notification'); - $i->waitForText('Not Active'); + $i->dontSeeCheckboxIsChecked('.mailpoet-form-toggle input[type="checkbox"]'); } } diff --git a/tests/acceptance/SubscriberManagementCest.php b/tests/acceptance/SubscriberManagementCest.php index e80e9835b4..6f5dd3e590 100644 --- a/tests/acceptance/SubscriberManagementCest.php +++ b/tests/acceptance/SubscriberManagementCest.php @@ -65,7 +65,7 @@ class SubscriberManagementCest { $i->wantTo('Add a user to global subscribers list'); $i->login(); $i->amOnMailPoetPage ('Subscribers'); - $i->click(['xpath' => '//*[@id="subscribers_container"]/div/h1/a[1]']); + $i->click('[data-automation-id="add-new-subscribers-button"]'); $i->fillField(['name' => 'email'], 'newglobaluser99@fakemail.fake'); $i->fillField(['name' => 'first_name'], 'New'); $i->fillField(['name' => 'last_name'], 'GlobalUser');