refactor: 💡 Update routing to use project id in quick-start (#1140)

✅ Closes: ICU-4821
This commit is contained in:
Cameron Perera authored and GitHub committed 2022-06-15 15:06:09 -05:00
1 parent 7d8012ef1f
commit f3a5ef5b7c
2 files changed
+4 -4

No files matched your search

@@ -88,7 +88,7 @@ export default class OnboardingQuickSetupCreateResourcesRoute extends Route {
} else {
this.router.transitionTo(
'scopes.scope.host-catalogs.host-catalog.hosts',
org.id,
project.id,
hostCatalog.id
);
}
@@ -40,10 +40,10 @@ module('Acceptance | onboarding | create-resources', function (hooks) {
assert.expect(1);
await visit(urls.createResources);
await click('[type="submit"]');
const projectScopeId = this.server.schema.scopes.where({ type: 'project' })
.models[0].scopeId;
const projectId = this.server.schema.scopes.where({ type: 'project' })
.models[0].id;
const hostCatalogId = this.server.schema.hostCatalogs.all().models[0].id;
urls.hostCatalogPath = `/scopes/${projectScopeId}/host-catalogs/${hostCatalogId}/hosts`;
urls.hostCatalogPath = `/scopes/${projectId}/host-catalogs/${hostCatalogId}/hosts`;
assert.equal(currentURL(), urls.hostCatalogPath);
});
});