* chore: 🤖 upgrade ember-data to v5.3.11 * Add missing copyright headers * refactor: 💡 remove comment * chore: 🤖 update yarn.lock due to merge conflict ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * fix: 🐛 undo ember-source upgrade (should be upgraded w/ ember) ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * chore: 🤖 move dep to devDeps & resolve test-helper version ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * fix: 🐛 unique record id error bug fix using store.push ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * refactor: 💡 cleanup ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * Delete old deprecation initializer (#2748) * refactor: 💡 import from'ember-data/store' ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * refactor: 💡 clean up comments ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * refactor: 💡 remove compatWith comment ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 --------- Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
59 lines
1.7 KiB
JavaScript
59 lines
1.7 KiB
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { module, test } from 'qunit';
|
|
import { setupApplicationTest } from 'admin/tests/helpers';
|
|
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
|
|
import { authenticateSession } from 'ember-simple-auth/test-support';
|
|
import { visit, fillIn, click, currentURL } from '@ember/test-helpers';
|
|
import * as commonSelectors from 'admin/tests/helpers/selectors';
|
|
import * as selectors from './selectors';
|
|
|
|
module('Acceptance | onboarding', function (hooks) {
|
|
setupApplicationTest(hooks);
|
|
setupMirage(hooks);
|
|
|
|
const urls = {
|
|
onboarding: '/onboarding',
|
|
success: '/onboarding/success',
|
|
orgs: '/scopes/global/scopes',
|
|
};
|
|
|
|
hooks.beforeEach(async function () {
|
|
await authenticateSession({});
|
|
});
|
|
|
|
test('show targetAddress and targetPort fields', async function (assert) {
|
|
await visit(urls.onboarding);
|
|
|
|
assert.dom(selectors.FIELD_TARGET_ADDRESS).isVisible();
|
|
assert.dom(selectors.FIELD_TARGET_PORT).isVisible();
|
|
});
|
|
|
|
test('redirect user to success when fill targetAddress, targetPort and click Save', async function (assert) {
|
|
await visit(urls.onboarding);
|
|
|
|
await fillIn(
|
|
selectors.FIELD_TARGET_ADDRESS,
|
|
selectors.FIELD_TARGET_ADDRESS_VALUE,
|
|
);
|
|
await fillIn(
|
|
selectors.FIELD_TARGET_PORT,
|
|
selectors.FIELD_TARGET_PORT_VALUE,
|
|
);
|
|
await click(commonSelectors.SAVE_BTN);
|
|
|
|
assert.strictEqual(currentURL(), urls.success);
|
|
});
|
|
|
|
test('redirect user to orgs screen when click do this later', async function (assert) {
|
|
await visit(urls.onboarding);
|
|
|
|
await click(selectors.DO_THIS_LATER_BTN);
|
|
|
|
assert.strictEqual(currentURL(), urls.orgs);
|
|
});
|
|
});
|