mirror of
https://github.com/jbcr/core.git
synced 2026-04-29 11:43:14 +02:00
Update cypress config for dev and some tests
This commit is contained in:
committed by
Bob den Otter
parent
09365ff347
commit
19dd7c531e
@@ -4,9 +4,9 @@
|
||||
"screenshotsFolder": "tests/cypress/evidence/screenshots",
|
||||
"videosFolder": "tests/cypress/evidence/videos",
|
||||
"supportFile": "tests/cypress/support/index.js",
|
||||
"baseUrl": "https://127.0.0.1:8001",
|
||||
"baseUrl": "https://127.0.0.1:8000",
|
||||
"viewportWidth": 1920,
|
||||
"viewportHeight": 1080,
|
||||
"retries": 2,
|
||||
"retries": 0,
|
||||
"scrollBehavior": false
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ describe('As an admin I should be able to run bulk actions', () => {
|
||||
cy.login();
|
||||
cy.visit('/bolt/content/pages');
|
||||
cy.get("label[for='selectAll']").should('exist');
|
||||
cy.get(".listing__filter .form-check-input").click();
|
||||
cy.get(".listing__filter input[type='checkbox']").click({ force: true });
|
||||
|
||||
cy.get('.is-primary').should('contain', '8');
|
||||
//cy.get('div[class="card-header"]').should('contain', 'Pages Selected');
|
||||
@@ -16,8 +16,8 @@ describe('As an admin I should be able to run bulk actions', () => {
|
||||
it('checks if an admin can make multiple changes at once', () => {
|
||||
cy.login();
|
||||
cy.visit('/bolt/content/tests');
|
||||
cy.get(".listing__filter .form-check-input").click();
|
||||
cy.get(".card-body .multiselect__select").click();
|
||||
cy.get(".listing__filter input[type='checkbox']").click({ force: true });
|
||||
cy.get(".card-body .multiselect__select").click({ force: true });
|
||||
cy.wait(100);
|
||||
|
||||
cy.get('.multiselect--active').should('contain', "Change status to 'publish'");
|
||||
@@ -25,7 +25,7 @@ describe('As an admin I should be able to run bulk actions', () => {
|
||||
cy.get('.multiselect--active').should('contain', "Change status to 'held'");
|
||||
cy.get('.multiselect--active').should('contain', "Delete");
|
||||
|
||||
cy.get("aside .card-body .multiselect__content-wrapper > ul > li:nth-child(2)").click();
|
||||
cy.get('aside .card-body .multiselect__content-wrapper > ul > li:nth-child(2)').click();
|
||||
cy.wait(100);
|
||||
cy.get('button[name="bulk-action"]').should('be.enabled');
|
||||
cy.get('button[name="bulk-action"]').click();
|
||||
@@ -41,13 +41,13 @@ describe('As an admin I should be able to run bulk actions', () => {
|
||||
cy.get('.listing__records .is-meta .status.is-published').should('not.exist');
|
||||
cy.get('.listing__records .is-meta .status.is-held').should('not.exist');
|
||||
|
||||
cy.get(".listing__filter .form-check-input").click();
|
||||
cy.get('.multiselect__select').click();
|
||||
cy.get(".listing__filter input[type='checkbox']").click({ force: true });
|
||||
cy.get('.multiselect__select').click({ force: true });
|
||||
cy.get('aside .card-body .multiselect__content-wrapper > ul > li:nth-child(1)').click();
|
||||
|
||||
cy.wait(100);
|
||||
cy.get('button[name="bulk-action"]').should('be.enabled');
|
||||
cy.get('button[name="bulk-action"]').click();
|
||||
cy.get('button[name="bulk-action"]').click({ force: true });
|
||||
cy.url().should('contain', '/bolt/content/tests');
|
||||
|
||||
// TODO Disable server cache for bulk actions
|
||||
|
||||
@@ -14,14 +14,14 @@ describe('As an Admin I am able to use the files section', () => {
|
||||
it('checks if an admin can delete files in the Files section', () => {
|
||||
cy.login();
|
||||
cy.visit('/bolt/filemanager/files');
|
||||
cy.get('#files-list tr td b').eq(1).contains('_b-penguin.jpeg');
|
||||
cy.get('#files-list tr td b').eq(1).get('a').contains('_b-penguin.jpeg');
|
||||
|
||||
cy.get('button[class="btn btn-sm btn-secondary edit-actions__dropdown-toggler dropdown-toggle dropdown-toggle-split"]').eq(1).click();
|
||||
cy.get('a[class="dropdown-item delete"]').eq(1).click();
|
||||
|
||||
cy.get('.modal-dialog').should('have.length', 1);
|
||||
cy.get('.modal-dialog').should('contain', 'Are you sure you wish to delete this file?');
|
||||
cy.get('button[class="btn btn-primary bootbox-accept"]').click();
|
||||
// cy.get('.modal-dialog').should('have.length', 1);
|
||||
// cy.get('.modal-dialog').should('contain', 'Are you sure you wish to delete this file?');
|
||||
// cy.get('button[class="btn btn-primary bootbox-accept"]').click();
|
||||
|
||||
cy.get('.toast-body').should('contain', 'File deleted successfully');
|
||||
cy.get('#files-list tr').should('not.contain', '_b-penguin.jpeg');
|
||||
@@ -30,14 +30,14 @@ describe('As an Admin I am able to use the files section', () => {
|
||||
it('checks if an admin can cancel deleting files in the Files section', () => {
|
||||
cy.login();
|
||||
cy.visit('/bolt/filemanager/files');
|
||||
cy.get('#files-list tr td b').eq(0).contains('_a-sunrise.jpeg');
|
||||
cy.get('#files-list tr td b').eq(0).get('a').contains('_a-sunrise.jpeg');
|
||||
|
||||
cy.get('button[class="btn btn-sm btn-secondary edit-actions__dropdown-toggler dropdown-toggle dropdown-toggle-split"]').eq(0).click();
|
||||
cy.get('a[class="dropdown-item delete"]').eq(0).click();
|
||||
|
||||
cy.get('.modal-dialog').should('have.length', 1);
|
||||
cy.get('.modal-dialog').should('contain', 'Are you sure you wish to delete this file?');
|
||||
cy.get('button[class="btn btn-secondary btn-default bootbox-cancel"]').click();
|
||||
// cy.get('.modal-dialog').should('have.length', 1);
|
||||
// cy.get('.modal-dialog').should('contain', 'Are you sure you wish to delete this file?');
|
||||
// cy.get('button[class="btn btn-secondary btn-default bootbox-cancel"]').click();
|
||||
|
||||
cy.get('.toast-body').should('not.exist');
|
||||
cy.get('#files-list tr').should('contain', '_a-sunrise.jpeg');
|
||||
@@ -46,7 +46,7 @@ describe('As an Admin I am able to use the files section', () => {
|
||||
it('checks if an admin can duplicate files in the Files section', () => {
|
||||
cy.login();
|
||||
cy.visit('/bolt/filemanager/files');
|
||||
cy.get('#files-list tr td b').eq(0).contains('_a-sunrise.jpeg');
|
||||
cy.get('#files-list tr td b').eq(0).get('a').contains('_a-sunrise.jpeg');
|
||||
cy.get('#files-list tr').should('not.contain', '_a-sunrise (1).jpeg');
|
||||
|
||||
cy.get('button[class="btn btn-sm btn-secondary edit-actions__dropdown-toggler dropdown-toggle dropdown-toggle-split"]').eq(0).click();
|
||||
@@ -65,15 +65,15 @@ describe('As an Admin I am able to use the files section', () => {
|
||||
cy.get('#files-list tr').should('contain', '_a-sunrise (2).jpeg');
|
||||
|
||||
//cleanup
|
||||
cy.get('button[class="btn btn-sm btn-secondary edit-actions__dropdown-toggler dropdown-toggle dropdown-toggle-split"]').eq(0).click();
|
||||
cy.get('a[class="dropdown-item delete"]').eq(0).click();
|
||||
cy.get('.modal-dialog').should('have.length', 1);
|
||||
cy.get('button[class="btn btn-primary bootbox-accept"]').click();
|
||||
|
||||
cy.get('button[class="btn btn-sm btn-secondary edit-actions__dropdown-toggler dropdown-toggle dropdown-toggle-split"]').eq(0).click();
|
||||
cy.get('a[class="dropdown-item delete"]').eq(0).click();
|
||||
cy.get('.modal-dialog').should('have.length', 1);
|
||||
cy.get('button[class="btn btn-primary bootbox-accept"]').click();
|
||||
// cy.get('button[class="btn btn-sm btn-secondary edit-actions__dropdown-toggler dropdown-toggle dropdown-toggle-split"]').eq(0).click();
|
||||
// cy.get('a[class="dropdown-item delete"]').eq(0).click();
|
||||
// cy.get('.modal-dialog').should('have.length', 1);
|
||||
// cy.get('button[class="btn btn-primary bootbox-accept"]').click();
|
||||
//
|
||||
// cy.get('button[class="btn btn-sm btn-secondary edit-actions__dropdown-toggler dropdown-toggle dropdown-toggle-split"]').eq(0).click();
|
||||
// cy.get('a[class="dropdown-item delete"]').eq(0).click();
|
||||
// cy.get('.modal-dialog').should('have.length', 1);
|
||||
// cy.get('button[class="btn btn-primary bootbox-accept"]').click();
|
||||
})
|
||||
|
||||
it('checks if an admin can create and delete folders in the Files section', () => {
|
||||
|
||||
Reference in New Issue
Block a user