Skip to content

Commit

Permalink
Fix .gitignore and bring back missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmielnik committed Oct 27, 2024
1 parent fcb31b6 commit 3cdb524
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
.nx/
build/
coverage/
cypress/
cypress/downloads
cypress/screenshots
node_modules/
*.eslintcache
*.db
Expand Down
41 changes: 41 additions & 0 deletions cypress/e2e/bugs/363-dictionary-input-unique-words.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import {
closeModal,
getDictionaryInput,
getResult,
getSettingOption,
getSettingsButton,
solve,
typeBoard,
typeRack,
unregisterServiceWorkers,
visitIndex,
} from '../../support';

/*
* @see https://github.com/kamilmielnik/scrabble-solver/issues/363
*/
describe('#363 - Dictionary input should display unique words', () => {
beforeEach(async () => {
await unregisterServiceWorkers();
});

afterEach(() => {
cy.clearLocalStorage();
});

it('highlighting a word should cause only unique new words to be looked up in the dictionary', () => {
cy.intercept('GET', '/api/dictionary/tr-TR/*', { delay: 100 }).as('dictionary');

visitIndex();
getSettingsButton().realClick();
getSettingOption('Language', 'Türkçe').check();
closeModal();
typeBoard('ponje', 'horizontal', 3, 7);
typeRack('er');
solve();

getResult(0).realHover();

getDictionaryInput().should('have.value', 'er, je');
});
});

0 comments on commit 3cdb524

Please sign in to comment.