Skip to content

Commit

Permalink
feat: add a e2e test for partial import/export from the gui
Browse files Browse the repository at this point in the history
  • Loading branch information
boazpoolman committed Dec 30, 2024
1 parent 54bec39 commit b25fe0c
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions admin/src/index.cy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,36 +39,36 @@ describe('Config Sync', () => {
});
});

// it('Partial import & export', () => {
// cy.login();
// cy.navigateToInterface();
// cy.initialExport();

// cy.makeConfigChanges();

// cy.navigateToInterface();

// cy.get('button[aria-label="Select all entries"]').click();

// cy.intercept({
// method: 'POST',
// url: '/config-sync/import',
// }).as('importConfig');
// cy.get('button[aria-label="Select plugin_upload_settings"]').click();
// cy.get('button').contains('Import').click();
// cy.get('button').contains('Yes, import').click();
// cy.wait('@importConfig').its('response.statusCode').should('equal', 200);
// cy.contains('plugin_users-permissions_advanced');
// cy.contains('plugin_users-permissions_email');

// cy.intercept({
// method: 'POST',
// url: '/config-sync/export',
// }).as('exportConfig');
// cy.get('button[aria-label="Select plugin_users-permissions_advanced"]').click();
// cy.get('button').contains('Export').click();
// cy.get('button').contains('Yes, export').click();
// cy.wait('@exportConfig').its('response.statusCode').should('equal', 200);
// cy.contains('plugin_users-permissions_email');
// });
it('Partial import & export', () => {
cy.login();
cy.navigateToInterface();
cy.initialExport();

cy.makeConfigChanges();

cy.navigateToInterface();

cy.get('button[aria-label="Select all entries"]').click();

cy.intercept({
method: 'POST',
url: '/config-sync/import',
}).as('importConfig');
cy.get('button[aria-label="Select plugin_upload_settings"]').click();
cy.get('button').contains('Import').click();
cy.get('button').contains('Yes, import').click();
cy.wait('@importConfig').its('response.statusCode').should('equal', 200);
cy.contains('plugin_users-permissions_advanced');
cy.contains('plugin_users-permissions_email');

cy.intercept({
method: 'POST',
url: '/config-sync/export',
}).as('exportConfig');
cy.get('button[aria-label="Select plugin_users-permissions_advanced"]').click();
cy.get('button').contains('Export').click();
cy.get('button').contains('Yes, export').click();
cy.wait('@exportConfig').its('response.statusCode').should('equal', 200);
cy.contains('plugin_users-permissions_email');
});
});

0 comments on commit b25fe0c

Please sign in to comment.