chore: 🤖 add related test for target sidebar (#166)
* chore: 🤖 add related test for target sidebar Add related acceptance test for `session-recording` sidebar integration into `target` form. ✅ Closes: ICU-8590 * Update read-test.js * refactor: 💡 fix test Fix failing test for sidebar component. * Update ui/admin/tests/acceptance/targets/read-test.js Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> * Update ui/admin/tests/acceptance/targets/read-test.js Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> --------- Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
This commit is contained in:
1 parent
60de33598a
commit
ae66e68bad
1 file changed
+20
@@ -38,6 +38,7 @@ module('Acceptance | targets | read', function (hooks) {
|
||||
targets: null,
|
||||
sshTarget: null,
|
||||
tcpTarget: null,
|
||||
enableSessionRecording: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
@@ -68,6 +69,7 @@ module('Acceptance | targets | read', function (hooks) {
|
||||
urls.sshTarget = `${urls.targets}/${instances.sshTarget.id}`;
|
||||
urls.tcpTarget = `${urls.targets}/${instances.tcpTarget.id}`;
|
||||
urls.unknownTarget = `${urls.targets}/foo`;
|
||||
urls.enableSessionRecording = `${urls.sshTarget}/enable-session-recording`;
|
||||
|
||||
authenticateSession({});
|
||||
});
|
||||
@@ -190,4 +192,22 @@ module('Acceptance | targets | read', function (hooks) {
|
||||
.dom(`[href="https://boundaryproject.io/help/admin-ui/targets"]`)
|
||||
.exists();
|
||||
});
|
||||
|
||||
test('users can click on enable-recording button in target session-recording sidebar and it takes them to enable session recording', async function (assert) {
|
||||
assert.expect(1);
|
||||
|
||||
await visit(urls.sshTarget);
|
||||
|
||||
await click('.target-sidebar a');
|
||||
assert.strictEqual(currentURL(), urls.enableSessionRecording);
|
||||
});
|
||||
|
||||
test('users can click on settings icon in target session-recording sidebar and it takes them to enable session recording', async function (assert) {
|
||||
assert.expect(1);
|
||||
|
||||
await visit(urls.sshTarget);
|
||||
|
||||
await click('.target-sidebar .title-wrapper a');
|
||||
assert.strictEqual(currentURL(), urls.enableSessionRecording);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user