Skip to content

Commit

Permalink
Synonyms tests: wp-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia committed Mar 17, 2022
1 parent 6e63fb2 commit 4f54f3b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/cypress/integration/features/search/synonyms.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,22 @@ describe('Post Search Feature - Synonyms Functionality', () => {
'bar',
).should('exist');
});
it('Can preserve synonyms if a sync is performed', () => {
cy.visitAdminPage('admin.php?page=elasticpress-synonyms');
cy.get('.page-title-action').then(($button) => {
if ($button.text() === 'Switch to Advanced Text Editor') {
$button.click();
}
});

cy.get('#ep-synonym-input').clearThenType('foo => bar{enter}list,of,words');
cy.get('#synonym-root .button-primary').click();

cy.wpCli('elasticpress index --setup --yes');

cy.visitAdminPage('admin.php?page=elasticpress-synonyms');
cy.get('#ep-synonym-input')
.should('contain', 'foo => bar')
.should('contain', 'list, of, words');
});
});

0 comments on commit 4f54f3b

Please sign in to comment.