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

Restructure archive pageand generic changes #18

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
Binary file modified .DS_Store
Binary file not shown.
45 changes: 27 additions & 18 deletions TLS_E2E_Automation_Framework/cypress/e2e/archivePage.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,33 @@
* External dependencies
*/
import * as archivePage from '../e2e/tls_page_elements/archivePage'
import * as genericPage from '../e2e/tls_page_elements/genericPage'

describe('Static home page', () => {

it( 'Validate search filter functionality in Archive page', () => {
archivePage.navigateToArchivePage();
archivePage.validateArchivePageIsLoaded();
archivePage.validateSearchFilter();
});

it( 'Validate Browse by year of issue filter functionality in Archive Page and validate X button of browse by year of issue and Validate Explore older TLS issues section and subscribe section', () => {
archivePage.validateYearFilterDropDown();
archivePage.validateBackToTop();
archivePage.verifyShowmore();
archivePage.validateAlgoliaNavigation();
archivePage.validateClickHereNotSubscriber();
archivePage.validateFooterLogoAndMainTopics();
});

})
const environment = Cypress.env("ENV") || "prod";
const url = Cypress.env(`${environment}_url`);

beforeEach(() => {
cy.visit(url, { timeout: 20000 });
cy.acceptCookieBanner();
archivePage.navigateToArchivePage();
});

describe('Validation of Archive page', () => {

it( 'Validate search filter functionality in Archive page', () => {
archivePage.navigateToArchivePage();
archivePage.validateArchivePageIsLoaded();
archivePage.validateArchiveTitle();
archivePage.validateSearchFilter();
});

it( 'Validate Browse by year of issue filter functionality in Archive Page and validate X button of browse by year of issue and Validate Explore older TLS issues section and subscribe section', () => {
archivePage.validateYearFilterDropDown();
archivePage.validateBackToTop();
archivePage.verifyArchiveCaredsSection();
archivePage.validateAlgoliaNavigation();
archivePage.validateClickHereNotSubscriber();
genericPage.validateFooterLogoAndMainTopics();
});
});

63 changes: 30 additions & 33 deletions TLS_E2E_Automation_Framework/cypress/e2e/articlePage.spec.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,36 @@
// <reference types="cypress" />
import * as articlePage from '../e2e/tls_page_elements/articlePage';

const LITERATURE_PAGE_URL = 'literature/fiction/so-much-he-bought-the-company/';


describe('Article Page', () => {
it('Validate Article Page headline once user visit to article page', () => {
articlePage.clickSecondArtcileINHomePage();
cy.acceptCookieBanner();
articlePage.getHeadlineOfArtcilePage();

})

describe('Static Article Page', ()=>{
beforeEach(()=>{
cy.url().then(urlValue => cy.visit(urlValue + LITERATURE_PAGE_URL));
})

it( 'Validate the category, separator And Article type', () => {
articlePage.validateArticleCategorySepartorAndType();
});

it( 'Validate the title, subtitles , author, with prefix by, lead image and its caption', () => {
articlePage.validateArticleTitleSubtitleAuthorAndImage();
});
const environment = Cypress.env("ENV") || "prod";
const url = Cypress.env(`${environment}_url`);

beforeEach(() => {
cy.visit(url, { timeout: 20000 });
cy.acceptCookieBanner();
articlePage.clickSecondArtcileINHomePage();
});

it( 'Validate the social media buttons twitter, facebook , email', () => {
articlePage.validateArticlePageHasSocialMediaButtons();
});

it( 'Validate the Article has content and other details', () => {
articlePage.validateArticlePageContentWithSideBarDetails();
});

})
})
describe('Article Page', () => {
it('Validate Article Page headline once user visit to article page, & Validate the Article has content and other details like title, subtitles,image and author, with prefix by, lead image and its caption', () => {
articlePage.getHeadlineOfArtcilePage();
});

it( 'Validate the Article has content and other details like title, subtitles,image and author, with prefix by, lead image and its caption', () => {
articlePage.validateArticleTitleSubtitleAuthorAndImage();
});

it( 'Validate the category, separator And Article type', () => {
articlePage.validateArticleCategorySepartorAndType();
});

it( 'Validate the social media buttons twitter, facebook , email', () => {
articlePage.validateArticlePageHasSocialMediaButtons();
});

it( 'Validate the issue section and In this review section which appears left side of the article page', () => {
articlePage.validateArticlePageContentWithSideBarDetails();
});
});



27 changes: 27 additions & 0 deletions TLS_E2E_Automation_Framework/cypress/e2e/explorePage.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import * as explorePage from '../e2e/tls_page_elements/explorePage';

const environment = Cypress.env("ENV") || "prod";
const url = Cypress.env(`${environment}_url`);

describe('Explore Page validation', () => {
beforeEach(() => {
cy.visit(url, { timeout: 20000 });
cy.acceptCookieBanner();
});

it( 'Validate Explore title', () => {
explorePage.validateExploreOnTitle();
});

it( 'Validate Explore title and categories', () => {
explorePage.validateExploreCategories();
});

it( 'User navigates to new to tls page', () => {
explorePage.navigateToExploreCategoryNEWTOTLS();
});

it( 'Validate all links in the page', () => {
explorePage.validateNEWTOTLSPageLinks();
})
});
43 changes: 43 additions & 0 deletions TLS_E2E_Automation_Framework/cypress/e2e/genericPage.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

import * as genericPage from '../e2e/tls_page_elements/genericPage';

const environment = Cypress.env("ENV") || "prod";
const url = Cypress.env(`${environment}_url`);

beforeEach(() => {
cy.visit(url, { timeout: 20000 });
cy.acceptCookieBanner();
});

describe('Generic Page validation', () => {

//Validate the login button,serach icon, subscribe
it( 'Validate Subscribe,Login button and search icon are visible', () => {
genericPage.validateHomePageSubscribeSearchAndLoginButtoons();
});

//Validate the shop icon
it( 'Validate Shop icon is visible', () => {
genericPage.validateShopOnTitle();
});

//Validate the Footer logo and main topics
it( 'Valiate Footer logo and its topics', () => {
genericPage.validateFooterLogoAndMainTopics();
});

//Validate Terms and Conditons at botton
it( 'Validate Terms and conditions, Privacy and Cookie', () => {
genericPage.validateTermConditionPrivacyandCookieInFooter();
});

// Valiate apple podcasts, spotify and google podcasts
it( 'Validate Apple Podcasts, Spotify and Google Podcasts', () => {
genericPage.validatePodcasts();
});

//Valiate about us
it( 'Validate page is navigates to Aboutus and its has header and logo', () => {
genericPage.validateAboutUs();
});
});
98 changes: 44 additions & 54 deletions TLS_E2E_Automation_Framework/cypress/e2e/homePage.spec.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,44 @@
import {landingPageValidation,ValidateSocialMediabuttons, validateAdsCheckInHomePage, homePageSectionValidation,validatePodcastHeaderTitleStandfirst,
valdiatePodcastArticleTitleStandfirst,validateHeroHasArticleCategoryTitleAndAuthor, validatDateAndThisWeekIssuelabelIsDisplayed,
ValidateFooterSectionOfHomepage} from './tls_page_elements/homePage'

/**
* After home page loaded users clicks on TLS
*/
describe('Home Page', () => {
beforeEach(()=>{
cy.viewport(1024,768);

})
})

describe('static home page', () => {
before(()=>{
cy.visit('/',);
})

it( 'The home page is loaded successfully & Validate user tries to visit social media by clicking on header icons(face book,twitter,instagram', () => {
landingPageValidation();
ValidateSocialMediabuttons();
});

it('Validate Hero Large Block has image, category name, articlename and author name and review of the article by hovering on Book Review', () => {
validateHeroHasArticleCategoryTitleAndAuthor();
})

it('Validate Issue block has an image and details', () => {
validatDateAndThisWeekIssuelabelIsDisplayed();
})

// it('Validate the article slices in the home page by shuffling it from the CMS should be visible in front end as per the setting', () => {

// })

it('Validate ads in home Page should be visible', () => {
validateAdsCheckInHomePage();
})

it('Validate podcast block should be visible ', () => {
validatePodcastHeaderTitleStandfirst();
valdiatePodcastArticleTitleStandfirst();
})

it('Validate Explore the TLS section and Online series section in home page', () => {
homePageSectionValidation();
})

it('Validate Footer section in home page', () => {
ValidateFooterSectionOfHomepage();
})

})

import * as homePage from '../e2e/tls_page_elements/homePage';

const environment = Cypress.env("ENV") || "prod";
const url = Cypress.env(`${environment}_url`);

beforeEach(() => {
cy.visit(url, { timeout: 20000 });
cy.acceptCookieBanner();
});

describe('Home page', () => {

it( 'The home page is loaded successfully & Validate user tries to visit social media by clicking on header icons(face book,twitter,instagram', () => {
homePage.landingPageValidation();
homePage.ValidateSocialMediabuttons();
});

it('Validate Hero Large Block has image, category name, articlename and author name and review of the article by hovering on Book Review', () => {
homePage.validateHeroHasArticleCategoryTitleAndAuthor();
})

it('Validate Issue block has an image and details', () => {
homePage.validatDateAndThisWeekIssuelabelIsDisplayed();
})

it('Validate ads in home Page should be visible', () => {
homePage.validateAdsCheckInHomePage();
})

it('Validate podcast block should be visible ', () => {
homePage.validatePodcastHeaderTitleStandfirst();
homePage.valdiatePodcastArticleTitleStandfirst();
})

it('Validate Explore the TLS section and Online series section in home page', () => {
homePage.homePageSectionValidation();
})

it('Validate Footer section in home page', () => {
homePage.ValidateFooterSectionOfHomepage();
})

})
42 changes: 42 additions & 0 deletions TLS_E2E_Automation_Framework/cypress/e2e/issuePage.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

import * as issuePage from '../e2e/tls_page_elements/issuePage';

const environment = Cypress.env("ENV") || "prod";
const url = Cypress.env(`${environment}_url`);

beforeEach(() => {
cy.visit(url, { timeout: 20000 });
cy.acceptCookieBanner();
issuePage.navigateToCurrentIssuePage();
});

describe('Current issue page validation', () => {

it( 'User Navigate to Current Issue and validate current issue page should load correctly', () => {
issuePage.validateToCurrentIssuePage();
});

it( 'Validate the Previous Issue and Next Issue in Current Issue Page', () => {
issuePage.validateCurrentIssuePageHasPreviousNextIssue();
});

it( 'Validate User should have Previous Issue (which is 7 days before from current Issue)', () => {
issuePage.validatePreviousIssue();
});

it( 'Validate the Current Issue page and View Content page are opens same and both dates are equal', () => {
issuePage.validateViewContentAndCurrentPageSame();
});

it( 'Validate the Current Issue and Previous Issue has Image,Artcile headline and By', () => {
issuePage.validateImageArticleContentInPreviousAndCurrentIssue();
});

it( 'Validate showcase section', () => {
issuePage.validateShowcaseSection();
});

it( 'Validate Contents section', () => {
issuePage.validateContentSection();
});
})
47 changes: 47 additions & 0 deletions TLS_E2E_Automation_Framework/cypress/e2e/searchPage.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// <reference types="cypress" />
import * as searchPage from '../e2e/tls_page_elements/searchPage';

const environment = Cypress.env("ENV") || "prod";
const url = Cypress.env(`${environment}_url`);

beforeEach(() => {
cy.visit(url, { timeout: 20000 });
cy.acceptCookieBanner();
searchPage.clickOnSearchIcon();
});

describe('Search Page & User click on search icon', () => {

it( 'User click on search icon & verify search bar is visible', () => {
searchPage.verifySearchBarVisibility();
});

it( 'Entered the text and validate the text is displayed as entered', () => {
searchPage.verifyTextUsingSearchBar();
});

/**
* Search by Author name
*/
it( 'Search the Author name and validate the its results', () => {
searchPage.verifyAuthorUsingSearchBar();
});

/**
* Search by bookname
*/
it( 'Search the Book name and validate the its results', () => {
searchPage.verifyBookTitleUsingSearchBar();
});

/**
* Search by Article name
*/
it( 'Search the Article and validate the its results', () => {
searchPage.verifArticleNameUsingSearchBar();
});

it( 'Verify Show more button and its count in search page', () => {
searchPage.verifyShowmore();
});
})
Loading