0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Update ListBlock max_num tests from #7334 to reflect markup changes to action buttons from #7307

This commit is contained in:
Matt Westcott 2021-07-14 13:39:39 +01:00
parent f98bd6870d
commit 7e89180153

View File

@ -290,7 +290,7 @@ describe('telepath: wagtail.blocks.ListBlock with maxNum set', () => {
const assertCanAddBlock = () => {
// Test duplicate button
// querySelector always returns the first element it sees so this only checks the first block
expect(document.querySelector('button[data-duplicate-button]').getAttribute('disabled')).toBe(null);
expect(document.querySelector('button[title="Duplicate"]').getAttribute('disabled')).toBe(null);
// Test menu
expect(document.querySelector('button[data-streamfield-list-add]').getAttribute('disabled')).toBe(null);
@ -299,7 +299,7 @@ describe('telepath: wagtail.blocks.ListBlock with maxNum set', () => {
const assertCannotAddBlock = () => {
// Test duplicate button
// querySelector always returns the first element it sees so this only checks the first block
expect(document.querySelector('button[data-duplicate-button]').getAttribute('disabled')).toEqual('disabled');
expect(document.querySelector('button[title="Duplicate"]').getAttribute('disabled')).toEqual('disabled');
// Test menu
expect(document.querySelector('button[data-streamfield-list-add]').getAttribute('disabled')).toEqual('disabled');