-
-
Notifications
You must be signed in to change notification settings - Fork 702
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
8,922 additions
and
4,937 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
describe('actions Tests', () => { | ||
beforeEach(() => { | ||
cy.autologin(); | ||
cy.createContent({ | ||
contentType: 'Document', | ||
contentId: 'my-page-1', | ||
contentTitle: 'My Page-1', | ||
allow_discussion: true, | ||
} | ||
); | ||
cy.visit('/contents'); | ||
}); | ||
it('copy', function () { | ||
cy.get('tr[aria-label="/my-page-1"]').within(() => { | ||
cy.get('svg[class="icon dropdown-popup-trigger"]').click(); | ||
}); | ||
cy.get('a[class="item right-dropdown icon-align"]').eq(2).click(); | ||
cy.get('button[class="ui button icon item"]').click(); | ||
cy.visit('/contents'); | ||
cy.get('tr[aria-label="/copy_of_my-page-1"]').within(()=>{ | ||
cy.get('a[class="icon-align-name"]').should('have.attr', 'href', '/copy_of_my-page-1/contents'); | ||
}) | ||
}); | ||
it('delete', function () { | ||
cy.get('tr[aria-label="/my-page-1"]').within(() => { | ||
cy.get('button[class="ui basic icon button"]').click({ multiple: true }); | ||
}); | ||
cy.get('button[class="ui button icon item"]').eq(6).click(); | ||
cy.get('button[class="ui primary button"]').findByText('Delete').click(); | ||
cy.visit('/contents'); | ||
cy.get('tr').should('not.contain','/my-page-1'); | ||
|
||
}); | ||
it('cut', function () { | ||
cy.get('tr[aria-label="/my-page-1"]').within(() => { | ||
cy.get('svg[class="icon dropdown-popup-trigger"]').click(); | ||
}); | ||
cy.get('a[class="item right-dropdown icon-align"]').eq(1).click(); | ||
cy.get('button[class="ui button icon item"]').click(); | ||
cy.visit('/contents'); | ||
cy.get('tr[aria-label="/my-page-1"]').within(()=>{ | ||
cy.get('a[class="icon-align-name"]').should('have.attr', 'href', '/my-page-1/contents'); | ||
}) | ||
}); | ||
it('rename', function () { | ||
cy.get('tr[aria-label="/my-page-1"]').within(() => { | ||
cy.get('button[class="ui basic icon button"]').click({ multiple: true }); | ||
}); | ||
cy.get('button[class="ui button icon item"]').eq(0).click(); | ||
cy.get('#field-0_title').clear().type('my-page-rename'); | ||
cy.get('#field-0_id').clear().type('my-page-rename'); | ||
cy.get('button[class="ui basic circular primary right floated button"]').click(); | ||
cy.get('tr[aria-label="/my-page-rename"]').within(()=>{ | ||
cy.get('a[class="icon-align-name"]').should('have.attr', 'href', '/my-page-rename/contents'); | ||
}) | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
describe('delete Tests', () => { | ||
beforeEach(() => { | ||
cy.autologin(); | ||
cy.createContent({ | ||
contentType: 'Document', | ||
contentId: 'my-page', | ||
contentTitle: 'My Page', | ||
allow_discussion: true, | ||
} | ||
); | ||
cy.visit('/contents'); | ||
}); | ||
it('delete', function () { | ||
cy.get('tr[aria-label="/my-page"]').within(() => { | ||
cy.get('button[class="ui basic icon button"]').click({ multiple: true }); | ||
}); | ||
cy.get('button[class="ui button icon item"]').eq(6).click(); | ||
cy.get('button[class="ui primary button"]').findByText('Delete').click(); | ||
cy.get('tr').should('not.contain','/my-page'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
describe('workflow Tests', () => { | ||
beforeEach(() => { | ||
cy.autologin(); | ||
cy.createContent({ | ||
contentType: 'Document', | ||
contentId: 'my-page', | ||
contentTitle: 'My Page', | ||
allow_discussion: true, | ||
} | ||
); | ||
cy.visit('/contents'); | ||
}); | ||
it('change workflow state recursively', function () { | ||
cy.get('tr[aria-label="/my-page"]').within(() => { | ||
cy.get('button[class="ui basic icon button"]').click({ multiple: true }); | ||
}) | ||
cy.get('button[class="ui button icon item"]').eq(1).click(); | ||
cy.findByText('Select…').click(); | ||
cy.findByText('Publish').click(); | ||
cy.findByTitle('Save').click(); | ||
cy.get('tr[aria-label="/my-page"]').within(() => { | ||
cy.get('td > div').should('contain','Published'); | ||
}) | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.