1
0

Fix saving showing archived setting

This commit is contained in:
kolaente
2021-06-03 15:31:39 +02:00
parent 0f42ed3cf7
commit 4a3b4982ab
4 changed files with 51 additions and 8 deletions

View File

@ -8,14 +8,14 @@
* @param table
* @param data
*/
export function seed(table, data = {}) {
if(data === null) {
export function seed(table, data = {}, truncate = true) {
if (data === null) {
data = []
}
cy.request({
method: 'PATCH',
url: `${Cypress.env('API_URL')}/test/${table}`,
url: `${Cypress.env('API_URL')}/test/${table}?truncate=${truncate ? 'true' : 'false'}`,
headers: {
'Authorization': Cypress.env('TEST_SECRET'),
},