Skip to content

Commit

Permalink
tested changed for check e2e logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Fellan-91 committed Jan 29, 2025
1 parent fd0f312 commit f24753c
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions tests/e2e/specs/archive.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,14 +617,33 @@ test.describe('archive pages', () => {
: '/wp/v2/portfolio_tag';

try {
// Fetch existing terms with retry
const existingTerms = await retryRequest(() =>
const RestLogs = await retryRequest(() =>
requestUtils.rest({
path: `${endpoint}?context=view`,
params: { per_page: 100 },
path: '/wp/v2',
})
);

console.log('Rest Logs: ');
console.log(RestLogs);
// Fetch existing terms with retry
let existingTerms;

if (type === 'portfolio_category') {
existingTerms = await retryRequest(() =>
requestUtils.rest({
path: '/wp/v2/portfolio_category?context=view',
params: { per_page: 100 },
})
);
} else {
existingTerms = await retryRequest(() =>
requestUtils.rest({
path: '/wp/v2/portfolio_tag?context=view',
params: { per_page: 100 },
})
);
}

// Ensure existingTerms is an array before proceeding
if (!Array.isArray(existingTerms)) {
throw new Error(
Expand Down

0 comments on commit f24753c

Please sign in to comment.