'Scenario: Duplicating an XBlock should not shift the page if the XBlock is not at the end.
Given that I have a library in Studio with 40 XBlocks
When I duplicate the third XBlock
Then the page should not change
And the duplicate XBlock should be there
And it should show a preview
And there should not be more than 10 XBlocks visible.'

def test_duplicate_xblock_pagination(self):

    third_block_id = self.lib_page.xblocks[2].locator
    self.lib_page.click_duplicate_button(third_block_id)
    self.lib_page.wait_until_ready()
    target = self.lib_page.xblocks[3]
    self.assertIn('Duplicate', target.name)
    self.assertFalse(target.is_placeholder())
    self.assertEqual(len(self.lib_page.xblocks), 10)
