refactor selectors of the buttons for creating collections and items

This commit is contained in:
juliannyas 2018-04-12 18:21:32 -03:00
parent c858d869bd
commit 41d30209fb
11 changed files with 133 additions and 133 deletions

View File

@ -22,86 +22,86 @@ describe('Category test', function () {
cy.get('td').should('not.contain', 'Book canceled')
})
// it('create category with status publish', function(){
// cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
// cy.location('hash').should('eq', '#/categories')
// //cy.get('#button-category-creation').click()
// cy.get('.button').click()
// cy.location('hash').should('eq', '#/categories/new')
// cy.get('#tainacan-text-name').type('Category publish')
// cy.get('#tainacan-text-description').type('description category publish')
// cy.get('#tainacan-select-status').select('Publish').should('have.value', 'publish')
// cy.get('#button-submit-category-creation').click()
// cy.location('hash').should('eq', '#/categories/')
// cy.get('td').should('contain', 'Category publish')
// })
//
// it('create category with status private', function(){
// cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
// cy.location('hash').should('eq', '#/categories')
// //cy.get('#button-category-creation').click()
// cy.get('.button').click()
// cy.location('hash').should('eq', '#/categories/new')
// cy.get('#tainacan-text-name').type('Category private')
// cy.get('#tainacan-text-description').type('description category private')
// cy.get('#tainacan-select-status').select('Private').should('have.value', 'private')
// cy.get('#button-submit-category-creation').click()
// cy.location('hash').should('eq', '#/categories/')
// cy.get('td').should('contain', 'Category private')
// })
//
// it('create category with status draft', function(){
// cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
// cy.location('hash').should('eq', '#/categories')
// //cy.get('#button-category-creation').click()
// cy.get('.button').click()
// cy.location('hash').should('eq', '#/categories/new')
// cy.get('#tainacan-text-name').type('Category draft')
// cy.get('#tainacan-text-description').type('description category draft')
// cy.get('#tainacan-select-status').select('Draft').should('have.value', 'draft')
// cy.get('#button-submit-category-creation').click()
// cy.location('hash').should('eq', '#/categories/')
// cy.get('td').should('not.contain', 'Category draft')
// })
//
// it('create category with status draft', function(){
// cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
// cy.location('hash').should('eq', '#/categories')
// //cy.get('#button-category-creation').click()
// cy.get('.button').click()
// cy.location('hash').should('eq', '#/categories/new')
// cy.get('#tainacan-text-name').type('Category trash')
// cy.get('#tainacan-text-description').type('description category trash')
// cy.get('#tainacan-select-status').select('Trash').should('have.value', 'trash')
// cy.get('#button-submit-category-creation').click()
// cy.location('hash').should('eq', '#/categories/')
// cy.get('td').should('not.contain', 'Category trash')
// })
//
// it('create category color', function(){
// cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
// cy.location('hash').should('eq', '#/categories')
// //cy.get('#button-category-creation').click()
// cy.get('.button').click()
// cy.location('hash').should('eq', '#/categories/new')
// cy.get('#tainacan-text-name').type('Category color')
// cy.get('#tainacan-text-description').type('description category color')
// cy.get('#tainacan-select-status').select('Publish').should('have.value', 'publish')
// cy.get('#button-submit-category-creation').click()
// cy.location('hash').should('eq', '#/categories/')
// cy.get('td').should('contain', 'Category color')
// })
//
// it('delete category color', function(){
// cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
// cy.location('hash').should('eq', '#/categories')
// cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
// cy.get('.b-table').should('contain', 'Category trash')
// cy.get(':nth-child(1) > [data-label="Actions"] > :nth-child(1) > #button-delete > .icon > .mdi').click()
// cy.get('.modal-card').should('have.class', 'animation-content')
// cy.get('.is-primary').click()
// cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
// cy.get('.b-table').should('not.contain', 'Category trash')
// })
it('create category with status publish', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
cy.location('hash').should('eq', '#/categories')
//cy.get('#button-category-creation').click()
cy.get('.button').click()
cy.location('hash').should('eq', '#/categories/new')
cy.get('#tainacan-text-name').type('Category publish')
cy.get('#tainacan-text-description').type('description category publish')
cy.get('#tainacan-select-status').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-category-creation').click()
cy.location('hash').should('eq', '#/categories/')
cy.get('td').should('contain', 'Category publish')
})
it('create category with status private', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
cy.location('hash').should('eq', '#/categories')
//cy.get('#button-category-creation').click()
cy.get('.button').click()
cy.location('hash').should('eq', '#/categories/new')
cy.get('#tainacan-text-name').type('Category private')
cy.get('#tainacan-text-description').type('description category private')
cy.get('#tainacan-select-status').select('Private').should('have.value', 'private')
cy.get('#button-submit-category-creation').click()
cy.location('hash').should('eq', '#/categories/')
cy.get('td').should('contain', 'Category private')
})
it('create category with status draft', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
cy.location('hash').should('eq', '#/categories')
//cy.get('#button-category-creation').click()
cy.get('.button').click()
cy.location('hash').should('eq', '#/categories/new')
cy.get('#tainacan-text-name').type('Category draft')
cy.get('#tainacan-text-description').type('description category draft')
cy.get('#tainacan-select-status').select('Draft').should('have.value', 'draft')
cy.get('#button-submit-category-creation').click()
cy.location('hash').should('eq', '#/categories/')
cy.get('td').should('not.contain', 'Category draft')
})
it('create category with status draft', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
cy.location('hash').should('eq', '#/categories')
//cy.get('#button-category-creation').click()
cy.get('.button').click()
cy.location('hash').should('eq', '#/categories/new')
cy.get('#tainacan-text-name').type('Category trash')
cy.get('#tainacan-text-description').type('description category trash')
cy.get('#tainacan-select-status').select('Trash').should('have.value', 'trash')
cy.get('#button-submit-category-creation').click()
cy.location('hash').should('eq', '#/categories/')
cy.get('td').should('not.contain', 'Category trash')
})
it('create category color', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
cy.location('hash').should('eq', '#/categories')
//cy.get('#button-category-creation').click()
cy.get('.button').click()
cy.location('hash').should('eq', '#/categories/new')
cy.get('#tainacan-text-name').type('Category color')
cy.get('#tainacan-text-description').type('description category color')
cy.get('#tainacan-select-status').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-category-creation').click()
cy.location('hash').should('eq', '#/categories/')
cy.get('td').should('contain', 'Category color')
})
it('delete category color', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/categories')
cy.location('hash').should('eq', '#/categories')
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Category trash')
cy.get(':nth-child(1) > [data-label="Actions"] > :nth-child(1) > #button-delete > .icon > .mdi').click()
cy.get('.modal-card').should('have.class', 'animation-content')
cy.get('.is-primary').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('not.contain', 'Category trash')
})
})
})

View File

@ -11,7 +11,7 @@ describe('Collection test', function () {
it('canceled collection', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book canceled')
cy.get('#tainacan-text-description').type('description book canceled')
@ -23,7 +23,7 @@ describe('Collection test', function () {
it('create collection with status publish', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book publish')
cy.get('#tainacan-text-description').type('description book publish')
@ -37,7 +37,7 @@ describe('Collection test', function () {
it('create collection with status private', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book private')
cy.get('#tainacan-text-description').type('description book private')
@ -51,7 +51,7 @@ describe('Collection test', function () {
it('create collection with status draft', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book draft')
cy.get('#tainacan-text-description').type('description book draft')
@ -65,7 +65,7 @@ describe('Collection test', function () {
it('create collection with status trash', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book trash')
cy.get('#tainacan-text-description').type('description book trash')
@ -79,7 +79,7 @@ describe('Collection test', function () {
it('delete collection', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book delete')
cy.get('#tainacan-text-description').type('description book delete')
@ -100,7 +100,7 @@ describe('Collection test', function () {
it('create many collections', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 1')
cy.get('#tainacan-text-description').type('description book 1')
@ -109,7 +109,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 1')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 2')
cy.get('#tainacan-text-description').type('description book 2')
@ -118,7 +118,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 2')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 3')
cy.get('#tainacan-text-description').type('description book 3')
@ -127,7 +127,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 3')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 4')
cy.get('#tainacan-text-description').type('description book 4')
@ -136,7 +136,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 4')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 5')
cy.get('#tainacan-text-description').type('description book 5')
@ -145,7 +145,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 5')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 6')
cy.get('#tainacan-text-description').type('description book 6')
@ -154,7 +154,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 6')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 7')
cy.get('#tainacan-text-description').type('description book 7')
@ -163,7 +163,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 7')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 8')
cy.get('#tainacan-text-description').type('description book 8')
@ -172,7 +172,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 8')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 9')
cy.get('#tainacan-text-description').type('description book 9')
@ -181,7 +181,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 9')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 10')
cy.get('#tainacan-text-description').type('description book 10')
@ -190,7 +190,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 10')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 11')
cy.get('#tainacan-text-description').type('description book 11')
@ -199,7 +199,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 11')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 12')
cy.get('#tainacan-text-description').type('description book 12')
@ -208,7 +208,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 12')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 13')
cy.get('#tainacan-text-description').type('description book 13')
@ -217,7 +217,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 13')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 14')
cy.get('#tainacan-text-description').type('description book 14')
@ -226,7 +226,7 @@ describe('Collection test', function () {
cy.get('.breadcrumbs > :nth-child(2) > .router-link-active').click()
cy.location('hash').should('eq', '#/collections')
cy.get('.b-table').should('contain', 'Book 14')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book 15')
cy.get('#tainacan-text-description').type('description book 15')

View File

@ -10,7 +10,7 @@ context('Category field test', function(){
it('create collection for create fields', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.get('#tainacan-text-name').type('Book Fields')
cy.get('#tainacan-text-description').type('Descrição book Fields')
cy.get('#tainacan-select-status').select('Publish').should('have.value', 'publish')

View File

@ -10,7 +10,7 @@ describe('Date field test', function() {
it('create collection for create fields', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.get('#tainacan-text-name').type('Date Fields')
cy.get('#tainacan-text-description').type('Description Date Fields')
cy.get('#tainacan-select-status').select('Publish').should('have.value', 'publish')

View File

@ -10,7 +10,7 @@ describe('Numeric field test', function() {
it('create collection for create fields', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.get('#tainacan-text-name').type('Numeric Fields')
cy.get('#tainacan-text-description').type('Description Numeric Fields')
cy.get('#tainacan-select-status').select('Publish').should('have.value', 'publish')

View File

@ -10,7 +10,7 @@ context('Relationship field test', function(){
it('create collection for create fields', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.get('#tainacan-text-name').type('Book Fields')
cy.get('#tainacan-text-description').type('Descrição book Fields')
cy.get('#tainacan-select-status').select('Publish').should('have.value', 'publish')

View File

@ -10,7 +10,7 @@ describe('Selectbox field test', function() {
it('create collection for create fields', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.get('#tainacan-text-name').type('Selectbox Fields')
cy.get('#tainacan-text-description').type('Description Selectbox Fields')
cy.get('#tainacan-select-status').select('Publish').should('have.value', 'publish')

View File

@ -10,7 +10,7 @@ describe('TextArea field test', function() {
it('create collection for create fields', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.get('#tainacan-text-name').type('TextArea Fields')
cy.get('#tainacan-text-description').type('Description TextArea Fields')
cy.get('#tainacan-select-status').select('Publish').should('have.value', 'publish')

View File

@ -10,7 +10,7 @@ describe('Text field test', function() {
it('create collection for create fields', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.get('#tainacan-text-name').type('Book Text Fields')
cy.get('#tainacan-text-description').type('Description book Fields')
cy.get('#tainacan-select-status').select('Publish').should('have.value', 'publish')

View File

@ -10,7 +10,7 @@ describe('Item tests', function () {
it('create collection for crud items', function(){
cy.visit('/wp-admin/admin.php?page=tainacan_admin#/collections')
cy.location('hash').should('eq', '#/collections')
cy.get('#button-collection-creation').click()
cy.get('#button-create-collection').click()
cy.location('hash').should('eq', '#/collections/new')
cy.get('#tainacan-text-name').type('Book Items')
cy.get('#tainacan-text-description').type('description book items')
@ -27,7 +27,7 @@ describe('Item tests', function () {
cy.location('hash').should('eq', '#/collections')
cy.get('[data-label="Name"] > :nth-child(1) > .clickable-row').click()
cy.get(':nth-child(4) > .router-link-active').should('contain', 'Items')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item canceled')
cy.get('#tainacan-textarea-description').type('Item canceled description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
@ -41,7 +41,7 @@ describe('Item tests', function () {
cy.location('hash').should('eq', '#/collections')
cy.get('[data-label="Name"] > :nth-child(1) > .clickable-row').click()
cy.get(':nth-child(4) > .router-link-active').should('contain', 'Items')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item publish')
cy.get('#tainacan-textarea-description').type('Item publish description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
@ -55,7 +55,7 @@ describe('Item tests', function () {
cy.location('hash').should('eq', '#/collections')
cy.get('[data-label="Name"] > :nth-child(1) > .clickable-row').click()
cy.get(':nth-child(4) > .router-link-active').should('contain', 'Items')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item private')
cy.get('#tainacan-textarea-description').type('Item private description')
cy.get('#status-select').select('Private').should('have.value', 'private')
@ -69,7 +69,7 @@ describe('Item tests', function () {
cy.location('hash').should('eq', '#/collections')
cy.get('[data-label="Name"] > :nth-child(1) > .clickable-row').click()
cy.get(':nth-child(4) > .router-link-active').should('contain', 'Items')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item draft')
cy.get('#tainacan-textarea-description').type('Item draft description')
cy.get('#status-select').select('Draft').should('have.value', 'draft')
@ -83,7 +83,7 @@ describe('Item tests', function () {
cy.location('hash').should('eq', '#/collections')
cy.get('[data-label="Name"] > :nth-child(1) > .clickable-row').click()
cy.get(':nth-child(4) > .router-link-active').should('contain', 'Items')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item trash')
cy.get('#tainacan-textarea-description').type('Item trash description')
cy.get('#status-select').select('Trash').should('have.value', 'trash')
@ -97,7 +97,7 @@ describe('Item tests', function () {
cy.location('hash').should('eq', '#/collections')
cy.get('[data-label="Name"] > :nth-child(1) > .clickable-row').click()
cy.get(':nth-child(4) > .router-link-active').should('contain', 'Items')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item delete')
cy.get('#tainacan-textarea-description').type('Item delete description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
@ -118,105 +118,105 @@ describe('Item tests', function () {
cy.location('hash').should('eq', '#/collections')
cy.get('[data-label="Name"] > :nth-child(1) > .clickable-row').click()
cy.get(':nth-child(4) > .router-link-active').should('contain', 'Items')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 1')
cy.get('#tainacan-textarea-description').type('Item 1 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 1')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 2')
cy.get('#tainacan-textarea-description').type('Item 2 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 2')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 3')
cy.get('#tainacan-textarea-description').type('Item 3 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 3')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 4')
cy.get('#tainacan-textarea-description').type('Item 4 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 4')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 5')
cy.get('#tainacan-textarea-description').type('Item 5 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 5')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 6')
cy.get('#tainacan-textarea-description').type('Item 6 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 6')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 7')
cy.get('#tainacan-textarea-description').type('Item 7 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 7')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 8')
cy.get('#tainacan-textarea-description').type('Item 8 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 8')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 9')
cy.get('#tainacan-textarea-description').type('Item 9 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 9')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 10')
cy.get('#tainacan-textarea-description').type('Item 10 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 10')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 11')
cy.get('#tainacan-textarea-description').type('Item 11 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 11')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 12')
cy.get('#tainacan-textarea-description').type('Item 12 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 12')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 13')
cy.get('#tainacan-textarea-description').type('Item 13 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 13')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 14')
cy.get('#tainacan-textarea-description').type('Item 14 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')
cy.get('#button-submit-item-creation').click()
cy.get('.breadcrumbs > :nth-child(3) > .router-link-active').click()
cy.get('.b-table').should('contain', 'Item 14')
cy.get('#button-item-creation').click()
cy.get('#button-create-item').click()
cy.get('#tainacan-text-title').type('Item 15')
cy.get('#tainacan-textarea-description').type('Item 15 description')
cy.get('#status-select').select('Publish').should('have.value', 'publish')

View File

@ -42,8 +42,8 @@ if [ "$OPTION" == "1" ]; then
elif [ "$OPTION" == "2" ]; then
./node_modules/.bin/cypress run --config baseUrl=$wp_url --record --key $cy_record_key
elif [ "$OPTION" == "3" ] && [ -n "$2" ]; then
UNIQUE_SPEC=cypress/integration/repository/${2}
./node_modules/.bin/cypress run --spec $UNIQUE_SPEC --config baseUrl=$wp_url
UNIQUE_SPEC=cypress/integration/repository/${2}
./node_modules/.bin/cypress run --spec $UNIQUE_SPEC --config baseUrl=$wp_url
else
echo -e "\nThe parameters provided are invalid\n"
fi