Skip to content

Commit

Permalink
Merge branch 'stage' into MWPW-167901-hlx4-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonja Popovic committed Mar 6, 2025
2 parents 9b23256 + cb872f4 commit 0d24b20
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// MWPW-159021
/* eslint-disable */
import { getMetadata, getConfig } from '../../../../utils/utils.js';
import { getMetadata, getConfig, getFederatedUrl } from '../../../../utils/utils.js';
import { toFragment, lanaLog } from '../../utilities/utilities.js';
import { getFederatedUrl } from '../../../../utils/federated.js';

const metadata = {
seo: 'breadcrumbs-seo',
Expand Down
4 changes: 2 additions & 2 deletions eds/blocks/partners-navigation/features/profile/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { getLibs } from '../../../../scripts/utils.js';

const miloLibs = getLibs();
const { replaceKeyArray } = await import(`${miloLibs}/features/placeholders.js`);
const { getConfig } = await import(`${miloLibs}/utils/utils.js`);
const { getFedsPlaceholderConfig } = await import(`${miloLibs}/utils/federated.js`);

const { getConfig, getFedsPlaceholderConfig } = await import(`${miloLibs}/utils/utils.js`);

const getLanguage = (ietfLocale) => {
if (!ietfLocale.length) return 'en';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {generateRequestForSearchAPI} from "../../../utils/utils.js";

const miloLibs = getLibs();
const { replaceKeyArray } = await import(`${miloLibs}/features/placeholders.js`);
const { getConfig } = await import(`${miloLibs}/utils/utils.js`);
const { getConfig, getFedsPlaceholderConfig } = await import(`${miloLibs}/utils/utils.js`);
const { debounce } = await import(`${miloLibs}/utils/action.js`);
const { getFedsPlaceholderConfig } = await import (`${miloLibs}/utils/federated.js`);

Expand Down
3 changes: 1 addition & 2 deletions eds/blocks/partners-navigation/partners-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ const {
loadIms,
decorateLinks,
loadScript,
getFedsPlaceholderConfig,
getGnavSource,
} = await import(`${miloLibs}/utils/utils.js`);
const { replaceKey, replaceKeyArray } = await import(`${miloLibs}/features/placeholders.js`);
// End

const { getFedsPlaceholderConfig } = await import(`${miloLibs}/utils/federated.js`);

const SIGNIN_CONTEXT = getConfig()?.signInContext;

function getHelpChildren() {
Expand Down
12 changes: 10 additions & 2 deletions eds/blocks/partners-navigation/utilities/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ import { getLibs } from '../../../scripts/utils.js';

const miloLibs = getLibs();
const {
getConfig, getMetadata, loadStyle, loadLana, decorateLinks, localizeLink,
getConfig,
getMetadata,
loadStyle,
loadLana,
decorateLinks,
localizeLink,
getFederatedContentRoot,
getFederatedUrl,
getFedsPlaceholderConfig,
} = await import(`${miloLibs}/utils/utils.js`);
const { getFederatedContentRoot, getFederatedUrl, getFedsPlaceholderConfig } = await import(`${miloLibs}/utils/federated.js`);

const { processTrackingLabels } = await import(`${miloLibs}/martech/attributes.js`);
const { replaceText } = await import(`${miloLibs}/features/placeholders.js`);
// End
Expand Down
4 changes: 2 additions & 2 deletions eds/components/PartnerCards.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getLibs } from '../scripts/utils.js';
import { getLibs, prodHosts } from '../scripts/utils.js';
import {
partnerCardsStyles,
partnerCardsLoadMoreStyles,
Expand Down Expand Up @@ -226,7 +226,7 @@ export default class PartnerCards extends LitElement {
const cardsEvent = new Event('partner-cards-loaded');
document.dispatchEvent(cardsEvent);
if (apiData?.cards) {
if (window.location.hostname === 'partners.adobe.com') {
if (prodHosts.includes(window.location.host)) {
apiData.cards = apiData.cards.filter((card) => !card.contentArea.url?.includes('/drafts/'));
}
// eslint-disable-next-line no-return-assign
Expand Down
8 changes: 4 additions & 4 deletions eds/scripts/personalization.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ function processRenew(profile) {
}

function processGnavElements(elements) {
const regex = /(?<=\().*?(?=\))/g;
const regex = /\((.*?)\)/g;
return elements.map((el) => {
const matches = el.textContent.match(regex);
if (!matches?.length) return {};
const match = matches[0];
const matches = [...el.textContent.matchAll(regex)];
if (!matches?.length || !matches[0][1]) return {};
const match = matches[0][1];
el.textContent = el.textContent.replace(`(${match})`, '');
const conditions = match.split(',').map((condition) => condition.trim());
if (!conditions.length) return {};
Expand Down
15 changes: 8 additions & 7 deletions playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ const config = {
use: { ...devices['Desktop Firefox'] },
bypassCSP: true,
},
{
name: 'dx-partners-live-webkit',
use: {
...devices['Desktop Safari'],
},
bypassCSP: true,
},
// {
// name: 'dx-partners-live-webkit',
// use: {
// ...devices['Desktop Safari'],
// ignoreHTTPSErrors: true,
// },
// bypassCSP: true,
// },
/* Test Against Mobile View ports */
// {
// name: 'mobile-chrome-pixel5',
Expand Down

0 comments on commit 0d24b20

Please sign in to comment.