mirror of
https://github.com/mudita/mudita-center.git
synced 2025-12-23 22:28:03 -05:00
[CP-3823] fix news text (change amount of the news card and verify not 6th news but the last news (dynamic) (#2592)
This commit is contained in:
@@ -68,7 +68,9 @@ describe("News Page Check in Offline Mode", () => {
|
||||
|
||||
it("Check content after scroll", async () => {
|
||||
// Test if comments of second line of news are not visible on screen
|
||||
const lastNewsCardCommunityLinkText = await NewsPage.newsCardElements[5].$(
|
||||
const newsCardElements = await NewsPage.newsCardElements
|
||||
const lastIndex = newsCardElements.length - 1
|
||||
const lastNewsCardCommunityLinkText = await newsCardElements[lastIndex].$(
|
||||
'[data-testid="community-link"] p[color="primary"]'
|
||||
)
|
||||
await expect(lastNewsCardCommunityLinkText).not.toBeDisplayedInViewport()
|
||||
@@ -78,7 +80,7 @@ describe("News Page Check in Offline Mode", () => {
|
||||
|
||||
it("Verify News Cards", async () => {
|
||||
const newsCardElements = await NewsPage.newsCardElements
|
||||
await expect(newsCardElements).toHaveLength(6)
|
||||
await expect(newsCardElements.length).toBeGreaterThanOrEqual(5)
|
||||
|
||||
for (let newsCard of newsCardElements) {
|
||||
const newsCardImageLink = await newsCard.$('[data-testid="image-link"]')
|
||||
|
||||
@@ -37,7 +37,9 @@ describe("News Page Check", () => {
|
||||
})
|
||||
it("Check content after scroll", async () => {
|
||||
//Test if comments of second line of news is not visible on screen
|
||||
const lastNewsCardCommunityLinkText = await NewsPage.newsCardElements[5].$(
|
||||
const newsCardElements = await NewsPage.newsCardElements
|
||||
const lastIndex = newsCardElements.length - 1
|
||||
const lastNewsCardCommunityLinkText = await newsCardElements[lastIndex].$(
|
||||
'[data-testid="community-link"] p[color="primary"]'
|
||||
)
|
||||
await expect(lastNewsCardCommunityLinkText).not.toBeDisplayedInViewport()
|
||||
@@ -46,7 +48,7 @@ describe("News Page Check", () => {
|
||||
})
|
||||
it("Verify News Cards", async () => {
|
||||
const newsCardElements = await NewsPage.newsCardElements
|
||||
await expect(newsCardElements).toHaveLength(6)
|
||||
await expect(newsCardElements.length).toBeGreaterThanOrEqual(5)
|
||||
|
||||
for (let newsCard of newsCardElements) {
|
||||
const newsCardImageLink = await newsCard.$('[data-testid="image-link"]')
|
||||
|
||||
@@ -64,8 +64,8 @@ export const config: Options.Testrunner = {
|
||||
toRelativePath(TestFilesPaths.helpSectionCheckTestOffline),
|
||||
toRelativePath(TestFilesPaths.mcCheckForUpdatesTest),
|
||||
toRelativePath(TestFilesPaths.homePageTestDeviceNotConnectedTest),
|
||||
//toRelativePath(TestFilesPaths.newsPageOnlineTest),
|
||||
//toRelativePath(TestFilesPaths.newsPageOfflineTest),
|
||||
toRelativePath(TestFilesPaths.newsPageOnlineTest),
|
||||
toRelativePath(TestFilesPaths.newsPageOfflineTest),
|
||||
toRelativePath(TestFilesPaths.newsMoreNews),
|
||||
toRelativePath(TestFilesPaths.termsOfServiceTest),
|
||||
toRelativePath(TestFilesPaths.backupLocationTest),
|
||||
@@ -113,7 +113,7 @@ export const config: Options.Testrunner = {
|
||||
toRelativePath(TestFilesPaths.helpSectionCheckTest),
|
||||
toRelativePath(TestFilesPaths.helpSectionCheckTestOffline),
|
||||
toRelativePath(TestFilesPaths.homePageTestDeviceNotConnectedTest),
|
||||
//toRelativePath(TestFilesPaths.newsPageOnlineTest),
|
||||
toRelativePath(TestFilesPaths.newsPageOnlineTest),
|
||||
toRelativePath(TestFilesPaths.newsMoreNews),
|
||||
toRelativePath(TestFilesPaths.termsOfServiceTest),
|
||||
toRelativePath(TestFilesPaths.backupLocationTest),
|
||||
@@ -128,7 +128,7 @@ export const config: Options.Testrunner = {
|
||||
mock: [
|
||||
toRelativePath(TestFilesPaths.mcCheckForUpdatesTest),
|
||||
toRelativePath(TestFilesPaths.mcCheckForUpdatesOfflineTest),
|
||||
//toRelativePath(TestFilesPaths.newsPageOfflineTest),
|
||||
toRelativePath(TestFilesPaths.newsPageOfflineTest),
|
||||
toRelativePath(TestFilesPaths.mcHomePageSoftUpdateTest),
|
||||
toRelativePath(TestFilesPaths.mcHomePageSoftUpdateErrorTest),
|
||||
toRelativePath(TestFilesPaths.mcHomePageForceUpdateTest),
|
||||
@@ -175,7 +175,7 @@ export const config: Options.Testrunner = {
|
||||
toRelativePath(TestFilesPaths.helpSectionCheckTest),
|
||||
toRelativePath(TestFilesPaths.helpSectionCheckTestOffline),
|
||||
toRelativePath(TestFilesPaths.homePageTestDeviceNotConnectedTest),
|
||||
//toRelativePath(TestFilesPaths.newsPageOnlineTest),
|
||||
toRelativePath(TestFilesPaths.newsPageOnlineTest),
|
||||
toRelativePath(TestFilesPaths.termsOfServiceTest),
|
||||
toRelativePath(TestFilesPaths.privacyPolicyTest),
|
||||
toRelativePath(TestFilesPaths.contactSupportUnhappyPath),
|
||||
@@ -189,7 +189,7 @@ export const config: Options.Testrunner = {
|
||||
toRelativePath(TestFilesPaths.contactSupportUnhappyPath),
|
||||
toRelativePath(TestFilesPaths.mcCheckForUpdatesTest),
|
||||
toRelativePath(TestFilesPaths.mcCheckForUpdatesOfflineTest),
|
||||
//toRelativePath(TestFilesPaths.newsPageOfflineTest),
|
||||
toRelativePath(TestFilesPaths.newsPageOfflineTest),
|
||||
toRelativePath(TestFilesPaths.mcHomePageForceUpdateTest),
|
||||
toRelativePath(TestFilesPaths.mcHomePageForceUpdateErrorTest),
|
||||
toRelativePath(TestFilesPaths.mcHomePageSoftUpdateTest),
|
||||
|
||||
Reference in New Issue
Block a user