'Scenario: Ensure that removing an XBlock shifts other blocks back.
Given that I have a library in Studio with 40 XBlocks
Then 10 are displayed
And I will be on the first page
When I delete the third XBlock
There will be 10 displayed
And the first XBlock will be the first one
And the last XBlock will be the 11th one
And I will be on the first page'

def test_delete_shifts_blocks(self):

    self.assertEqual(len(self.lib_page.xblocks), 10)
    self.assertEqual(self.lib_page.get_page_number(), '1')
    self.lib_page.click_delete_button(self.lib_page.xblocks[2].locator, confirm=True)
    self.assertEqual(len(self.lib_page.xblocks), 10)
    self.assertEqual(self.lib_page.xblocks[0].name, '1')
    self.assertEqual(self.lib_page.xblocks[(-1)].name, '11')
    self.assertEqual(self.lib_page.get_page_number(), '1')
