Skip to content

Commit

Permalink
update snapshots and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kaperoo committed Nov 7, 2023
1 parent 55b9ca0 commit cfc5c95
Show file tree
Hide file tree
Showing 24 changed files with 164 additions and 134 deletions.
42 changes: 28 additions & 14 deletions cypress/e2e/search.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,10 @@ describe('Search', () => {
// the shot number, timeframe and experiment id

cy.findByLabelText('open experiment search box').click();
cy.findByRole('combobox').type('221');
cy.findByRole('combobox').type('{downArrow}{enter}');
cy.findByRole('combobox', { name: 'Select your experiment' }).type('221');
cy.findByRole('combobox', { name: 'Select your experiment' }).type(
'{downArrow}{enter}'
);
cy.findByLabelText('close experiment search box').click();
cy.findByLabelText('open experiment search box')
.contains('ID 22110007')
Expand Down Expand Up @@ -925,8 +927,10 @@ describe('Search', () => {

it('searches within an experiment timeframe without the experiment id clearing', () => {
cy.findByLabelText('open experiment search box').click();
cy.findByRole('combobox').type('221');
cy.findByRole('combobox').type('{downArrow}{enter}');
cy.findByRole('combobox', { name: 'Select your experiment' }).type('221');
cy.findByRole('combobox', { name: 'Select your experiment' }).type(
'{downArrow}{enter}'
);
cy.findByLabelText('close experiment search box').click();
cy.findByLabelText('open experiment search box')
.contains('ID 22110007')
Expand All @@ -951,8 +955,10 @@ describe('Search', () => {

it('clears experiment id when it searches outside the given experiment id experiment timeframe', () => {
cy.findByLabelText('open experiment search box').click();
cy.findByRole('combobox').type('221');
cy.findByRole('combobox').type('{downArrow}{enter}');
cy.findByRole('combobox', { name: 'Select your experiment' }).type('221');
cy.findByRole('combobox', { name: 'Select your experiment' }).type(
'{downArrow}{enter}'
);
cy.findByLabelText('close experiment search box').click();
cy.findByLabelText('open experiment search box')
.contains('ID 22110007')
Expand All @@ -967,8 +973,10 @@ describe('Search', () => {
.should('not.exist');

cy.findByLabelText('open experiment search box').click();
cy.findByRole('combobox').type('221');
cy.findByRole('combobox').type('{downArrow}{enter}');
cy.findByRole('combobox', { name: 'Select your experiment' }).type('221');
cy.findByRole('combobox', { name: 'Select your experiment' }).type(
'{downArrow}{enter}'
);
cy.findByLabelText('close experiment search box').click();
cy.findByLabelText('open experiment search box')
.contains('ID 22110007')
Expand All @@ -985,8 +993,10 @@ describe('Search', () => {

it('searches within an experiment shot number range without the experiment id clearing', () => {
cy.findByLabelText('open experiment search box').click();
cy.findByRole('combobox').type('221');
cy.findByRole('combobox').type('{downArrow}{enter}');
cy.findByRole('combobox', { name: 'Select your experiment' }).type('221');
cy.findByRole('combobox', { name: 'Select your experiment' }).type(
'{downArrow}{enter}'
);
cy.findByLabelText('close experiment search box').click();
cy.findByLabelText('open experiment search box')
.contains('ID 22110007')
Expand Down Expand Up @@ -1029,8 +1039,10 @@ describe('Search', () => {

it('clears experiment id when it searches outside the given experiment id shot number range', () => {
cy.findByLabelText('open experiment search box').click();
cy.findByRole('combobox').type('221');
cy.findByRole('combobox').type('{downArrow}{enter}');
cy.findByRole('combobox', { name: 'Select your experiment' }).type('221');
cy.findByRole('combobox', { name: 'Select your experiment' }).type(
'{downArrow}{enter}'
);
cy.findByLabelText('close experiment search box').click();
cy.findByLabelText('open experiment search box')
.contains('ID 22110007')
Expand All @@ -1054,8 +1066,10 @@ describe('Search', () => {
.should('not.exist');

cy.findByLabelText('open experiment search box').click();
cy.findByRole('combobox').type('221');
cy.findByRole('combobox').type('{downArrow}{enter}');
cy.findByRole('combobox', { name: 'Select your experiment' }).type('221');
cy.findByRole('combobox', { name: 'Select your experiment' }).type(
'{downArrow}{enter}'
);
cy.findByLabelText('close experiment search box').click();
cy.findByLabelText('open experiment search box')
.contains('ID 22110007')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[`Channel Breadcrumbs should render correctly for path 1`] = `
class="MuiBreadcrumbs-li"
>
<a
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineAlways css-1ps4owl-MuiTypography-root-MuiLink-root"
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineAlways css-1xylxj1-MuiTypography-root-MuiLink-root"
href="#"
>
All Channels
Expand All @@ -39,7 +39,7 @@ exports[`Channel Breadcrumbs should render correctly for path 1`] = `
class="MuiBreadcrumbs-li"
>
<a
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineAlways css-1ps4owl-MuiTypography-root-MuiLink-root"
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineAlways css-1xylxj1-MuiTypography-root-MuiLink-root"
href="#"
>
test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exports[`Channel Metadata Panel should render correctly for no channel selected
exports[`Channel Metadata Panel should render correctly for scalar channel with units selected 1`] = `
<DocumentFragment>
<div
class="css-3y1137-MuiStack-root"
class="MuiStack-root css-3y1137-MuiStack-root"
>
<h3
class="MuiTypography-root MuiTypography-body1 css-ndaqpv-MuiTypography-root"
Expand Down Expand Up @@ -183,7 +183,7 @@ exports[`Channel Metadata Panel should render correctly for scalar channel with
exports[`Channel Metadata Panel should render correctly for system channel 1`] = `
<DocumentFragment>
<div
class="css-3y1137-MuiStack-root"
class="MuiStack-root css-3y1137-MuiStack-root"
>
<h3
class="MuiTypography-root MuiTypography-body1 css-ndaqpv-MuiTypography-root"
Expand Down Expand Up @@ -232,7 +232,7 @@ exports[`Channel Metadata Panel should render correctly for system channel 1`] =
exports[`Channel Metadata Panel should render correctly for waveform channel with units selected 1`] = `
<DocumentFragment>
<div
class="css-3y1137-MuiStack-root"
class="MuiStack-root css-3y1137-MuiStack-root"
>
<h3
class="MuiTypography-root MuiTypography-body1 css-ndaqpv-MuiTypography-root"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
exports[`Channel Search should render correctly 1`] = `
<DocumentFragment>
<div
class="MuiAutocomplete-root MuiAutocomplete-fullWidth MuiAutocomplete-hasPopupIcon css-12szb0g-MuiAutocomplete-root"
class="MuiAutocomplete-root MuiAutocomplete-fullWidth MuiAutocomplete-hasPopupIcon css-f34qqq-MuiAutocomplete-root"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined css-1sumxir-MuiFormLabel-root-MuiInputLabel-root"
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined css-1jy569b-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="true"
for=":r0:"
id=":r0:-label"
Expand Down
10 changes: 5 additions & 5 deletions src/channels/__snapshots__/channelTree.component.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`Channel Tree should render correctly for root 1`] = `
>
<span
aria-disabled="true"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary Mui-disabled MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-disabled MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
tabindex="-1"
>
<input
Expand Down Expand Up @@ -69,7 +69,7 @@ exports[`Channel Tree should render correctly for root 1`] = `
>
<span
aria-disabled="true"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary Mui-disabled MuiCheckbox-root MuiCheckbox-colorPrimary css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-disabled MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
tabindex="-1"
>
<input
Expand Down Expand Up @@ -129,7 +129,7 @@ exports[`Channel Tree should render correctly for sub node 1`] = `
>
<span
aria-disabled="true"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary Mui-disabled MuiCheckbox-root MuiCheckbox-colorPrimary css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-disabled MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
tabindex="-1"
>
<input
Expand Down Expand Up @@ -179,7 +179,7 @@ exports[`Channel Tree should render correctly for sub node 1`] = `
class="MuiListItemIcon-root css-cveggr-MuiListItemIcon-root"
>
<span
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-root MuiCheckbox-colorPrimary css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
aria-labelledby="checkbox-list-label-CHANNEL_ABCDE"
Expand Down Expand Up @@ -230,7 +230,7 @@ exports[`Channel Tree should render correctly for sub node 1`] = `
class="MuiListItemIcon-root css-cveggr-MuiListItemIcon-root"
>
<span
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary Mui-checked MuiCheckbox-root MuiCheckbox-colorPrimary css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-checked MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
aria-labelledby="checkbox-list-label-CHANNEL_BCDEF"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`Channels Dialogue renders channels dialogue when dialogue is open 1`] =
>
<div
aria-hidden="true"
class="MuiBackdrop-root css-yiavyu-MuiBackdrop-root-MuiDialog-backdrop"
class="MuiBackdrop-root MuiModal-backdrop css-yiavyu-MuiBackdrop-root-MuiDialog-backdrop"
style="opacity: 1; webkit-transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"
/>
<div
Expand Down Expand Up @@ -56,13 +56,13 @@ exports[`Channels Dialogue renders channels dialogue when dialogue is open 1`] =
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-true css-n4yv6w-MuiGrid-root"
>
<div
class="MuiAutocomplete-root MuiAutocomplete-fullWidth MuiAutocomplete-hasPopupIcon css-12szb0g-MuiAutocomplete-root"
class="MuiAutocomplete-root MuiAutocomplete-fullWidth MuiAutocomplete-hasPopupIcon css-f34qqq-MuiAutocomplete-root"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined css-1sumxir-MuiFormLabel-root-MuiInputLabel-root"
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined css-1jy569b-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="true"
for=":r1:"
id=":r1:-label"
Expand Down Expand Up @@ -195,7 +195,7 @@ exports[`Channels Dialogue renders channels dialogue when dialogue is open 1`] =
>
<span
aria-disabled="true"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary Mui-disabled MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-disabled MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
tabindex="-1"
>
<input
Expand Down Expand Up @@ -246,7 +246,7 @@ exports[`Channels Dialogue renders channels dialogue when dialogue is open 1`] =
>
<span
aria-disabled="true"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary Mui-disabled MuiCheckbox-root MuiCheckbox-colorPrimary css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-disabled MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
tabindex="-1"
>
<input
Expand Down Expand Up @@ -311,7 +311,7 @@ exports[`Channels Dialogue renders channels dialogue when dialogue is open 1`] =
</div>
</div>
<div
class="MuiDialogActions-root MuiDialogActions-spacing css-hlj6pa-MuiDialogActions-root"
class="MuiDialogActions-root MuiDialogActions-spacing css-knqc4i-MuiDialogActions-root"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium css-1e6y48t-MuiButtonBase-root-MuiButton-root"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`Filter dialogue component renders filter dialogue when dialogue is open
>
<div
aria-hidden="true"
class="MuiBackdrop-root css-yiavyu-MuiBackdrop-root-MuiDialog-backdrop"
class="MuiBackdrop-root MuiModal-backdrop css-yiavyu-MuiBackdrop-root-MuiDialog-backdrop"
style="opacity: 1; webkit-transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"
/>
<div
Expand Down Expand Up @@ -66,13 +66,13 @@ exports[`Filter dialogue component renders filter dialogue when dialogue is open
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-true css-1vd824g-MuiGrid-root"
>
<div
class="MuiAutocomplete-root MuiAutocomplete-fullWidth css-12szb0g-MuiAutocomplete-root"
class="MuiAutocomplete-root MuiAutocomplete-fullWidth css-f34qqq-MuiAutocomplete-root"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined css-1sumxir-MuiFormLabel-root-MuiInputLabel-root"
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined css-1jy569b-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="true"
for=":r1:"
id=":r1:-label"
Expand Down Expand Up @@ -202,7 +202,7 @@ exports[`Filter dialogue component renders filter dialogue when dialogue is open
</div>
</div>
<div
class="MuiDialogActions-root MuiDialogActions-spacing css-hlj6pa-MuiDialogActions-root"
class="MuiDialogActions-root MuiDialogActions-spacing css-knqc4i-MuiDialogActions-root"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium css-1e6y48t-MuiButtonBase-root-MuiButton-root"
Expand Down
Loading

0 comments on commit cfc5c95

Please sign in to comment.