Skip to content

Commit 9bce696

Browse files
committed
test: fix header leaderboard feature flag tests and add waitUntil
Update feature flag values from 'true' to 'test' to correctly simulate user permissions for showing leaderboard links. Add waitUntil in tests to wait for the leaderboard link to appear before asserting, improving test reliability. Also include a pauseTest call to aid debugging during test runs.
1 parent 2d7289e commit 9bce696

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/acceptance/header-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module('Acceptance | header-test', function (hooks) {
3232

3333
test('header should show generic leaderboard link if user has feature flag enabled and leaderboard entries', async function (assert) {
3434
const user = signIn(this.owner, this.server);
35-
user.update('featureFlags', { 'should-see-leaderboard': 'true' });
35+
user.update('featureFlags', { 'should-see-leaderboard': 'test' });
3636

3737
await catalogPage.visit();
3838
assert.true(catalogPage.header.hasLink('Leaderboard'), 'expect leaderboard link to be visible');
@@ -43,7 +43,7 @@ module('Acceptance | header-test', function (hooks) {
4343

4444
test('header should show custom leaderboard link if user has feature flag enabled', async function (assert) {
4545
const user = signIn(this.owner, this.server);
46-
user.update('featureFlags', { 'should-see-leaderboard': 'true' });
46+
user.update('featureFlags', { 'should-see-leaderboard': 'test' });
4747

4848
const python = this.server.schema.languages.findBy({ name: 'Python' });
4949

0 commit comments

Comments
 (0)