mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
new test + adjustment
This commit is contained in:
parent
dfab9f631e
commit
0fbd3d3b0c
@ -192,6 +192,25 @@ describe('ADMIN | CM | LV | Configure the view', () => {
|
||||
).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 () => {
|
||||
const history = createMemoryHistory();
|
||||
|
||||
|
@ -212,11 +212,8 @@ describe('CONTENT MANAGER | CONTAINERS | ListSettingsView | reducer', () => {
|
||||
};
|
||||
const expected = {
|
||||
...state,
|
||||
fieldToEdit: 'cover',
|
||||
fieldForm: {
|
||||
label: 'New Cover',
|
||||
sortable: true,
|
||||
},
|
||||
fieldToEdit: '',
|
||||
fieldForm: {},
|
||||
modifiedData: {
|
||||
metadatas: {
|
||||
cover: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user