Skip to content

Commit

Permalink
tests and snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Dec 4, 2024
1 parent cf56da6 commit e5fd85f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ exports[`<AllTargetsArchivedRecordingsTable /> renders correctly 1`] = `
aria-disabled={false}
aria-label={null}
className="pf-v5-c-button pf-m-plain"
data-ouia-component-id="OUIA-Generated-Button-plain-2"
data-ouia-component-id="OUIA-Generated-Button-plain-1"
data-ouia-component-type="PF5/Button"
data-ouia-safe={true}
disabled={false}
Expand Down Expand Up @@ -391,7 +391,7 @@ exports[`<AllTargetsArchivedRecordingsTable /> renders correctly 1`] = `
aria-label="Details"
aria-labelledby="simple-node1 expand-toggle1"
className="pf-v5-c-button pf-m-plain"
data-ouia-component-id="OUIA-Generated-Button-plain-3"
data-ouia-component-id="OUIA-Generated-Button-plain-2"
data-ouia-component-type="PF5/Button"
data-ouia-safe={true}
disabled={false}
Expand Down Expand Up @@ -442,7 +442,7 @@ exports[`<AllTargetsArchivedRecordingsTable /> renders correctly 1`] = `
aria-disabled={false}
aria-label={null}
className="pf-v5-c-button pf-m-plain"
data-ouia-component-id="OUIA-Generated-Button-plain-4"
data-ouia-component-id="OUIA-Generated-Button-plain-2"
data-ouia-component-type="PF5/Button"
data-ouia-safe={true}
disabled={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ exports[`<CustomRecordingForm /> renders correctly 1`] = `
<optgroup
className=""
disabled={false}
label="Custom Templates"
label="Custom templates"
>
<option
className=""
Expand All @@ -393,6 +393,19 @@ exports[`<CustomRecordingForm /> renders correctly 1`] = `
someEventTemplate
</option>
</optgroup>
<optgroup
className=""
disabled={false}
label="Preset templates"
>
<option
className=""
disabled={true}
value=""
>
No templates
</option>
</optgroup>
</select>
<span
className="pf-v5-c-form-control__utilities"
Expand Down Expand Up @@ -442,7 +455,6 @@ exports[`<CustomRecordingForm /> renders correctly 1`] = `
>
<button
aria-controls="metadata-options"
aria-expanded={false}
className="pf-v5-c-expandable-section__toggle"
id="metadata-option-toggle"
onClick={[Function]}
Expand Down Expand Up @@ -624,7 +636,6 @@ exports[`<CustomRecordingForm /> renders correctly 1`] = `
>
<button
aria-controls="advanced-options"
aria-expanded={false}
className="pf-v5-c-expandable-section__toggle"
id="advanced-option-toggle"
onClick={[Function]}
Expand Down
9 changes: 1 addition & 8 deletions src/test/Events/EventTemplates.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ const mockCustomEventTemplate: EventTemplate = {

const mockAnotherTemplate = { ...mockCustomEventTemplate, name: 'anotherEventTemplate' };

const mockPresetEventTemplate: EventTemplate = {
name: 'presetEventTemplate',
description: 'Some Description',
provider: 'Cryostat',
type: 'PRESET',
};

const mockCreateTemplateNotification = {
meta: {
category: 'TemplateCreated',
Expand Down Expand Up @@ -80,7 +73,7 @@ jest.spyOn(defaultServices.api, 'addCustomEventTemplate').mockReturnValue(of(tru
jest.spyOn(defaultServices.api, 'deleteCustomEventTemplate').mockReturnValue(of(true));
jest.spyOn(defaultServices.api, 'downloadTemplate').mockReturnValue(void 0);

jest.spyOn(defaultServices.api, 'getTargetEventTemplates').mockReturnValue(of([mockCustomEventTemplate, mockPresetEventTemplate]));
jest.spyOn(defaultServices.api, 'getTargetEventTemplates').mockReturnValue(of([mockCustomEventTemplate]));

jest.spyOn(defaultServices.target, 'target').mockReturnValue(of(mockTarget));
jest.spyOn(defaultServices.target, 'authFailure').mockReturnValue(of());
Expand Down
10 changes: 5 additions & 5 deletions src/test/Events/__snapshots__/EventTypes.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Array [
aria-label="Go to first page"
className="pf-v5-c-button pf-m-plain pf-m-disabled"
data-action="first"
data-ouia-component-id="OUIA-Generated-Button-plain-11"
data-ouia-component-id="OUIA-Generated-Button-plain-9"
data-ouia-component-type="PF5/Button"
data-ouia-safe={true}
disabled={true}
Expand Down Expand Up @@ -191,7 +191,7 @@ Array [
aria-label="Go to previous page"
className="pf-v5-c-button pf-m-plain pf-m-disabled"
data-action="previous"
data-ouia-component-id="OUIA-Generated-Button-plain-12"
data-ouia-component-id="OUIA-Generated-Button-plain-10"
data-ouia-component-type="PF5/Button"
data-ouia-safe={true}
disabled={true}
Expand Down Expand Up @@ -256,7 +256,7 @@ Array [
aria-label="Go to next page"
className="pf-v5-c-button pf-m-plain pf-m-disabled"
data-action="next"
data-ouia-component-id="OUIA-Generated-Button-plain-13"
data-ouia-component-id="OUIA-Generated-Button-plain-11"
data-ouia-component-type="PF5/Button"
data-ouia-safe={true}
disabled={true}
Expand Down Expand Up @@ -289,7 +289,7 @@ Array [
aria-label="Go to last page"
className="pf-v5-c-button pf-m-plain pf-m-disabled"
data-action="last"
data-ouia-component-id="OUIA-Generated-Button-plain-14"
data-ouia-component-id="OUIA-Generated-Button-plain-12"
data-ouia-component-type="PF5/Button"
data-ouia-safe={true}
disabled={true}
Expand Down Expand Up @@ -564,7 +564,7 @@ Array [
aria-label="Details"
aria-labelledby="simple-node0 expandable-event-type-row-00"
className="pf-v5-c-button pf-m-plain"
data-ouia-component-id="OUIA-Generated-Button-plain-15"
data-ouia-component-id="OUIA-Generated-Button-plain-3"
data-ouia-component-type="PF5/Button"
data-ouia-safe={true}
disabled={false}
Expand Down

0 comments on commit e5fd85f

Please sign in to comment.