refactor: 💡 Update Quick Setup Success screen button route (#1330)
Route to Target details screen now
✅ Closes: ICU-6096
This commit is contained in:
1 parent
82bbe798fd
commit
f143ba3d58
2 files changed
+6
-5
No files matched your search
@@ -31,7 +31,8 @@ export default class OnboardingQuickSetupCreateResourcesSuccessRoute extends Rou
|
||||
showTargetList(scope) {
|
||||
const {
|
||||
project: { id: scopeID },
|
||||
target: { id: targetID },
|
||||
} = scope;
|
||||
this.router.transitionTo('scopes.scope.targets', scopeID);
|
||||
this.router.transitionTo('scopes.scope.targets.target', scopeID, targetID);
|
||||
}
|
||||
}
|
||||
@@ -36,18 +36,18 @@ module(
|
||||
);
|
||||
});
|
||||
|
||||
test('redirect user to targets list when done is clicked', async function (assert) {
|
||||
test('redirect user to targets details when done is clicked', async function (assert) {
|
||||
assert.expect(1);
|
||||
await visit(urls.createResources);
|
||||
await click('[type="checkbox"]');
|
||||
await fillIn('[name="hostAddress"]', '0.0.0.0');
|
||||
await fillIn('[name="targetPort"]', '22');
|
||||
await click('[type="submit"]');
|
||||
const projectId = this.server.schema.scopes.where({ type: 'project' })
|
||||
.models[0].id;
|
||||
const projectId = this.server.db.scopes.where({ type: 'project' })[0].id;
|
||||
const targetId = this.server.db.targets[0].id;
|
||||
await visit(urls.successPath);
|
||||
await click('.onboarding-quick-setup-success-button');
|
||||
urls.targetsPath = `/scopes/${projectId}/targets`;
|
||||
urls.targetsPath = `/scopes/${projectId}/targets/${targetId}`;
|
||||
assert.strictEqual(currentURL(), urls.targetsPath);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user