coordinate screenshots via data-id
This commit is contained in:
parent
02dd9b9c1c
commit
f463143199
2 changed files with 4 additions and 1 deletions
|
|
@ -1,9 +1,11 @@
|
|||
describe("Block Images", () => {
|
||||
it("download all block images", () => {
|
||||
cy.visit("http://localhost:5173/")
|
||||
cy.get("[data-id]").each(($el) => {
|
||||
cy.get("[data-id^='block-type-']").each(($el) => {
|
||||
cy.wrap($el).rightclick({ force: true })
|
||||
cy.contains("Save Block as PNG...").click()
|
||||
}).then(blockElements => {
|
||||
cy.log(`Saved ${blockElements.length} block images.`)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ export default class WorkspaceExporter {
|
|||
languageVersion: 0,
|
||||
blocks: allBlocks.map((block, index) => ({
|
||||
...block,
|
||||
id: `block-type-${block.type}`,
|
||||
x: 50,
|
||||
y: 50*index
|
||||
}))
|
||||
|
|
|
|||
Loading…
Reference in a new issue