Icu 8801 update settings icon to link in target edit screen (#188)

* refactor: 💡 update settings icon to link in target edit screen

* style: 💄 whitespace

✅ Closes: ICU-8801

* test: 💍 remove unnecessary a11yAudit() check

* test: 💍 fix test

* refactor: 💡 fix translation

* refactor: 💡 settings link shouldn't be visible under button
This commit is contained in:
lisbet-alvarez authored and GitHub committed 2023-04-06 10:45:19 -07:00
1 parent affcb420c7
commit 33af4cd7ea
7 files changed
+32 -40

No files matched your search

+15 -7
View File
@@ -21,7 +21,10 @@ module('Acceptance | targets | read', function (hooks) {
setupMirage(hooks);
let featuresService;
const SETTINGS_LINK_SELECTOR = '.target-sidebar .hds-link-standalone';
const ENABLE_BUTTON_SELECTOR = '.target-sidebar .hds-button';
const LINK_LIST_SELECTOR = '.link-list-item';
const instances = {
scopes: {
global: null,
@@ -207,16 +210,17 @@ module('Acceptance | targets | read', function (hooks) {
await visit(urls.sshTarget);
assert.dom('.target-sidebar a').doesNotExist();
assert.dom(ENABLE_BUTTON_SELECTOR).doesNotExist();
});
test('users can click on enable-recording button in target session-recording sidebar and it takes them to enable session recording', async function (assert) {
featuresService.enable('session-recording');
assert.expect(1);
assert.expect(2);
await visit(urls.sshTarget);
await click('.target-sidebar a');
assert.dom(SETTINGS_LINK_SELECTOR).doesNotExist();
await click(ENABLE_BUTTON_SELECTOR);
assert.strictEqual(currentURL(), urls.enableSessionRecording);
});
@@ -233,13 +237,17 @@ module('Acceptance | targets | read', function (hooks) {
assert.strictEqual(currentURL(), urls.storageBucket);
});
test('users can click on settings icon in target session-recording sidebar and it takes them to enable session recording', async function (assert) {
test('users can click on settings link in target session-recording sidebar and it takes them to enable session recording', async function (assert) {
featuresService.enable('session-recording');
assert.expect(1);
featuresService.enable('ssh-target');
featuresService.enable('session-recording');
instances.sshTarget.update({ storageBucketId: instances.storageBucket.id });
await visit(urls.targets);
await visit(urls.sshTarget);
await click(`[href="${urls.sshTarget}"]`);
await click(SETTINGS_LINK_SELECTOR);
await click('.target-sidebar .title-wrapper a');
assert.strictEqual(currentURL(), urls.enableSessionRecording);
});
});
@@ -20,7 +20,7 @@ module('Integration | Component | link-list-panel/index', function (hooks) {
`);
assert.dom('[data-test-icon="cloud-upload"]').isVisible();
assert.dom('[data-test-icon="chevron-right"]').isVisible();
assert.dom('[data-test-icon="arrow-right"]').isVisible();
assert.dom('[data-test-icon="aws-color"]').isVisible();
assert.dom('.hds-badge__text').hasText('AWS S3');
assert.dom('.link-list-item__text').hasText('Storage Bucket');