-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Réparer le style du pied de page de la mire de connexion (PI…
- Loading branch information
Showing
5 changed files
with
110 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
mon-pix/tests/integration/components/footer/footer-links-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import { render } from '@1024pix/ember-testing-library'; | ||
import Service from '@ember/service'; | ||
import { hbs } from 'ember-cli-htmlbars'; | ||
import { t } from 'ember-intl/test-support'; | ||
import { module, test } from 'qunit'; | ||
|
||
import setupIntlRenderingTest from '../../../helpers/setup-intl-rendering'; | ||
|
||
module('Integration | Component | Footer', function (hooks) { | ||
setupIntlRenderingTest(hooks); | ||
|
||
test('displays a navigation with a list of links', async function (assert) { | ||
// when | ||
const screen = await render(hbs`<Footer::FooterLinks />`); | ||
|
||
// then | ||
assert.dom(screen.getByRole('navigation')).hasAttribute('aria-label', t('navigation.footer.label')); | ||
|
||
assert.ok(screen.getByRole('link', { name: t('navigation.footer.help-center') })); | ||
assert.ok(screen.getByRole('link', { name: t('navigation.footer.a11y') })); | ||
assert.ok(screen.getByRole('link', { name: t('navigation.footer.server-status') })); | ||
assert.ok(screen.getByRole('link', { name: t('navigation.footer.eula') })); | ||
assert.ok(screen.getByRole('link', { name: t('navigation.footer.legal-notice') })); | ||
assert.ok(screen.getByRole('link', { name: t('navigation.footer.data-protection-policy') })); | ||
}); | ||
|
||
module('when user is connected', function (hooks) { | ||
hooks.beforeEach(function () { | ||
class CurrentUserStub extends Service { | ||
user = { fullName: 'John Doe' }; | ||
} | ||
|
||
this.owner.register('service:currentUser', CurrentUserStub); | ||
}); | ||
|
||
test('displays the sitemap link', async function (assert) { | ||
// when | ||
const screen = await render(hbs`<Footer::FooterLinks />`); | ||
|
||
// then | ||
assert.ok(screen.getByRole('link', { name: t('navigation.footer.sitemap') })); | ||
}); | ||
}); | ||
|
||
module('when url does not have frenchDomainExtension', function (hooks) { | ||
hooks.beforeEach(function () { | ||
class CurrentDomainServiceStub extends Service { | ||
get isFranceDomain() { | ||
return false; | ||
} | ||
} | ||
|
||
this.owner.register('service:currentDomain', CurrentDomainServiceStub); | ||
}); | ||
|
||
test('does not display the student data policy', async function (assert) { | ||
// when | ||
const screen = await render(hbs`<Footer />}`); | ||
|
||
// then | ||
assert | ||
.dom(screen.queryByRole('link', { name: t('navigation.footer.student-data-protection-policy') })) | ||
.doesNotExist(); | ||
}); | ||
}); | ||
|
||
module('when url has frenchDomainExtension', function (hooks) { | ||
hooks.beforeEach(function () { | ||
class CurrentDomainServiceStub extends Service { | ||
get isFranceDomain() { | ||
return true; | ||
} | ||
} | ||
|
||
this.owner.register('service:currentDomain', CurrentDomainServiceStub); | ||
}); | ||
|
||
test('displays the student data policy', async function (assert) { | ||
// when | ||
const screen = await render(hbs`<Footer />}`); | ||
|
||
// then | ||
assert.dom(screen.getByRole('link', { name: t('navigation.footer.student-data-protection-policy') })).exists(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters