fix: update class for legal text (#337)

updated paragon package to the latest version
removed .small from legal text and replaced it with .micro
fixed the spinner to be center aligned on buttons during pending state

VAN-545
This commit is contained in:
Zainab Amir
2021-06-14 14:30:47 +05:00
committed by Waheed Ahmed
parent 25f60c1813
commit a49364bbb5
5 changed files with 9 additions and 11 deletions

6
package-lock.json generated
View File

@@ -3937,9 +3937,9 @@
}
},
"@edx/paragon": {
"version": "14.15.0",
"resolved": "https://registry.npmjs.org/@edx/paragon/-/paragon-14.15.0.tgz",
"integrity": "sha512-g8Otnqj/bg+z6z/wcD04XPguASy3OwTi+947Qq/zrSMMaRG4xKraWCZVP0HZ5NTKTKh/GkQGsm7G6PPiUu5Ulg==",
"version": "14.16.0",
"resolved": "https://registry.npmjs.org/@edx/paragon/-/paragon-14.16.0.tgz",
"integrity": "sha512-KYGuaQvSg0mo+qFAwz40LE3uf/uMedw6QFqZ0RmEXL9xhavGlRC+kT8NfJ5npyE4HkS181FbSMVbdR9jEHGiBw==",
"requires": {
"@fortawesome/fontawesome-svg-core": "^1.2.30",
"@fortawesome/free-solid-svg-icons": "^5.14.0",

View File

@@ -38,7 +38,7 @@
"@edx/frontend-component-cookie-policy-banner": "2.1.12",
"@edx/frontend-component-header": "2.2.5",
"@edx/frontend-platform": "1.8.4",
"@edx/paragon": "14.15.0",
"@edx/paragon": "14.16.0",
"@fortawesome/fontawesome-svg-core": "1.2.32",
"@fortawesome/free-brands-svg-icons": "5.15.1",
"@fortawesome/free-regular-svg-icons": "5.15.1",

View File

@@ -160,8 +160,7 @@ describe('LoginPage', () => {
const loginPage = mount(reduxWrapper(<IntlLoginPage {...props} />));
const button = loginPage.find('button[type="submit"] span').first();
// test pending state has icon
expect(button.find('.pgn__stateful-btn-icon').length).toEqual(1);
expect(button.find('.sr-only').text()).toEqual('pending');
});
it('should show forgot password link', () => {

View File

@@ -540,7 +540,7 @@ class RegistrationPage extends React.Component {
handleChange={(value) => this.setState({ country: value })}
errorCode={this.state.errorCode}
/>
<div id="honor-code" className="small mt-4">
<div id="honor-code" className="micro mt-4">
<FormattedMessage
id="register.page.terms.of.service.and.honor.code"
defaultMessage="By creating an account, you agree to the {tosAndHonorCode} and you acknowledge that {platformName} and each
@@ -549,12 +549,12 @@ class RegistrationPage extends React.Component {
values={{
platformName: getConfig().SITE_NAME,
tosAndHonorCode: (
<Hyperlink destination={getConfig().TOS_AND_HONOR_CODE || '#'} target="_blank">
<Hyperlink variant="muted" destination={getConfig().TOS_AND_HONOR_CODE || '#'} target="_blank">
{intl.formatMessage(messages['terms.of.service.and.honor.code'])}
</Hyperlink>
),
privacyPolicy: (
<Hyperlink destination={getConfig().PRIVACY_POLICY || '#'} target="_blank">
<Hyperlink variant="muted" destination={getConfig().PRIVACY_POLICY || '#'} target="_blank">
{intl.formatMessage(messages['privacy.policy'])}
</Hyperlink>
),

View File

@@ -398,8 +398,7 @@ describe('RegistrationPage', () => {
const registrationPage = mount(reduxWrapper(<IntlRegistrationPage {...props} />));
const button = registrationPage.find('button[type="submit"] span').first();
// test pending state has icon
expect(button.find('.pgn__stateful-btn-icon').length).toEqual(1);
expect(button.find('.sr-only').text()).toEqual('pending');
});
it('should show single sign on provider button', () => {