new test + adjustment

This commit is contained in:
Luis Rodriguez 2023-04-13 10:10:53 -05:00
parent dfab9f631e
commit 0fbd3d3b0c
2 changed files with 21 additions and 5 deletions

View File

@ -192,6 +192,25 @@ describe('ADMIN | CM | LV | Configure the view', () => {
).toBeInTheDocument(); ).toBeInTheDocument();
}); });
it('should close edit modal onSubmit', async () => {
const history = createMemoryHistory();
const { queryByText } = render(makeApp(history));
await waitFor(() =>
expect(screen.getByText('Configure the view - Michka')).toBeInTheDocument()
);
fireEvent.click(screen.getByLabelText('Edit address'));
expect(
screen.getByText("This value overrides the label displayed in the table's head")
).toBeInTheDocument();
fireEvent.click(screen.getByText('Finish'));
expect(queryByText("This value overrides the label displayed in the table's head")).not.toBeInTheDocument();
});
it('should not show sortable toggle input if field not sortable', async () => { it('should not show sortable toggle input if field not sortable', async () => {
const history = createMemoryHistory(); const history = createMemoryHistory();

View File

@ -212,11 +212,8 @@ describe('CONTENT MANAGER | CONTAINERS | ListSettingsView | reducer', () => {
}; };
const expected = { const expected = {
...state, ...state,
fieldToEdit: 'cover', fieldToEdit: '',
fieldForm: { fieldForm: {},
label: 'New Cover',
sortable: true,
},
modifiedData: { modifiedData: {
metadatas: { metadatas: {
cover: { cover: {