Convert server side paths to use /u/

This commit is contained in:
Robin Ward
2017-03-28 14:27:54 -04:00
parent 45a257815a
commit 14410b71fb
38 changed files with 82 additions and 80 deletions

View File

@@ -30,7 +30,7 @@ acceptance("Password Reset", {
test("Password Reset Page", () => {
PreloadStore.store('password_reset', {is_developer: false});
visit("/users/password-reset/myvalidtoken");
visit("/u/password-reset/myvalidtoken");
andThen(() => {
ok(exists(".password-reset input"), "shows the input");
});

View File

@@ -35,7 +35,7 @@ acceptance("Plugin Outlet - Connector Class", {
});
test("Renders a template into the outlet", assert => {
visit("/users/eviltrout");
visit("/u/eviltrout");
andThen(() => {
assert.ok(find('.user-profile-primary-outlet.hello').length === 1, 'it has class names');
assert.ok(!find('.user-profile-primary-outlet.dont-render').length, "doesn't render");

View File

@@ -19,7 +19,7 @@ acceptance("Plugin Outlet - Multi Template", {
});
test("Renders a template into the outlet", assert => {
visit("/users/eviltrout");
visit("/u/eviltrout");
andThen(() => {
assert.ok(find('.user-profile-primary-outlet.hello').length === 1, 'it has class names');
assert.ok(find('.user-profile-primary-outlet.goodbye').length === 1, 'it has class names');

View File

@@ -14,7 +14,7 @@ acceptance("Plugin Outlet - Single Template", {
});
test("Renders a template into the outlet", assert => {
visit("/users/eviltrout");
visit("/u/eviltrout");
andThen(() => {
assert.ok(find('.user-profile-primary-outlet.hello').length === 1, 'it has class names');
assert.equal(find('.hello-username').text(), 'eviltrout', 'it renders into the outlet');

View File

@@ -2,11 +2,11 @@ import { acceptance } from "helpers/qunit-helpers";
acceptance("User Preferences", { loggedIn: true });
test("update some fields", () => {
visit("/users/eviltrout/preferences");
visit("/u/eviltrout/preferences");
andThen(() => {
ok($('body.user-preferences-page').length, "has the body class");
equal(currentURL(), '/users/eviltrout/preferences', "it doesn't redirect");
equal(currentURL(), '/u/eviltrout/preferences', "it doesn't redirect");
ok(exists('.user-preferences'), 'it shows the preferences');
});
@@ -20,21 +20,21 @@ test("update some fields", () => {
});
test("username", () => {
visit("/users/eviltrout/preferences/username");
visit("/u/eviltrout/preferences/username");
andThen(() => {
ok(exists("#change_username"), "it has the input element");
});
});
test("about me", () => {
visit("/users/eviltrout/preferences/about-me");
visit("/u/eviltrout/preferences/about-me");
andThen(() => {
ok(exists(".raw-bio"), "it has the input element");
});
});
test("email", () => {
visit("/users/eviltrout/preferences/email");
visit("/u/eviltrout/preferences/email");
andThen(() => {
ok(exists("#change-email"), "it has the input element");
});

View File

@@ -40,7 +40,7 @@ test("search scope checkbox", () => {
});
click('#search-button');
visit("/users/eviltrout");
visit("/u/eviltrout");
click('#search-button');
andThen(() => {
ok(exists('.search-context input:checked'), 'scope to user checkbox is checked');

View File

@@ -16,7 +16,7 @@ function hasTopicList() {
}
test("Root URL", () => {
visit("/users/eviltrout");
visit("/u/eviltrout");
andThen(() => {
ok($('body.user-summary-page').length, "has the body class");
equal(currentPath(), 'user.summary', "it defaults to summary");
@@ -24,21 +24,21 @@ test("Root URL", () => {
});
test("Filters", () => {
visit("/users/eviltrout/activity");
visit("/u/eviltrout/activity");
andThen(() => {
ok($('body.user-activity-page').length, "has the body class");
});
hasStream();
visit("/users/eviltrout/activity/topics");
visit("/u/eviltrout/activity/topics");
hasTopicList();
visit("/users/eviltrout/activity/replies");
visit("/u/eviltrout/activity/replies");
hasStream();
});
test("Badges", () => {
visit("/users/eviltrout/badges");
visit("/u/eviltrout/badges");
andThen(() => {
ok($('body.user-badges-page').length, "has the body class");
ok(exists(".user-badges-list .badge-card"), "shows a badge");
@@ -46,7 +46,7 @@ test("Badges", () => {
});
test("Restricted Routes", () => {
visit("/users/eviltrout/preferences");
visit("/u/eviltrout/preferences");
andThen(() => {
equal(currentURL(), '/u/eviltrout/activity', "it redirects from preferences");

View File

@@ -3,28 +3,28 @@ import { acceptance } from "helpers/qunit-helpers";
acceptance("User", {loggedIn: true});
test("Invites", () => {
visit("/users/eviltrout/invited/pending");
visit("/u/eviltrout/invited/pending");
andThen(() => {
ok($('body.user-invites-page').length, "has the body class");
});
});
test("Messages", () => {
visit("/users/eviltrout/messages");
visit("/u/eviltrout/messages");
andThen(() => {
ok($('body.user-messages-page').length, "has the body class");
});
});
test("Notifications", () => {
visit("/users/eviltrout/notifications");
visit("/u/eviltrout/notifications");
andThen(() => {
ok($('body.user-notifications-page').length, "has the body class");
});
});
test("Root URL - Viewing Self", () => {
visit("/users/eviltrout");
visit("/u/eviltrout");
andThen(() => {
ok($('body.user-activity-page').length, "has the body class");
equal(currentPath(), 'user.userActivity.index', "it defaults to activity");