mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Merge pull request #14178 from strapi/fix/list-settings-view-tests
CM: Fix test errors in ListSettingsView
This commit is contained in:
commit
ecb3643ab5
@ -1,6 +1,18 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`ADMIN | CM | LV | Configure the view renders and matches the snapshot 1`] = `
|
||||
.c84 {
|
||||
border: 0;
|
||||
-webkit-clip: rect(0 0 0 0);
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.c22 {
|
||||
background: #ffffff;
|
||||
padding-top: 24px;
|
||||
@ -978,9 +990,10 @@ exports[`ADMIN | CM | LV | Configure the view renders and matches the snapshot 1
|
||||
}
|
||||
}
|
||||
|
||||
<div
|
||||
<div>
|
||||
<div
|
||||
class="c0"
|
||||
>
|
||||
>
|
||||
<div
|
||||
class="c1 c2"
|
||||
>
|
||||
@ -1829,6 +1842,29 @@ exports[`ADMIN | CM | LV | Configure the view renders and matches the snapshot 1
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c84"
|
||||
>
|
||||
<p
|
||||
aria-live="polite"
|
||||
aria-relevant="all"
|
||||
id="live-region-log"
|
||||
role="log"
|
||||
/>
|
||||
<p
|
||||
aria-live="polite"
|
||||
aria-relevant="all"
|
||||
id="live-region-status"
|
||||
role="status"
|
||||
/>
|
||||
<p
|
||||
aria-live="assertive"
|
||||
aria-relevant="all"
|
||||
id="live-region-alert"
|
||||
role="alert"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@ -2083,25 +2119,6 @@ exports[`ADMIN | CM | LV | Configure the view should add field 1`] = `
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.c85 {
|
||||
background: #212134;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.c87 {
|
||||
font-weight: 600;
|
||||
color: #ffffff;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.c86 {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.c82 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
@ -2734,92 +2751,6 @@ exports[`ADMIN | CM | LV | Configure the view should add field 1`] = `
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.c95 {
|
||||
color: #32324d;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.43;
|
||||
}
|
||||
|
||||
.c88 {
|
||||
background: #ffffff;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.c91 {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.c94 {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.c92 {
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: row;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.c89 {
|
||||
box-shadow: 0px 1px 4px rgba(33,33,52,0.1);
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
border: 1px solid #eaeaef;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.c90 {
|
||||
max-height: 15rem;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.c90::-webkit-scrollbar {
|
||||
-webkit-appearance: none;
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.c90::-webkit-scrollbar-track {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.c90::-webkit-scrollbar-thumb {
|
||||
background: #eaeaef;
|
||||
border-radius: 4px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.c93 {
|
||||
border: none;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
color: #32324d;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.c93:focus {
|
||||
background-color: #f0f0ff;
|
||||
}
|
||||
|
||||
.c93:not([aria-disabled]):hover {
|
||||
background-color: #f0f0ff;
|
||||
}
|
||||
|
||||
.c76 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
@ -2927,7 +2858,7 @@ exports[`ADMIN | CM | LV | Configure the view should add field 1`] = `
|
||||
}
|
||||
}
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<div
|
||||
class="c0"
|
||||
>
|
||||
@ -3905,82 +3836,5 @@ exports[`ADMIN | CM | LV | Configure the view should add field 1`] = `
|
||||
role="alert"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
data-react-portal="true"
|
||||
>
|
||||
<div
|
||||
class="c85 c86"
|
||||
id="tooltip-7"
|
||||
role="tooltip"
|
||||
style="left: 0px; top: -8px;"
|
||||
>
|
||||
<p
|
||||
class="c87"
|
||||
>
|
||||
Add a field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
data-react-portal="true"
|
||||
>
|
||||
<div
|
||||
class="c88 c89"
|
||||
style="left: 0px; top: 4px;"
|
||||
>
|
||||
<div
|
||||
class="c90"
|
||||
>
|
||||
<ul
|
||||
class="c91"
|
||||
id="simplemenu-4"
|
||||
role="menu"
|
||||
>
|
||||
<li
|
||||
class="c92"
|
||||
role="menuitem"
|
||||
>
|
||||
<button
|
||||
class="c93"
|
||||
role="menuitem"
|
||||
tabindex="0"
|
||||
type="button"
|
||||
>
|
||||
<div
|
||||
class="c94"
|
||||
>
|
||||
<span
|
||||
class="c95"
|
||||
>
|
||||
averagePrice
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
</li>
|
||||
<li
|
||||
class="c92"
|
||||
role="menuitem"
|
||||
>
|
||||
<button
|
||||
class="c93"
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
type="button"
|
||||
>
|
||||
<div
|
||||
class="c94"
|
||||
>
|
||||
<span
|
||||
class="c95"
|
||||
>
|
||||
since
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
`;
|
||||
|
@ -121,7 +121,7 @@ describe('ADMIN | CM | LV | Configure the view', () => {
|
||||
expect(screen.getByText('Configure the view - Michka')).toBeInTheDocument()
|
||||
);
|
||||
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should keep plugins query params when arriving on the page and going back', async () => {
|
||||
@ -145,7 +145,7 @@ describe('ADMIN | CM | LV | Configure the view', () => {
|
||||
it('should add field', async () => {
|
||||
const history = createMemoryHistory();
|
||||
|
||||
const { container } = render(makeApp(history), { container: document.body });
|
||||
const { container } = render(makeApp(history));
|
||||
|
||||
await waitFor(() =>
|
||||
expect(screen.getByText('Configure the view - Michka')).toBeInTheDocument()
|
||||
@ -180,7 +180,7 @@ describe('ADMIN | CM | LV | Configure the view', () => {
|
||||
it('should open edit modal', async () => {
|
||||
const history = createMemoryHistory();
|
||||
|
||||
render(makeApp(history), { container: document.body });
|
||||
render(makeApp(history));
|
||||
await waitFor(() =>
|
||||
expect(screen.getByText('Configure the view - Michka')).toBeInTheDocument()
|
||||
);
|
||||
@ -195,7 +195,7 @@ describe('ADMIN | CM | LV | Configure the view', () => {
|
||||
it('should not show sortable toggle input if field not sortable', async () => {
|
||||
const history = createMemoryHistory();
|
||||
|
||||
const { queryByText } = render(makeApp(history), { container: document.body });
|
||||
const { queryByText } = render(makeApp(history));
|
||||
await waitFor(() =>
|
||||
expect(screen.getByText('Configure the view - Michka')).toBeInTheDocument()
|
||||
);
|
||||
@ -208,7 +208,7 @@ describe('ADMIN | CM | LV | Configure the view', () => {
|
||||
it('should show sortable toggle input if field sortable', async () => {
|
||||
const history = createMemoryHistory();
|
||||
|
||||
const { queryByTestId } = render(makeApp(history), { container: document.body });
|
||||
const { queryByTestId } = render(makeApp(history));
|
||||
await waitFor(() =>
|
||||
expect(screen.getByText('Configure the view - Michka')).toBeInTheDocument()
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user