docs: Make registration text more friendly.

This commit is contained in:
Ruben Verborgh 2021-07-23 14:38:09 +02:00
parent 3bb7a32c0c
commit 705a06633e
2 changed files with 35 additions and 30 deletions

View File

@ -13,30 +13,45 @@
</header>
<main>
<h1>You are signed up</h1>
<% if (createWebId) { %>
<p>
<strong>Welcome to Solid.</strong>
We wish you an exciting experience!
</p>
<% if (createPod) { %>
<h2>Your new pod</h2>
<p>
Your new WebID is <a href="<%= webId %>" class="link"><%= webId %></a>.
Your new pod is located at <a href="<%= podBaseUrl %>" class="link"><%= podBaseUrl %></a>.
<br>
You can store your documents and data there.
</p>
<% } %>
<% if (register) { %>
<% if (createWebId) { %>
<h2>Your new WebID</h2>
<p>
You can now identify as <a href="<%= webId %>" class="link"><%= webId %></a>
on this server using <em><%= email %></em>.
Your new WebID is <a href="<%= webId %>" class="link"><%= webId %></a>.
<br>
You can use this identifier to interact with Solid pods and apps.
</p>
<% } %>
<% if (register) { %>
<h2>Your new login</h2>
<p>
You can <a href="./login">log in</a>
with your WebID <a href="<%= webId %>" class="link"><%= webId %></a>
on this server via your email address <em><%= email %></em>.
</p>
<% if (!createWebId) { %>
<p>
Make sure you add the triple
You will need to add the triple
<code><%= `<${webId}> <http://www.w3.org/ns/solid/terms#oidcIssuer> <${oidcIssuer}>.`%></code>
to your WebID profile.
to your existing WebID document <em><%= webId %></em>
to indicate that you trust this server as a login provider for your WebID.
</p>
<% } %>
<% } %>
<% if (createPod) { %>
<p>
Your new pod has been created
and can be found at <a href="<%= podBaseUrl %>" class="link"><%= podBaseUrl %></a>.
</p>
<% } %>
</main>
<footer>
<p>

View File

@ -117,11 +117,9 @@ describe('A Solid server with IDP', (): void => {
const res = await postForm(`${baseUrl}idp/register`, formBody);
expect(res.status).toBe(200);
const text = await res.text();
expect(text).toMatch(new RegExp(`You can now identify as .*${webId}`, 'u'));
expect(text).toMatch(new RegExp(`on this server using <em>${email}</em>`, 'u'));
expect(text).toMatch(new RegExp(`Make sure you add the triple
\\s*<code>&lt;${webId}&gt; &lt;http://www.w3.org/ns/solid/terms#oidcIssuer&gt; &lt;${baseUrl}&gt;\\.</code>
\\s*to your WebID profile\\.`, 'mu'));
expect(text).toMatch(new RegExp(`your WebID.*${webId}`, 'u'));
expect(text).toMatch(new RegExp(`your email address.*${email}`, 'u'));
expect(text).toMatch(new RegExp(`<code>&lt;${webId}&gt; &lt;http://www.w3.org/ns/solid/terms#oidcIssuer&gt; &lt;${baseUrl}&gt;\\.</code>`, 'mu'));
});
});
@ -282,8 +280,7 @@ describe('A Solid server with IDP', (): void => {
const res = await postForm(`${baseUrl}idp/register`, formBody);
expect(res.status).toBe(200);
const text = await res.text();
expect(text).toMatch(new RegExp(`Your new pod has been created
\\s*and can be found at.*${baseUrl}${podName}/`, 'u'));
expect(text).toMatch(new RegExp(`Your new pod.*${baseUrl}${podName}/`, 'u'));
});
});
@ -291,7 +288,6 @@ describe('A Solid server with IDP', (): void => {
const podName = 'alice';
const newMail = 'alice@test.email';
let newWebId: string;
let podLocation: string;
let state: IdentityTestState;
const formBody = stringify({
@ -307,15 +303,9 @@ describe('A Solid server with IDP', (): void => {
expect(matchWebId).toBeDefined();
expect(matchWebId).toHaveLength(2);
newWebId = matchWebId![1];
expect(text).toMatch(new RegExp(`You can now identify as .*${newWebId}`, 'u'));
expect(text).toMatch(new RegExp(`on this server using <em>${newMail}</em>.`, 'u'));
const matchPod = /Your new pod has been created\n\s*and can be found at [^>]+>([^<]+)/u.exec(text);
expect(matchPod).toBeDefined();
expect(matchPod).toHaveLength(2);
podLocation = matchPod![1];
expect(newWebId.startsWith(podLocation)).toBe(true);
expect(podLocation.startsWith(baseUrl)).toBe(true);
expect(text).toMatch(new RegExp(`new WebID is.*${newWebId}`, 'u'));
expect(text).toMatch(new RegExp(`your email address.*${newMail}`, 'u'));
expect(text).toMatch(new RegExp(`Your new pod.*${baseUrl}${podName}/`, 'u'));
});
it('initializes the session and logs in.', async(): Promise<void> => {