scrabble-solver 2.13.13 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build.yml +6 -14
- package/.github/workflows/cypress.yml +12 -8
- package/.github/workflows/eslint.yml +4 -10
- package/.github/workflows/jest.yml +4 -10
- package/.nx/cache/nx_files.nxt +0 -0
- package/.nx/workspace-data/file-map.json +1350 -1338
- package/.nx/workspace-data/lockfile.hash +1 -1
- package/.nx/workspace-data/parsed-lock-file.json +352 -277
- package/.nx/workspace-data/project-graph.json +583 -463
- package/bin/scrabble-solver.js +0 -0
- package/cypress/e2e/app.spec.cy.ts +87 -76
- package/cypress/e2e/bugs/112-character-bonus.ts +40 -0
- package/cypress/e2e/bugs/129-esc-sidebar.ts +23 -0
- package/cypress/e2e/bugs/2-q-tile-in-english.ts +33 -0
- package/cypress/e2e/bugs/3-x-tile-in-polish.ts +33 -0
- package/cypress/e2e/bugs/30-click-inside-radio-icon.ts +26 -0
- package/cypress/e2e/bugs/333-disabled-radio-cursor.ts +24 -0
- package/cypress/e2e/bugs/342-results-sorting.ts +48 -0
- package/cypress/e2e/bugs/348-results-word-padding.ts +74 -0
- package/cypress/e2e/bugs.spec.cy.ts +8 -0
- package/lerna.json +1 -1
- package/package.json +14 -14
- package/packages/configs/package.json +3 -3
- package/packages/constants/package.json +1 -1
- package/packages/dictionaries/package-lock.json +2 -2
- package/packages/dictionaries/package.json +4 -4
- package/packages/logger/package-lock.json +2 -2
- package/packages/logger/package.json +1 -1
- package/packages/scrabble-solver/.next/BUILD_ID +1 -1
- package/packages/scrabble-solver/.next/build-manifest.json +5 -5
- package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
- package/packages/scrabble-solver/.next/cache/eslint/.cache_8dgz12 +1 -1
- package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/packages/scrabble-solver/.next/prerender-manifest.js +1 -1
- package/packages/scrabble-solver/.next/prerender-manifest.json +1 -1
- package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
- package/packages/scrabble-solver/.next/server/chunks/807.js +1 -1
- package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
- package/packages/scrabble-solver/.next/server/pages/404.html +1 -1
- package/packages/scrabble-solver/.next/server/pages/500.html +1 -1
- package/packages/scrabble-solver/.next/server/pages/index.html +1 -1
- package/packages/scrabble-solver/.next/server/pages/index.js +1 -1
- package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
- package/packages/scrabble-solver/.next/server/pages-manifest.json +1 -1
- package/packages/scrabble-solver/.next/static/{qwJjm2FeDHHGY92CY5oQQ → TxfjxrH5h31sPQxPhrJzG}/_buildManifest.js +1 -1
- package/packages/scrabble-solver/.next/static/chunks/pages/{_app-42ce6b4032e931ff.js → _app-2912876c7b6e698e.js} +2 -2
- package/packages/scrabble-solver/.next/static/chunks/pages/index-86d9ad372c48c8b7.js +1 -0
- package/packages/scrabble-solver/.next/static/css/{2adc9736d823979b.css → 14625ff7b4d265d0.css} +1 -1
- package/packages/scrabble-solver/.next/trace +45 -45
- package/packages/scrabble-solver/package-lock.json +4 -4
- package/packages/scrabble-solver/package.json +11 -11
- package/packages/scrabble-solver/public/service-worker.js +1 -1
- package/packages/scrabble-solver/src/components/Alert/Alert.tsx +1 -1
- package/packages/scrabble-solver/src/components/Board/BoardPure.tsx +1 -1
- package/packages/scrabble-solver/src/components/Button/Button.tsx +1 -1
- package/packages/scrabble-solver/src/components/IconButton/IconButton.tsx +1 -1
- package/packages/scrabble-solver/src/components/IconButton/Link.tsx +1 -1
- package/packages/scrabble-solver/src/components/Keys/Arrows/Arrows.tsx +4 -4
- package/packages/scrabble-solver/src/components/NotFound/NotFound.tsx +1 -1
- package/packages/scrabble-solver/src/components/Radio/Radio.tsx +1 -1
- package/packages/scrabble-solver/src/components/Results/HeaderButton.tsx +1 -1
- package/packages/scrabble-solver/src/components/Results/Results.module.scss +5 -8
- package/packages/scrabble-solver/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.tsx +1 -1
- package/packages/scrabble-solver/src/components/Tile/TilePure.tsx +1 -1
- package/packages/scrabble-solver/src/modals/MenuModal/MenuModal.tsx +1 -1
- package/packages/scrabble-solver/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.tsx +1 -1
- package/packages/scrabble-solver/src/modals/WordsModal/WordsModal.tsx +2 -2
- package/packages/solver/package-lock.json +2 -2
- package/packages/solver/package.json +5 -5
- package/packages/types/package.json +2 -2
- package/packages/word-definitions/package-lock.json +2 -2
- package/packages/word-definitions/package.json +2 -2
- package/packages/word-lists/package-lock.json +3 -3
- package/packages/word-lists/package.json +3 -3
- package/cypress/e2e/bugs/112.spec.cy.ts +0 -29
- package/cypress/e2e/bugs/129.spec.cy.ts +0 -13
- package/cypress/e2e/bugs/2.spec.cy.ts +0 -15
- package/cypress/e2e/bugs/3.spec.cy.ts +0 -15
- package/cypress/e2e/bugs/342.spec.cy.ts +0 -37
- package/cypress/e2e/bugs/348.spec.cy.ts +0 -73
- package/packages/scrabble-solver/.next/static/chunks/pages/index-3718075f2ba2220c.js +0 -1
- /package/packages/scrabble-solver/.next/static/{qwJjm2FeDHHGY92CY5oQQ → TxfjxrH5h31sPQxPhrJzG}/_ssgManifest.js +0 -0
package/bin/scrabble-solver.js
CHANGED
|
File without changes
|
|
@@ -13,95 +13,106 @@ import {
|
|
|
13
13
|
getTooltip,
|
|
14
14
|
solve,
|
|
15
15
|
typeRack,
|
|
16
|
+
unregisterServiceWorkers,
|
|
16
17
|
visitIndex,
|
|
17
18
|
} from '../support';
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
20
|
+
describe('app', () => {
|
|
21
|
+
beforeEach(async () => {
|
|
22
|
+
await unregisterServiceWorkers();
|
|
23
|
+
});
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
afterEach(() => {
|
|
26
|
+
cy.clearLocalStorage();
|
|
27
|
+
});
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
getSettingOption('Coordinates', 'Hidden').should('be.checked');
|
|
32
|
-
getSettingOption('Input mode', 'Keyboard').should('be.checked');
|
|
33
|
-
getSettingOption('Group remaining tiles', 'Do not group').should('be.checked');
|
|
34
|
-
});
|
|
29
|
+
it('has title', () => {
|
|
30
|
+
visitIndex();
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
beforeEach(() => {
|
|
38
|
-
cy.intercept('/api/solve').as('solve');
|
|
39
|
-
cy.intercept('/api/dictionary/**/*').as('dictionary');
|
|
32
|
+
cy.title().should('equal', 'Scrabble Solver 2 by Kamil Mielnik');
|
|
40
33
|
});
|
|
41
34
|
|
|
42
|
-
it('
|
|
35
|
+
it('has default setting values', () => {
|
|
43
36
|
visitIndex();
|
|
44
37
|
getSettingsButton().realClick();
|
|
45
|
-
getSettingOption('Language', 'Polski').check();
|
|
46
|
-
getSettingOption('Współrzędne', 'Oryginalne').check();
|
|
47
|
-
closeModal();
|
|
48
|
-
typeRack('abł');
|
|
49
|
-
solve();
|
|
50
38
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
39
|
+
getSettingOption('Game', 'Scrabble').should('be.checked');
|
|
40
|
+
getSettingOption('Language', 'English (US)').should('be.checked');
|
|
41
|
+
getSettingOption('Coordinates', 'Hidden').should('be.checked');
|
|
42
|
+
getSettingOption('Input mode', 'Keyboard').should('be.checked');
|
|
43
|
+
getSettingOption('Group remaining tiles', 'Do not group').should('be.checked');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
describe('full app test', () => {
|
|
47
|
+
beforeEach(() => {
|
|
48
|
+
cy.intercept('/api/solve').as('solve');
|
|
49
|
+
cy.intercept('/api/dictionary/**/*').as('dictionary');
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('Scrabble - Polish', () => {
|
|
53
|
+
visitIndex();
|
|
54
|
+
getSettingsButton().realClick();
|
|
55
|
+
getSettingOption('Language', 'Polski').check();
|
|
56
|
+
getSettingOption('Współrzędne', 'Oryginalne').check();
|
|
57
|
+
closeModal();
|
|
58
|
+
typeRack('abł');
|
|
59
|
+
solve();
|
|
60
|
+
|
|
61
|
+
assertResult(0, 'bał', 14);
|
|
62
|
+
getResult(0).realHover();
|
|
63
|
+
getLoading().should('be.visible');
|
|
64
|
+
cy.wait('@dictionary');
|
|
65
|
+
getRackTile(0).parent().should('have.attr', 'role', 'mark');
|
|
66
|
+
getRackTile(1).parent().should('have.attr', 'role', 'mark');
|
|
67
|
+
getRackTile(2).parent().should('have.attr', 'role', 'mark');
|
|
68
|
+
getBoardTile(5, 7).should('have.value', 'b');
|
|
69
|
+
getBoardTile(6, 7).should('have.value', 'a');
|
|
70
|
+
getBoardTile(7, 7).should('have.value', 'ł');
|
|
71
|
+
getBoardTile(5, 7).parent().should('have.attr', 'role', 'mark');
|
|
72
|
+
getBoardTile(6, 7).parent().should('have.attr', 'role', 'mark');
|
|
73
|
+
getBoardTile(7, 7).parent().should('have.attr', 'role', 'mark');
|
|
74
|
+
getDictionaryInput().should('have.value', 'bał');
|
|
75
|
+
getLoading().should('not.exist');
|
|
76
|
+
getDictionaryTitles().should('have.length', 1).and('have.text', 'bał');
|
|
77
|
+
getDictionary()
|
|
78
|
+
.should('include.text', 'bać się')
|
|
79
|
+
.and('include.text', 'odczuwać lęk, strach')
|
|
80
|
+
.and('include.text', 'być niespokojnym o kogoś lub o coś')
|
|
81
|
+
.and('include.text', 'nie śmieć, nie odważać się na coś');
|
|
72
82
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
83
|
+
cy.findByLabelText('Punkty').realClick();
|
|
84
|
+
getTooltip().should('be.visible').and('have.text', 'Punkty');
|
|
85
|
+
assertResult(0, 'ba', 8);
|
|
86
|
+
getResult(0).realHover();
|
|
87
|
+
getRackTile(0).parent().should('have.attr', 'role', 'mark');
|
|
88
|
+
getRackTile(1).parent().should('have.attr', 'role', 'mark');
|
|
89
|
+
getRackTile(2).parent().should('not.have.attr', 'role', 'mark');
|
|
90
|
+
getBoardTile(5, 7).should('not.have.value');
|
|
91
|
+
getBoardTile(6, 7).should('have.value', 'b');
|
|
92
|
+
getBoardTile(7, 7).should('have.value', 'a');
|
|
93
|
+
getBoardTile(5, 7).parent().should('not.have.attr', 'role', 'mark');
|
|
94
|
+
getBoardTile(6, 7).parent().should('have.attr', 'role', 'mark');
|
|
95
|
+
getBoardTile(7, 7).parent().should('have.attr', 'role', 'mark');
|
|
96
|
+
getDictionaryInput().should('have.value', 'ba');
|
|
97
|
+
getLoading().should('be.visible');
|
|
98
|
+
cy.wait('@dictionary');
|
|
99
|
+
getLoading().should('not.exist');
|
|
100
|
+
getDictionaryTitles().should('have.length', 1).and('have.text', 'ba');
|
|
101
|
+
getDictionary()
|
|
102
|
+
.should('include.text', 'wykrzyknik, który wyraża głównie podziw, zdziwienie')
|
|
103
|
+
.and('include.text', 'w wierzeniach staroegipskich: dusza ludzka ginąca wraz z ciałem');
|
|
94
104
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
getResult(0).realClick();
|
|
106
|
+
getRackTile(0).parent().should('not.have.attr', 'role', 'mark');
|
|
107
|
+
getRackTile(1).parent().should('not.have.attr', 'role', 'mark');
|
|
108
|
+
getRackTile(2).parent().should('not.have.attr', 'role', 'mark');
|
|
109
|
+
getRackTile(0).should('not.have.value');
|
|
110
|
+
getRackTile(1).should('not.have.value');
|
|
111
|
+
getRackTile(2).should('have.value', 'ł');
|
|
112
|
+
getBoardTile(6, 7).should('have.value', 'b');
|
|
113
|
+
getBoardTile(7, 7).should('have.value', 'a');
|
|
104
114
|
|
|
105
|
-
|
|
115
|
+
cy.findByLabelText('Rozwiąż').should('be.visible').and('be.enabled');
|
|
116
|
+
});
|
|
106
117
|
});
|
|
107
118
|
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertResult,
|
|
3
|
+
closeModal,
|
|
4
|
+
getSettingOption,
|
|
5
|
+
getSettingsButton,
|
|
6
|
+
solve,
|
|
7
|
+
typeRack,
|
|
8
|
+
unregisterServiceWorkers,
|
|
9
|
+
visitIndex,
|
|
10
|
+
} from '../../support';
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* @see https://github.com/kamilmielnik/scrabble-solver/issues/112
|
|
14
|
+
*/
|
|
15
|
+
describe('#112 - Scrabble - Character bonus not applied', () => {
|
|
16
|
+
beforeEach(async () => {
|
|
17
|
+
await unregisterServiceWorkers();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
afterEach(() => {
|
|
21
|
+
cy.clearLocalStorage();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('correctly shows points for a result which gets a character bonus', () => {
|
|
25
|
+
visitIndex();
|
|
26
|
+
|
|
27
|
+
getSettingsButton().realClick();
|
|
28
|
+
getSettingOption('Language', 'Français').check();
|
|
29
|
+
closeModal();
|
|
30
|
+
typeRack('jours');
|
|
31
|
+
solve();
|
|
32
|
+
|
|
33
|
+
assertResult(0, 'jours', 40);
|
|
34
|
+
assertResult(1, 'jours', 40);
|
|
35
|
+
assertResult(2, 'jours', 26);
|
|
36
|
+
assertResult(3, 'jours', 26);
|
|
37
|
+
assertResult(4, 'jours', 24);
|
|
38
|
+
assertResult(5, 'jours', 24);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getModal, getSettingsButton, typeRack, unregisterServiceWorkers, visitIndex } from '../../support';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @see https://github.com/kamilmielnik/scrabble-solver/issues/129
|
|
5
|
+
*/
|
|
6
|
+
describe('#129 - Esc does not close the sidebar when letters input is focused', () => {
|
|
7
|
+
beforeEach(async () => {
|
|
8
|
+
await unregisterServiceWorkers();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
afterEach(() => {
|
|
12
|
+
cy.clearLocalStorage();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('Esc key closes the sidebar when rack is focused', () => {
|
|
16
|
+
visitIndex();
|
|
17
|
+
getSettingsButton().realClick();
|
|
18
|
+
typeRack('a');
|
|
19
|
+
cy.realPress('Escape');
|
|
20
|
+
|
|
21
|
+
getModal().should('not.exist');
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertResult,
|
|
3
|
+
getResults,
|
|
4
|
+
solve,
|
|
5
|
+
typeBoard,
|
|
6
|
+
typeRack,
|
|
7
|
+
unregisterServiceWorkers,
|
|
8
|
+
visitIndex,
|
|
9
|
+
} from '../../support';
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* @see https://github.com/kamilmielnik/scrabble-solver/issues/2
|
|
13
|
+
*/
|
|
14
|
+
describe('#2 - "Q" tile does not work', () => {
|
|
15
|
+
beforeEach(async () => {
|
|
16
|
+
await unregisterServiceWorkers();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
cy.clearLocalStorage();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('accepts "Q" tile in English', () => {
|
|
24
|
+
visitIndex();
|
|
25
|
+
typeBoard('i', 'horizontal', 7, 7);
|
|
26
|
+
typeRack('q');
|
|
27
|
+
solve();
|
|
28
|
+
|
|
29
|
+
getResults().should('have.length', 2);
|
|
30
|
+
assertResult(0, 'qi', 11);
|
|
31
|
+
assertResult(1, 'qi', 11);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
closeModal,
|
|
3
|
+
getSettingOption,
|
|
4
|
+
getSettingsButton,
|
|
5
|
+
typeBoard,
|
|
6
|
+
typeRack,
|
|
7
|
+
unregisterServiceWorkers,
|
|
8
|
+
visitIndex,
|
|
9
|
+
} from '../../support';
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* @see https://github.com/kamilmielnik/scrabble-solver/issues/3
|
|
13
|
+
*/
|
|
14
|
+
describe('#3 - "X" tile is allowed in Polish', () => {
|
|
15
|
+
beforeEach(async () => {
|
|
16
|
+
await unregisterServiceWorkers();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
cy.clearLocalStorage();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('does not accept "X" tile in Polish', () => {
|
|
24
|
+
visitIndex();
|
|
25
|
+
getSettingsButton().realClick();
|
|
26
|
+
getSettingOption('Language', 'Polski').check();
|
|
27
|
+
closeModal();
|
|
28
|
+
typeBoard('x', 'horizontal', 7, 7);
|
|
29
|
+
typeRack('x');
|
|
30
|
+
|
|
31
|
+
cy.findByText('x').should('not.exist');
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getSettingOption, getSettingsButton, unregisterServiceWorkers, visitIndex } from '../../support';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @see https://github.com/kamilmielnik/scrabble-solver/issues/30
|
|
5
|
+
*/
|
|
6
|
+
describe('#30 - Clicking inside an icon of non-first unchecked radio button does not select that option', () => {
|
|
7
|
+
beforeEach(async () => {
|
|
8
|
+
await unregisterServiceWorkers();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
afterEach(() => {
|
|
12
|
+
cy.clearLocalStorage();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('Clicking inside an icon of first unchecked radio button selects it', () => {
|
|
16
|
+
visitIndex();
|
|
17
|
+
getSettingsButton().realClick();
|
|
18
|
+
getSettingOption('Language', 'English (GB)').click();
|
|
19
|
+
getSettingOption('Language', 'English (US)') // first unchecked radio button
|
|
20
|
+
.parent('label')
|
|
21
|
+
.findAllByRole('img', { hidden: true })
|
|
22
|
+
.first()
|
|
23
|
+
.realHover({ position: 'center' })
|
|
24
|
+
.realClick({ position: 'center' });
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getSettingOption, getSettingsButton, unregisterServiceWorkers, visitIndex } from '../../support';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @see https://github.com/kamilmielnik/scrabble-solver/issues/333
|
|
5
|
+
*/
|
|
6
|
+
describe('#333 - Disabled radio button has cursor: pointer', () => {
|
|
7
|
+
beforeEach(async () => {
|
|
8
|
+
await unregisterServiceWorkers();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
afterEach(() => {
|
|
12
|
+
cy.clearLocalStorage();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('Disabled radio button has cursor: not-allowed', () => {
|
|
16
|
+
visitIndex();
|
|
17
|
+
getSettingsButton().realClick();
|
|
18
|
+
getSettingOption('Language', 'Polski').check();
|
|
19
|
+
getSettingOption('Gra', 'Scrabble').scrollIntoView();
|
|
20
|
+
|
|
21
|
+
getSettingOption('Gra', 'Super Scrabble').should('be.disabled');
|
|
22
|
+
getSettingOption('Gra', 'Super Scrabble').should('have.css', 'cursor', 'not-allowed');
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertResult,
|
|
3
|
+
closeModal,
|
|
4
|
+
getResult,
|
|
5
|
+
getResultsFilterInput,
|
|
6
|
+
getSettingOption,
|
|
7
|
+
getSettingsButton,
|
|
8
|
+
solve,
|
|
9
|
+
typeBoard,
|
|
10
|
+
typeRack,
|
|
11
|
+
unregisterServiceWorkers,
|
|
12
|
+
visitIndex,
|
|
13
|
+
} from '../../support';
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* @see https://github.com/kamilmielnik/scrabble-solver/issues/342
|
|
17
|
+
*/
|
|
18
|
+
describe('#342 - Incorrect sorting when filtering', () => {
|
|
19
|
+
beforeEach(async () => {
|
|
20
|
+
await unregisterServiceWorkers();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
afterEach(() => {
|
|
24
|
+
cy.clearLocalStorage();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('correctly sorts valid results first when text filter is active', () => {
|
|
28
|
+
visitIndex();
|
|
29
|
+
getSettingsButton().realClick();
|
|
30
|
+
getSettingOption('Language', 'Polski').check();
|
|
31
|
+
closeModal();
|
|
32
|
+
typeBoard('bopie', 'horizontal', 6, 3);
|
|
33
|
+
typeBoard('apu', 'vertical', 8, 4);
|
|
34
|
+
typeBoard('o', 'vertical', 10, 4);
|
|
35
|
+
typeRack('oe');
|
|
36
|
+
solve();
|
|
37
|
+
getResultsFilterInput().type('p');
|
|
38
|
+
|
|
39
|
+
assertResult(0, 'po', 5);
|
|
40
|
+
assertResult(1, 'pe', 5);
|
|
41
|
+
assertResult(2, 'op', 3);
|
|
42
|
+
assertResult(3, 'eo', 6);
|
|
43
|
+
getResult(0).should('not.have.attr', 'aria-hidden');
|
|
44
|
+
getResult(1).should('not.have.attr', 'aria-hidden');
|
|
45
|
+
getResult(2).should('not.have.attr', 'aria-hidden');
|
|
46
|
+
getResult(3).should('have.attr', 'aria-hidden', 'true');
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import {
|
|
2
|
+
closeModal,
|
|
3
|
+
getResult,
|
|
4
|
+
getSettingOption,
|
|
5
|
+
getSettingsButton,
|
|
6
|
+
solve,
|
|
7
|
+
typeRack,
|
|
8
|
+
unregisterServiceWorkers,
|
|
9
|
+
visitIndex,
|
|
10
|
+
} from '../../support';
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* @see https://github.com/kamilmielnik/scrabble-solver/issues/348
|
|
14
|
+
*/
|
|
15
|
+
describe('#348 - Missing result word padding when coordinates are not shown', () => {
|
|
16
|
+
beforeEach(async () => {
|
|
17
|
+
await unregisterServiceWorkers();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
afterEach(() => {
|
|
21
|
+
cy.clearLocalStorage();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('sets proper padding on result cells depending on coordinates setting (LTR language)', () => {
|
|
25
|
+
visitIndex();
|
|
26
|
+
typeRack('ab');
|
|
27
|
+
solve();
|
|
28
|
+
|
|
29
|
+
getResult(0).then(([$result]) => {
|
|
30
|
+
const $span = $result.children[0];
|
|
31
|
+
const wordCell = $span.children[0];
|
|
32
|
+
|
|
33
|
+
expect(window.getComputedStyle(wordCell).paddingLeft).to.equal('15px');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
getSettingsButton().realClick();
|
|
37
|
+
getSettingOption('Coordinates', 'Original').check();
|
|
38
|
+
closeModal();
|
|
39
|
+
|
|
40
|
+
getResult(0).then(([$result]) => {
|
|
41
|
+
const $span = $result.children[0];
|
|
42
|
+
const wordCell = $span.children[1];
|
|
43
|
+
|
|
44
|
+
expect(window.getComputedStyle(wordCell).paddingLeft).to.equal('15px');
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('sets proper padding on result cells depending on coordinates setting (RTL language)', () => {
|
|
49
|
+
visitIndex();
|
|
50
|
+
getSettingsButton().realClick();
|
|
51
|
+
getSettingOption('Language', 'فارسی').check();
|
|
52
|
+
closeModal();
|
|
53
|
+
typeRack('فا');
|
|
54
|
+
solve();
|
|
55
|
+
|
|
56
|
+
getResult(0).then(([$result]) => {
|
|
57
|
+
const $span = $result.children[0];
|
|
58
|
+
const wordCell = $span.children[0];
|
|
59
|
+
|
|
60
|
+
expect(window.getComputedStyle(wordCell).paddingRight).to.equal('15px');
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
getSettingsButton().realClick();
|
|
64
|
+
getSettingOption('مختصات', 'إبداعي').check();
|
|
65
|
+
closeModal();
|
|
66
|
+
|
|
67
|
+
getResult(0).then(([$result]) => {
|
|
68
|
+
const $span = $result.children[0];
|
|
69
|
+
const wordCell = $span.children[1];
|
|
70
|
+
|
|
71
|
+
expect(window.getComputedStyle(wordCell).paddingRight).to.equal('15px');
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './bugs/2-q-tile-in-english';
|
|
2
|
+
import './bugs/3-x-tile-in-polish';
|
|
3
|
+
import './bugs/112-character-bonus';
|
|
4
|
+
import './bugs/129-esc-sidebar';
|
|
5
|
+
import './bugs/30-click-inside-radio-icon';
|
|
6
|
+
import './bugs/333-disabled-radio-cursor';
|
|
7
|
+
import './bugs/342-results-sorting';
|
|
8
|
+
import './bugs/348-results-word-padding';
|
package/lerna.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scrabble-solver",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "Scrabble Solver 2 - Free, open-source, cross-platform, and multi-language analysis tool for Scrabble, Super Scrabble & Literaki. Quickly find top scoring words using given board & tiles.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Scrabble",
|
|
@@ -84,36 +84,36 @@
|
|
|
84
84
|
"packages/scrabble-solver"
|
|
85
85
|
],
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@scrabble-solver/scrabble-solver": "^2.
|
|
87
|
+
"@scrabble-solver/scrabble-solver": "^2.14.0",
|
|
88
88
|
"concurrently": "^8.2.2",
|
|
89
89
|
"open-cli": "^8.0.0"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@babel/core": "^7.
|
|
92
|
+
"@babel/core": "^7.25.2",
|
|
93
93
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
94
|
-
"@babel/preset-env": "^7.
|
|
94
|
+
"@babel/preset-env": "^7.25.3",
|
|
95
95
|
"@testing-library/cypress": "^10.0.2",
|
|
96
96
|
"@types/jest": "^29.5.12",
|
|
97
97
|
"@types/node": "^20.14.10",
|
|
98
98
|
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
|
99
99
|
"@typescript-eslint/parser": "^7.16.0",
|
|
100
|
-
"cypress": "^13.13.
|
|
100
|
+
"cypress": "^13.13.2",
|
|
101
101
|
"cypress-real-events": "^1.13.0",
|
|
102
102
|
"eslint": "^8.57.0",
|
|
103
103
|
"eslint-config-prettier": "^9.1.0",
|
|
104
104
|
"eslint-import-resolver-node": "^0.3.9",
|
|
105
|
-
"eslint-plugin-cypress": "^3.
|
|
105
|
+
"eslint-plugin-cypress": "^3.4.0",
|
|
106
106
|
"eslint-plugin-import": "^2.29.1",
|
|
107
|
-
"eslint-plugin-mocha": "^10.
|
|
108
|
-
"eslint-plugin-prettier": "^5.1
|
|
109
|
-
"eslint-plugin-react": "^7.
|
|
107
|
+
"eslint-plugin-mocha": "^10.5.0",
|
|
108
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
109
|
+
"eslint-plugin-react": "^7.35.0",
|
|
110
110
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
111
111
|
"jest": "29.7.0",
|
|
112
|
-
"lerna": "^8.1.
|
|
113
|
-
"np": "^10.0.
|
|
114
|
-
"prettier": "^3.3.
|
|
112
|
+
"lerna": "^8.1.7",
|
|
113
|
+
"np": "^10.0.7",
|
|
114
|
+
"prettier": "^3.3.3",
|
|
115
115
|
"rimraf": "^6.0.1",
|
|
116
|
-
"ts-jest": "^29.2.
|
|
117
|
-
"typescript": "^5.5.
|
|
116
|
+
"ts-jest": "^29.2.4",
|
|
117
|
+
"typescript": "^5.5.4"
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/configs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "Scrabble Solver 2 - Configs",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"clean": "rimraf build/"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@scrabble-solver/constants": "^2.
|
|
27
|
-
"@scrabble-solver/types": "^2.
|
|
26
|
+
"@scrabble-solver/constants": "^2.14.0",
|
|
27
|
+
"@scrabble-solver/types": "^2.14.0"
|
|
28
28
|
},
|
|
29
29
|
"gitHead": "1e2d1ad49a288d4a44196d8e3336740da132c637"
|
|
30
30
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/dictionaries",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@scrabble-solver/dictionaries",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.14.0",
|
|
10
10
|
"license": "CC-BY-NC-ND-4.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@kamilmielnik/trie": "^3.0.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/dictionaries",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "Scrabble Solver 2 - Dictionaries",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@kamilmielnik/trie": "^3.0.0",
|
|
33
|
-
"@scrabble-solver/logger": "^2.
|
|
34
|
-
"@scrabble-solver/types": "^2.
|
|
35
|
-
"@scrabble-solver/word-lists": "^2.
|
|
33
|
+
"@scrabble-solver/logger": "^2.14.0",
|
|
34
|
+
"@scrabble-solver/types": "^2.14.0",
|
|
35
|
+
"@scrabble-solver/word-lists": "^2.14.0"
|
|
36
36
|
},
|
|
37
37
|
"gitHead": "1e2d1ad49a288d4a44196d8e3336740da132c637"
|
|
38
38
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/logger",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@scrabble-solver/logger",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.14.0",
|
|
10
10
|
"license": "CC-BY-NC-ND-4.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"winston": "^3.13.1"
|