Skip to content

Conversation

@jfeingold35
Copy link
Contributor

No description provided.

Comment on lines +1 to +7
# common.summary-header

Summary

# common.logfile-location

Additional log information written to:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copied from run-summary-viewer.md. Named common.blah to allow for porting the existing RunSummaryViewer implementation to this new style.


# config-action.no-outfiles

No output file was specified.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Analogous to run-summary-viewer.md's message "No results files were specified."


No output file was specified.

# config-action.outfile-location
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Analogous to run-summary-viewer.md's message "Results written to:".

import {toStyledHeader, indent} from '../utils/StylingUtil';
import {BundleName, getMessage} from '../messages';

abstract class AbstractActionSummaryViewer {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's only one child class right now, but the parent class will be helpful for porting the Run Summary Viewer to the new style.

}

public async write(model: ConfigModel): Promise<void> {
public async write(model: ConfigModel): Promise<boolean> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this method isn't guaranteed to actually write anything, it now returns a boolean to indicate whether it did.

import {ConfigAction, ConfigDependencies, ConfigInput} from '../../../src/lib/actions/ConfigAction';
import {AnnotatedConfigModel} from '../../../src/lib/models/ConfigModel';
import {ConfigStyledYamlViewer} from '../../../lib/lib/viewers/ConfigViewer';
import {ConfigStyledYamlViewer} from '../../../src/lib/viewers/ConfigViewer';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Import path was wrong here.

import {AnnotatedConfigModel} from '../../../src/lib/models/ConfigModel';
import {ConfigStyledYamlViewer} from '../../../lib/lib/viewers/ConfigViewer';
import {ConfigStyledYamlViewer} from '../../../src/lib/viewers/ConfigViewer';
import {ConfigActionSummaryViewer} from '../../../src/lib/viewers/ActionSummaryViewer';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Testing through ConfigAction using the actual implementation, instead of using an Interface/Stub setup.


// ==== OUTPUT PROCESSING ====
const displayEvents = spyDisplay.getDisplayEvents();
expect(displayEvents).toHaveLength(1);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Array length is now variable, so we're not checking for an exact length anymore.


# config-action.outfile-location

Config written to:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Config written to:
Configuration written to:

Copy link
Contributor

@jshackell-sfdc jshackell-sfdc left a comment

Choose a reason for hiding this comment

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

Approved, but see my suggestion.

Comment on lines +117 to +119
this.toYamlEngineOverrides() + '\n' +
'\n' +
this.toYamlSectionHeadingComment(getMessage(BundleName.ConfigModel, 'template.common.end-of-config')) + '\n';
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this end of config message might end up in the file as well. I was hoping it would just be for the terminal output only.

@jfeingold35 jfeingold35 merged commit 379511a into dev-5 Oct 21, 2024
12 checks passed
@jfeingold35 jfeingold35 deleted the d/W-16891765-b branch December 30, 2024 21:24
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.

4 participants