test: 💍 add missing tests for coverage

This commit is contained in:
Randall Morey committed 2020-07-31 19:04:30 -04:00
1 parent 5a6c50d6ae
commit aa7bf350d9
3 files changed
+39 -8

No files matched your search

+22 -1
View File
@@ -1 +1,22 @@
{{outlet}}
{{outlet}}
{{#unless @model}}
<Rose::Layout::Sidebar as |sidebarLayout|>
<sidebarLayout.body>
<main>
<Rose::Layout::Centered>
<Rose::Message
@title={{t "auth.titles.no-scopes"}}
@icon="alert-circle-outline"
as |message|>
<message.description>
{{t "auth.descriptions.no-scopes"}}
</message.description>
</Rose::Message>
</Rose::Layout::Centered>
</main>
</sidebarLayout.body>
</Rose::Layout::Sidebar>
{{/unless}}
@@ -50,6 +50,16 @@ module('Acceptance | authentication', function (hooks) {
projectsURL = `/scopes/${orgScopeID}/projects`;
});
test('visiting scopes when there are none shows a message', async function (assert) {
assert.expect(2);
this.server.get('/scopes', () => new Response(404));
await visit(scopesURL);
await a11yAudit();
assert.equal(currentURL(), scopesURL);
assert.ok(find('.rose-message'));
});
test('visiting auth methods authenticate route redirects to first auth method', async function (assert) {
assert.expect(1);
await visit(authenticateURL);
+7 -7
View File
@@ -6,16 +6,16 @@ actions:
help: Need help?
authenticate: Authenticate
deauthenticate: Deauthenticate
choose-org: Choose Org
choose-different-org: Choose a Different Org
choose-org: Choose Scope
choose-different-org: Choose a Different Scope
auth:
titles:
no-orgs: No Organizations Available
no-scopes: No Scopes Available
no-methods: No Authentication Method
descriptions:
no-orgs: No organizations were found. To authenticate, ask your administrator to create an organization and grant you access.
no-methods: No authentication methods were found for this organization. Switch organizations and try again.
choose-org: Choose an organization to authenticate.
no-scopes: No scopes were found. To authenticate, ask your administrator to create an scope and grant you access.
no-methods: No authentication methods were found for this scope. Switch scopes and try again.
choose-org: Choose a scope to authenticate.
authenticating-with-org: "You're authenticating with {name}."
method-types:
password: Password
@@ -84,7 +84,7 @@ notify:
save-success: Saved succesfully.
delete-success: Deleted successfully.
dev:
default-org: Default Org
default-org: Default Scope
menu-item: Menu item
button-menu-item: Button menu item
section: Section