Skip to content

Commit

Permalink
[Synthetics] Upgrade synthetics lib !! (elastic#207711)
Browse files Browse the repository at this point in the history
## Summary

Upgrade synthetics lib to 1.17.2 !!


### Testing
PR green is the only indicator you should look for !!

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
shahzad31 and kibanamachine authored Jan 23, 2025
1 parent ac5366a commit a97e8af
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 178 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@
"@cypress/webpack-preprocessor": "^6.0.1",
"@elastic/eslint-plugin-eui": "0.0.2",
"@elastic/makelogs": "^6.1.1",
"@elastic/synthetics": "^1.12.1",
"@elastic/synthetics": "^1.17.2",
"@emotion/babel-preset-css-prop": "^11.11.0",
"@emotion/jest": "^11.11.0",
"@frsource/cypress-plugin-visual-regression-diff": "^3.3.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ export class TestReporter implements Reporter {
succeeded: 0,
failed: 0,
skipped: 0,
pending: 0,
};

journeys: Map<string, Array<StepEndResult & { name: string }>> = new Map();
journeys: Map<string, Step[]> = new Map();

constructor(options: ReporterOptions = {}) {}

Expand All @@ -67,9 +68,9 @@ export class TestReporter implements Reporter {
}

onStepEnd(journey: Journey, step: Step, result: StepEndResult) {
const { status, end, start, error } = result;
const { status, error, duration } = step;
const message = `${symbols[status]} Step: '${step.name}' ${status} (${renderDuration(
(end - start) * 1000
duration * 1000
)} ms)`;
this.write(indent(message));
if (error) {
Expand All @@ -79,16 +80,16 @@ export class TestReporter implements Reporter {
if (!this.journeys.has(journey.name)) {
this.journeys.set(journey.name, []);
}
this.journeys.get(journey.name)?.push({ name: step.name, ...result });
this.journeys.get(journey.name)?.push(step);
}

async onJourneyEnd(journey: Journey, { error, start, end, status }: JourneyEndResult) {
async onJourneyEnd({ status, duration, error }: Journey, _result: JourneyEndResult) {
const { failed, succeeded, skipped } = this.metrics;
const total = failed + succeeded + skipped;
if (total === 0 && error) {
this.write(renderError(error));
}
const message = `${symbols[status]} Took (${renderDuration(end - start)} seconds)`;
const message = `${symbols[status]} Took (${renderDuration(duration)} seconds)`;
this.write(message);

await fs.promises.mkdir('.journeys/failed_steps', { recursive: true });
Expand Down Expand Up @@ -117,9 +118,9 @@ export class TestReporter implements Reporter {
const name = red(`Journey: ${journeyName} 🥵`);
this.write(`\n+++ ${name}`);
steps.forEach((stepResult) => {
const { status, end, start, error, name: stepName } = stepResult;
const { status, duration, error, name: stepName } = stepResult;
const message = `${symbols[status]} Step: '${stepName}' ${status} (${renderDuration(
(end - start) * 1000
duration * 1000
)} ms)`;
this.write(indent(message));
if (error) {
Expand Down Expand Up @@ -180,6 +181,7 @@ function indent(lines: string, tab = ' ') {
const NO_UTF8_SUPPORT = process.platform === 'win32';
const symbols = {
warning: yellow(NO_UTF8_SUPPORT ? '!' : '⚠'),
pending: yellow(NO_UTF8_SUPPORT ? '!' : '⚠'),
skipped: cyan('-'),
progress: cyan('>'),
succeeded: green(NO_UTF8_SUPPORT ? 'ok' : '✓'),
Expand Down
Loading

0 comments on commit a97e8af

Please sign in to comment.