mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 09:25:46 +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();
|
).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();
|
||||||
|
|
||||||
|
@ -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: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user