Merge feature/t1249-fix-leaderboard-test: fix unit test after moving the friends fetch (t1249)
@@ -13,6 +13,7 @@ const css = fs.readFileSync(path.join(root, 'build/style.css'), 'utf8');
13
13
const main = fs.readFileSync(path.join(root, 'src/main.js'), 'utf8');
14
14
const online = fs.readFileSync(path.join(root, 'src/online.js'), 'utf8');
15
15
const api = fs.readFileSync(path.join(root, 'server/api.php'), 'utf8');
16
const boot = fs.readFileSync(path.join(root, 'server/lib/bootstrap.php'), 'utf8');
16
17
const buildSh = fs.readFileSync(path.join(root, 'src/build.sh'), 'utf8');
17
18
18
19
describe('Leaderboard wiring (t1247)', () =>
@@ -49,7 +50,8 @@ describe('Leaderboard wiring (t1247)', () =>
49
50
assert.match(main, /Avatar\.piece/);
50
51
assert.match(main, /tab === 'friends' && !loggedIn/);
51
52
assert.match(api, /action === 'leaderboard'/);
52
assert.match(api, /authRequest\('\/api\/friends'/);
53
assert.match(api, /leaderboardKnownIdentities\(/);
54
assert.match(boot, /authRequest\('\/api\/friends'/);
53
55
assert.match(buildSh, /avatar\.js/);
54
56
});
55
57
@@ -13,6 +13,7 @@ const css = fs.readFileSync(path.join(root, 'build/style.css'), 'utf8');13
const main = fs.readFileSync(path.join(root, 'src/main.js'), 'utf8');13
const main = fs.readFileSync(path.join(root, 'src/main.js'), 'utf8');14
const online = fs.readFileSync(path.join(root, 'src/online.js'), 'utf8');14
const online = fs.readFileSync(path.join(root, 'src/online.js'), 'utf8');15
const api = fs.readFileSync(path.join(root, 'server/api.php'), 'utf8');15
const api = fs.readFileSync(path.join(root, 'server/api.php'), 'utf8');16
const boot = fs.readFileSync(path.join(root, 'server/lib/bootstrap.php'), 'utf8');16
const buildSh = fs.readFileSync(path.join(root, 'src/build.sh'), 'utf8');17
const buildSh = fs.readFileSync(path.join(root, 'src/build.sh'), 'utf8');17
18
18
describe('Leaderboard wiring (t1247)', () =>19
describe('Leaderboard wiring (t1247)', () =>@@ -49,7 +50,8 @@ describe('Leaderboard wiring (t1247)', () =>49
assert.match(main, /Avatar\.piece/);50
assert.match(main, /Avatar\.piece/);50
assert.match(main, /tab === 'friends' && !loggedIn/);51
assert.match(main, /tab === 'friends' && !loggedIn/);51
assert.match(api, /action === 'leaderboard'/);52
assert.match(api, /action === 'leaderboard'/);52
assert.match(api, /authRequest\('\/api\/friends'/);53
assert.match(api, /leaderboardKnownIdentities\(/);54
assert.match(boot, /authRequest\('\/api\/friends'/);53
assert.match(buildSh, /avatar\.js/);55
assert.match(buildSh, /avatar\.js/);54
});56
});55
57