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

CP-2938 [E2E][HomePage] MC Update available - Soft update #2020

Merged
merged 6 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
CP-2938 add test to the list
  • Loading branch information
tmaleckiplacester committed Aug 13, 2024
commit 2cf0daec336d786065e4c130a502ae885ee7f495
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export enum TestFilesPaths {
licenseTest = "src/specs/settings/license.e2e.ts",
helpWindowCheckOfflineTest = "src/specs/help/help-window-check-offline.e2e.ts",
mcHomePageForceUpdateTest = "src/specs/overview/e2e-mock-mc-force-update-available.e2e.ts",
mcHomePageSoftUpdateTest = "src/specs/overview/e2e-mock-mc-soft-update-available.e2e.ts",
kompaktOverview = "src/specs/overview/kompakt-overview.ts",
kompaktSwitchingDevices = "src/specs/overview/kompakt-switching-devices.ts",
kompaktAbout = "src/specs/overview/kompakt-about.ts",
Expand Down
53 changes: 28 additions & 25 deletions apps/mudita-center-e2e/wdio.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const config: Options.Testrunner = {
toRelativePath(TestFilesPaths.kompaktOverview),
toRelativePath(TestFilesPaths.kompaktSwitchingDevices),
toRelativePath(TestFilesPaths.mcHomePageForceUpdateTest),
toRelativePath(TestFilesPaths.mcHomePageSoftUpdateTest),
toRelativePath(TestFilesPaths.kompaktAbout),
],
suites: {
Expand All @@ -88,6 +89,7 @@ export const config: Options.Testrunner = {
],
mock: [
toRelativePath(TestFilesPaths.mcHomePageForceUpdateTest),
toRelativePath(TestFilesPaths.mcHomePageSoftUpdateTest),
toRelativePath(TestFilesPaths.newsPageOfflineTest),
toRelativePath(TestFilesPaths.mcCheckForUpdatesOfflineTest),
toRelativePath(TestFilesPaths.e2eMockSample),
Expand Down Expand Up @@ -118,6 +120,7 @@ export const config: Options.Testrunner = {
toRelativePath(TestFilesPaths.licenseTest),
toRelativePath(TestFilesPaths.helpWindowCheckOfflineTest),
toRelativePath(TestFilesPaths.mcHomePageForceUpdateTest),
toRelativePath(TestFilesPaths.mcHomePageSoftUpdateTest),
toRelativePath(TestFilesPaths.kompaktOverview),
toRelativePath(TestFilesPaths.kompaktSwitchingDevices),
toRelativePath(TestFilesPaths.kompaktAbout),
Expand Down Expand Up @@ -381,34 +384,34 @@ export const config: Options.Testrunner = {
* @param {Array.<Object>} capabilities list of capabilities details
* @param {<Object>} results object containing test results
*/
onComplete: function (wdioExitCode, config, capabilities, results) {
const reportError = new Error("Could not generate Allure report")
const generation = allure(["generate", "allure-results", "--clean"])
return new Promise<void>((resolve, reject) => {
const generationTimeout = setTimeout(() => {
console.log("Allure generation timeout")
return reject(reportError)
}, 60 * 1000)
// onComplete: function (wdioExitCode, config, capabilities, results) {
// const reportError = new Error("Could not generate Allure report")
// const generation = allure(["generate", "allure-results", "--clean"])
// return new Promise<void>((resolve, reject) => {
// const generationTimeout = setTimeout(() => {
// console.log("Allure generation timeout")
// return reject(reportError)
// }, 60 * 1000)

generation.on("exit", function (allureExitCode: number) {
clearTimeout(generationTimeout)
if (allureExitCode !== 0) {
console.log(`Error in allure generation: exit code=${allureExitCode}`)
return reject(reportError)
}
console.log(
"Wdio Test Suite Exit Code: ",
wdioExitCode,
"Allure Exit Code: ",
allureExitCode
)
// generation.on("exit", function (allureExitCode: number) {
// clearTimeout(generationTimeout)
// if (allureExitCode !== 0) {
// console.log(`Error in allure generation: exit code=${allureExitCode}`)
// return reject(reportError)
// }
// console.log(
// "Wdio Test Suite Exit Code: ",
// wdioExitCode,
// "Allure Exit Code: ",
// allureExitCode
// )

console.log("Allure Report Generation Success")
// console.log("Allure Report Generation Success")

return resolve(process.exit(0))
})
})
},
// return resolve(process.exit(0))
// })
// })
// },
/**
* Gets executed when a refresh happens.
* @param {String} oldSessionId session ID of the old session
Expand Down
Loading