Skip to content

Commit

Permalink
chore(tests): fix ci-check (carbon-design-system#10954)
Browse files Browse the repository at this point in the history
  • Loading branch information
annawen1 authored Sep 20, 2023
1 parent a8f7267 commit f78f1c2
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ $inset-transition: inset 110ms motion(standard, productive);
height: $spacing-09;
padding: $spacing-03 $spacing-05;
// height - vertical padding
/* stylelint-disable declaration-property-unit-whitelist */
/* stylelint-disable declaration-property-unit-allowed-list */
line-height: calc(#{$spacing-09} - (#{$spacing-03} * 2));
}
}
Expand Down
6 changes: 4 additions & 2 deletions packages/services/src/services/Locale/Locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ import root from 'window-or-global';
* @constant {string | string} Host for the Locale API call
* @private
*/
const _host = process && process.env.TRANSLATION_HOST;
('https://1.www.s81c.com');
const _host =
(process &&
(process.env.REACT_APP_TRANSLATION_HOST || process.env.TRANSLATION_HOST)) ||
'https://1.www.s81c.com';

/**
* Sets the default location if nothing is returned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe('TranslationAPI', () => {
href: 'https://www.loremipsum.com',
};

const expectedSessionKey = 'cds-translation-us-en';
const expectedSessionKey = 'c4d-translation-us-en';

await TranslationAPI.getTranslation({
lc: 'en',
Expand All @@ -167,7 +167,7 @@ describe('TranslationAPI', () => {
it('should return a json with a recent timestamp', async () => {
// using very old cached session
sessionStorageMock.setItem(
'cds-translation-us-en',
'c4d-translation-us-en',
JSON.stringify(Object.assign(oldSession, { CACHE: true }))
);

Expand All @@ -177,7 +177,7 @@ describe('TranslationAPI', () => {
});

const newSession = JSON.parse(
sessionStorageMock.getItem('cds-translation-us-en')
sessionStorageMock.getItem('c4d-translation-us-en')
);

// fresh data would lack this property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ module.exports = {
'declaration-property-unit-blacklist': OFF,
// Specify a whitelist of allowed property and unit pairs within
// declarations.
'declaration-property-unit-whitelist': {
'declaration-property-unit-allowed-list': {
'font-size': ['rem', '%', 'vw'],
'/^animation/': ['ms'],
'line-height': ['rem'],
},
// Specify a blacklist of disallowed property and value pairs within
// declarations.
'declaration-property-value-blacklist': {
'declaration-property-value-disallowed-list': {
// Disallow unset as it is unsupported in IE11
'/.*/': ['unset'],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

/* stylelint-disable declaration-no-important */
::slotted(h1) {
all: unset !important; /* stylelint-disable-line declaration-property-value-blacklist */
all: unset !important; /* stylelint-disable-line declaration-property-value-disallowed-list */
}
/* stylelint-enable declaration-no-important */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@

/* stylelint-disable declaration-no-important */
::slotted(h1) {
all: unset !important; /* stylelint-disable-line declaration-property-value-blacklist */
all: unset !important; /* stylelint-disable-line declaration-property-value-disallowed-list */
}
/* stylelint-enable declaration-no-important */
}
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/scss/components/leadspace/_leadspace.scss
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ $btn-min-width: 26;

/* stylelint-disable declaration-no-important */
::slotted(h1) {
all: unset !important; /* stylelint-disable-line declaration-property-value-blacklist */
all: unset !important; /* stylelint-disable-line declaration-property-value-disallowed-list */
}
/* stylelint-enable declaration-no-important */
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.#{$prefix}--tag {
@include type-style('label-01');

/* stylelint-disable-next-line declaration-property-unit-whitelist */
/* stylelint-disable-next-line declaration-property-unit-allowed-list */
line-height: rem(20px);

height: $spacing-07; /* carbon--container-02 */
Expand Down

0 comments on commit f78f1c2

Please sign in to comment.