refactor: 💅 Use common selector ALERT_TOAST_BODY across test suite (#2692)

* replace with alert toast body, replace with this.server.schema

* revert changes to db,schema

* use common selector, alert toast body

* replace ERROR_MSG_SELECTOR with common selector ALERT_TOAST_BODY
This commit is contained in:
Lauren authored and GitHub committed 2025-02-13 15:54:40 -05:00
1 parent 20c4bbcee2
commit f12ae90aba
45 files changed
+124 -138

No files matched your search

@@ -10,6 +10,7 @@ import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
import { setupIndexedDb } from 'api/test-support/helpers/indexed-db';
import { Response } from 'miragejs';
import { authenticateSession } from 'ember-simple-auth/test-support';
import * as commonSelectors from 'admin/tests/helpers/selectors';
module('Acceptance | users | create', function (hooks) {
setupApplicationTest(hooks);
@@ -135,7 +136,7 @@ module('Acceptance | users | create', function (hooks) {
assert.strictEqual(getUsersCount(), usersCount);
assert
.dom('[data-test-toast-notification] .hds-alert__description')
.dom(commonSelectors.ALERT_TOAST_BODY)
.hasText('The request was invalid.');
assert.dom('[data-test-error-message-name]').hasText('Name is required.');
});