Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions cypress/support/helpers/getPathWithSuffix.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import runTestsForPage from '#nextjs/cypress/support/helpers/runTestsForPage';
import { TOPIC_PAGE } from '#app/routes/utils/pageTypes';
import crossPlatformTests from './tests';
import { TOPIC_PAGE } from '../../../../src/app/routes/utils/pageTypes';
import urlValidationTest from '../../../support/helpers/urlValidationTest';
import urlValidationTest from '../../support/helpers/urlValidationTest';
import testsForAllCanonicalPages from '../testsForAllCanonicalPages';
import getPathWithSuffix from '../../../support/helpers/getPathWithSuffix';
import { assertLiteSiteSummaryComponentToMainSiteClick } from '../../specialFeatures/atiAnalytics/assertions/liteSiteSummary';
import { assertPageView } from '../../specialFeatures/atiAnalytics/assertions';
import getPathWithSuffix from '../../support/helpers/getPathWithSuffix';
import { assertLiteSiteSummaryComponentToMainSiteClick } from '../specialFeatures/atiAnalytics/assertions/liteSiteSummary';
import { assertPageView } from '../specialFeatures/atiAnalytics/assertions';
import {
assertDropdownNavigationComponentClick,
assertDropdownNavigationComponentView,
assertScrollableNavigationComponentClick,
assertScrollableNavigationComponentView,
} from '../../specialFeatures/atiAnalytics/assertions/navigation';
} from '../specialFeatures/atiAnalytics/assertions/navigation';
import {
assertMessageBannerComponentClick,
assertMessageBannerComponentView,
} from '../../specialFeatures/atiAnalytics/assertions/messageBanner';
} from '../specialFeatures/atiAnalytics/assertions/messageBanner';
import runTestsForPage, {
TestDataType,
} from '../../support/helpers/runTestsForPage';

const tests = [
crossPlatformTests,
Expand Down Expand Up @@ -106,7 +108,7 @@ const atiAnalyticsTestSuites = [
assertMessageBannerComponentClick,
],
},
];
] as unknown as TestDataType[];

const atiAnalyticsLiteTestSuites = atiAnalyticsTestSuites.map(testSuite => {
const excludedLiteTests = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import idSanitiser from '../../../../src/app/lib/utilities/idSanitiser';
import getAppEnv from '../../../support/helpers/getAppEnv';
import serviceConfigs from '../../../../src/server/utilities/serviceConfigs';
import serviceConfigs from '#src/server/utilities/serviceConfigs';
import idSanitiser from '#src/app/lib/utilities/idSanitiser';
import getAppEnv from '../../support/helpers/getAppEnv';

export default ({ service, pageType, variant = 'default', path }) => {
let topicId;
Expand All @@ -16,7 +16,7 @@ export default ({ service, pageType, variant = 'default', path }) => {
topicId = path.match(/(c[a-zA-Z0-9]{10,}t)/)?.[1];

// Gets the topic page data for all the tests
cy.getPageDataFromWindow().then(({ pageData }) => {
cy.getPageDataFromWindow().then(pageData => {
topicTitle = pageData.title;
pageCount = pageData.pageCount;
numberOfItems = pageData.curations?.[0]?.summaries.length;
Expand Down Expand Up @@ -65,8 +65,7 @@ export default ({ service, pageType, variant = 'default', path }) => {
const promoCount = Cypress.$(selector).length;
cy.log(`Number of promos on the page${promoCount}`);
if (promoCount !== numberOfItems) {
cy.window().then(win => {
const pageData = win.SIMORGH_DATA;
cy.getPageDataFromWindow().then(pageData => {
cy.log(pageData);
});
}
Expand Down Expand Up @@ -235,6 +234,7 @@ export default ({ service, pageType, variant = 'default', path }) => {
} else {
cy.log('No pagination as there is only one page');
}
cy.visit(path);
});

it('Above 400px does not show Page x of y', () => {
Expand Down
Loading