mirror of
https://github.com/penpot/penpot.git
synced 2025-06-24 07:47:01 +02:00
👷 e2e tests for dashboard
Including test for signing/singup, projects, files, teams, and misc
This commit is contained in:
parent
26e5d57ced
commit
5103624fe0
32 changed files with 1285 additions and 127 deletions
|
@ -88,7 +88,7 @@ Cypress.Commands.add('clickMultiInViewport', (coords) => {
|
|||
Cypress.Commands.add('clearViewport', () => {
|
||||
cy.get(".viewport-controls").type('{ctrl}a');
|
||||
cy.get(".viewport-controls").type('{del}');
|
||||
cy.window().its("debug").invoke('reset_viewport')
|
||||
cy.window().its("debug").invoke('reset_viewport');
|
||||
})
|
||||
|
||||
Cypress.Commands.add('getBySel', (selector, ...args) => {
|
||||
|
@ -97,4 +97,18 @@ Cypress.Commands.add('getBySel', (selector, ...args) => {
|
|||
|
||||
Cypress.Commands.add('getBySelLike', (selector, ...args) => {
|
||||
return cy.get(`[data-test*=${selector}]`, ...args)
|
||||
})
|
||||
})
|
||||
|
||||
Cypress.Commands.add('uploadBinaryFile', (fileInputSelector, fileName) => {
|
||||
cy.fixture(fileName, "binary")
|
||||
.then(Cypress.Blob.binaryStringToBlob)
|
||||
.then(fileContent => {
|
||||
cy.get(fileInputSelector).attachFile({
|
||||
fileContent,
|
||||
filePath: fileName,
|
||||
encoding: 'utf-8',
|
||||
lastModified: new Date().getTime()
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue