Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSTEAM1-945: Update e2e #11529

Merged
merged 27 commits into from
Apr 22, 2024
Merged

Conversation

shayneahchoon
Copy link
Contributor

@shayneahchoon shayneahchoon commented Apr 15, 2024

Resolves JIRA WSTEAM1-945

Overall changes

Updates fixture data and settings for Cypress tests for Pidgin, Hausa and Thai services.

Code changes

  • Update settings so that E2E tests run on CAF rendered PGL, Media Asset and Story for selected services.
  • Update E2E tests so that they pass on both cpsAssets and CAF rendered assets
  • Add or update CAF formatted fixture data for selected services.

Testing

  1. List the steps used to test this PR.

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

describe(`testsThatFollowSmokeTestConfig to run for ${service} ${variant} ${pageType} `, () => {
it('should render a description for the page', () => {
cy.getPageData({ service, pageType: 'cpsAsset', variant }).then(
cy.getPageData({ service, pageType: pageTypeForFetch, variant }).then(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for fetching on Test/ Live enviornments.


it('should render an iframe with a valid URL', () => {
if (!`${Cypress.env('currentPath')}`.includes('/russian/av/')) {
cy.getPageData({ service, pageType: 'cpsAsset', variant }).then(
cy.getPageData({ service, pageType: pageTypeForFetch, variant }).then(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for fetching on Test/ Live enviornments.


it('should render an iframe with a valid URL', () => {
if (!`${Cypress.env('currentPath')}`.includes('/russian/av/')) {
cy.getPageData({ service, pageType: 'cpsAsset', variant }).then(
cy.getPageData({ service, pageType: pageTypeForFetch, variant }).then(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for fetching on Test/ Live enviornments.

@shayneahchoon shayneahchoon merged commit d07166b into WSTEAM1-942-rollout-caf Apr 22, 2024
8 of 9 checks passed
@shayneahchoon shayneahchoon deleted the WSTEAM1-945-E2E-TESTS branch April 22, 2024 16:05
amoore108 added a commit that referenced this pull request Apr 24, 2024
* changes description targeting for block model format

* adds article pageType

* set iscaf to true for hausa pidgin and thai

Co-authored-by: Shayne Marc Enzo Ahchoon <shayneahchoon@users.noreply.github.com>

* check if optimo

* fix optimo check

* check pagetype ionstead of isoptimo

* remove pagetype check

* WSTEAM1-942: Update lint

* Add Thai PGL asset

* Enable fetching of cps PGL fixtures from article page handler

* Add integration tests targetting CAF via thai

* updates test to cater for caf only services

* adds else clause

* WSTEAM1-967: CAF - Update MAP Integration test and snapshots

* Add Hausa CAF integration tests

* Apply CPS id check from e2es PR

* WSTEAM1-945: Update e2e (#11529)

* WSTEAM1-945: Update e2e

* WSTEAM1-945: Update settings

* WSTEAM1-945: Update fixtures

* WSTEAM1-945: Alter route

* WSTEAM1-945: Fix HTML lang tests.

* WSTEAM1-945: Update fixture

* WSTEAM1-945: Fix PGL tests

* WSTEAM1-945: Add tests

* WSTEAM1-945: Update tests

* WSTEAM1-945: Update tests

* WSTEAM1-945: Update tests

* WSTEAM1-945: Enable e2e tests on CAF STY pages. Update and add fixture data

* WSTEAM1-945: Refactor cpsId check

* WSTEAM1-945: refctor to assign to variable

* WSTEAM1-945: Refactor

* WSTEAM1-945: Update MAP fixture data to include ATI campaigns

* WSTEAM1-945: Set Cypress getPageData pageType to article if isCaf

* WSTEAM1-945: Lint and simplify post merge

* WSTEAM1-945: Update snapshots

* WSTEAM1-945: Update snapshots

---------

Co-authored-by: Isabella Mitchell <i.mitchell.0707@gmail.com>
Co-authored-by: Isabella Mitchell <98817636+Isabella-Mitchell@users.noreply.github.com>

* Update snaphots to reflect SEO and ATI changes

* Remove redundant isCaf flag

* Use CafEnabledServices const across app

* WSTEAM1-967: Import cafEnabledServices from lib

* Add CPS id check for STY tests

* Add CAF STY fixture asset

* Remove apple itunes banner test

* Update snapshot

* Update snapshot to include SEO and ATI values

* Update CAF STY snapshots to include lang code

---------

Co-authored-by: Harvey Peachey <harvey.peachey@bbc.co.uk>
Co-authored-by: Shayne Marc Enzo Ahchoon <shayneahchoon@users.noreply.github.com>
Co-authored-by: Aaron Moore <aaron.moore@bbc.co.uk>
Co-authored-by: Shayne Marc Enzo Ahchoon <shayne.ahchoon@bbc.co.uk>
Co-authored-by: Shayne Marc Enzo Ahchoon <32307964+shayneahchoon@users.noreply.github.com>
Co-authored-by: alex-magana <alex.magana@andela.com>
Co-authored-by: Isabella Mitchell <i.mitchell.0707@gmail.com>
Co-authored-by: Isabella Mitchell <98817636+Isabella-Mitchell@users.noreply.github.com>
MeriemMechri pushed a commit that referenced this pull request May 12, 2024
* changes description targeting for block model format

* adds article pageType

* set iscaf to true for hausa pidgin and thai

Co-authored-by: Shayne Marc Enzo Ahchoon <shayneahchoon@users.noreply.github.com>

* check if optimo

* fix optimo check

* check pagetype ionstead of isoptimo

* remove pagetype check

* WSTEAM1-942: Update lint

* Add Thai PGL asset

* Enable fetching of cps PGL fixtures from article page handler

* Add integration tests targetting CAF via thai

* updates test to cater for caf only services

* adds else clause

* WSTEAM1-967: CAF - Update MAP Integration test and snapshots

* Add Hausa CAF integration tests

* Apply CPS id check from e2es PR

* WSTEAM1-945: Update e2e (#11529)

* WSTEAM1-945: Update e2e

* WSTEAM1-945: Update settings

* WSTEAM1-945: Update fixtures

* WSTEAM1-945: Alter route

* WSTEAM1-945: Fix HTML lang tests.

* WSTEAM1-945: Update fixture

* WSTEAM1-945: Fix PGL tests

* WSTEAM1-945: Add tests

* WSTEAM1-945: Update tests

* WSTEAM1-945: Update tests

* WSTEAM1-945: Update tests

* WSTEAM1-945: Enable e2e tests on CAF STY pages. Update and add fixture data

* WSTEAM1-945: Refactor cpsId check

* WSTEAM1-945: refctor to assign to variable

* WSTEAM1-945: Refactor

* WSTEAM1-945: Update MAP fixture data to include ATI campaigns

* WSTEAM1-945: Set Cypress getPageData pageType to article if isCaf

* WSTEAM1-945: Lint and simplify post merge

* WSTEAM1-945: Update snapshots

* WSTEAM1-945: Update snapshots

---------

Co-authored-by: Isabella Mitchell <i.mitchell.0707@gmail.com>
Co-authored-by: Isabella Mitchell <98817636+Isabella-Mitchell@users.noreply.github.com>

* Update snaphots to reflect SEO and ATI changes

* Remove redundant isCaf flag

* Use CafEnabledServices const across app

* WSTEAM1-967: Import cafEnabledServices from lib

* Add CPS id check for STY tests

* Add CAF STY fixture asset

* Remove apple itunes banner test

* Update snapshot

* Update snapshot to include SEO and ATI values

* Update CAF STY snapshots to include lang code

---------

Co-authored-by: Harvey Peachey <harvey.peachey@bbc.co.uk>
Co-authored-by: Shayne Marc Enzo Ahchoon <shayneahchoon@users.noreply.github.com>
Co-authored-by: Aaron Moore <aaron.moore@bbc.co.uk>
Co-authored-by: Shayne Marc Enzo Ahchoon <shayne.ahchoon@bbc.co.uk>
Co-authored-by: Shayne Marc Enzo Ahchoon <32307964+shayneahchoon@users.noreply.github.com>
Co-authored-by: alex-magana <alex.magana@andela.com>
Co-authored-by: Isabella Mitchell <i.mitchell.0707@gmail.com>
Co-authored-by: Isabella Mitchell <98817636+Isabella-Mitchell@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants