Skip to content

Mark v1.0.0 #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 199 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
802c895
Removed check for not isStoredGame to save the game
DercilioFontes Mar 24, 2024
efc19ee
Replaced history with a clean play path
DercilioFontes Mar 24, 2024
3925e8a
Merge pull request #39 from Maple-Code-Crafters/fix-issue-29-new-game…
ravasconcelos Mar 25, 2024
86fa928
Merge pull request #38 from Maple-Code-Crafters/fix-issue-28-salve-st…
ravasconcelos Mar 25, 2024
f180966
Add unit tests to the models
ravasconcelos Mar 26, 2024
d8e7b22
Merge pull request #42 from Maple-Code-Crafters/41-create-unit-test-f…
DercilioFontes Mar 27, 2024
203bfcb
Added Cancel button
DercilioFontes Mar 27, 2024
ed3bf38
Merge pull request #43 from Maple-Code-Crafters/30-cancel-button
ravasconcelos Mar 27, 2024
fe73f12
Added initial values and removed labels
DercilioFontes Mar 28, 2024
f3e560d
Positioned the IonSegment to the right
DercilioFontes Mar 28, 2024
f75884c
Added proper startGame type
DercilioFontes Mar 28, 2024
0d85d73
Formatted cypress files
DercilioFontes Mar 28, 2024
f4dba85
Updated alert tests
DercilioFontes Mar 28, 2024
9b0e314
Merge pull request #44 from Maple-Code-Crafters/31-defualt-players-name
ravasconcelos Mar 28, 2024
372871b
Added logo card
DercilioFontes Mar 29, 2024
105d574
Implemented getting and saving default players names
DercilioFontes Mar 29, 2024
b7e78dc
Added saved toast and disabled buttons logic
DercilioFontes Mar 29, 2024
f31ab10
Updated NewGameForm to update the default names and changed toast to …
DercilioFontes Mar 29, 2024
7acbe32
Added labels
DercilioFontes Mar 30, 2024
3336e33
Removed Configurations header
DercilioFontes Mar 30, 2024
96fd3ca
Refactored to store whole defaull object
DercilioFontes Mar 30, 2024
bef70db
Implemented handling default O and X
DercilioFontes Mar 30, 2024
e9712bb
Validated symbol input to handle emoji
DercilioFontes Mar 30, 2024
168ae5b
Fixed cutting emoji bottom
DercilioFontes Mar 30, 2024
bd0048e
Fixed Cypress test
DercilioFontes Mar 30, 2024
275558c
removed exposing setRestored and awaited saving
DercilioFontes Mar 30, 2024
2a6c191
Changed to APP_VERSION
DercilioFontes Mar 30, 2024
1458aca
updated packages
DercilioFontes Mar 30, 2024
90b9188
capacitor sync
DercilioFontes Mar 30, 2024
09d9e90
Updated gradle
DercilioFontes Mar 30, 2024
263bab7
Updated browserslist
DercilioFontes Mar 31, 2024
67b1b79
Merge pull request #47 from Maple-Code-Crafters/updates
ravasconcelos Mar 31, 2024
2ad7e25
Merge branch 'dev' into 33-settings-page
DercilioFontes Mar 31, 2024
349490f
Merge pull request #45 from Maple-Code-Crafters/33-settings-page
ravasconcelos Mar 31, 2024
544fa6d
reset saved flag when playing again or new game
DercilioFontes Mar 31, 2024
e888533
Used isStoredGame flag to set saved game flag
DercilioFontes Apr 2, 2024
4d5f06d
Merge branch '46-fix-saving-play-again' into 49-v2-also-save-symbols
DercilioFontes Apr 2, 2024
a8fb6f8
Removed duplicated setSaved to false
DercilioFontes Apr 2, 2024
e06698c
Implemented saving symbols and play again with it. Refactored saving …
DercilioFontes Apr 3, 2024
41c63d7
Merge pull request #48 from Maple-Code-Crafters/46-fix-saving-play-again
ravasconcelos Apr 3, 2024
6dfbe0a
Merge pull request #51 from Maple-Code-Crafters/50-fix-saving-when-se…
ravasconcelos Apr 3, 2024
3134e8e
Merge branch 'dev' into 49-v2-also-save-symbols
DercilioFontes Apr 3, 2024
30191a9
Renamed to played games
DercilioFontes Apr 3, 2024
8cce62d
Renamed sg to playedGame
DercilioFontes Apr 3, 2024
4c96493
Set GameComponent symbols props in state
DercilioFontes Apr 3, 2024
6bb668a
Made the page headers uniform
DercilioFontes Apr 3, 2024
db43eec
Revert "Made the page headers uniform"
DercilioFontes Apr 4, 2024
ff0a76f
Made page headerd uniform and reorganized components
DercilioFontes Apr 4, 2024
6cf159f
Updated Cypress test and renamed files
DercilioFontes Apr 4, 2024
a39ae52
Merge pull request #53 from Maple-Code-Crafters/49-v2-also-save-symbols
ravasconcelos Apr 4, 2024
6c4b639
Merge branch 'dev' into 54-make-page-headers-uniform
DercilioFontes Apr 4, 2024
d1bf417
Updated GitHub Action to avoid husky in CI, cache npm and just instal…
DercilioFontes Apr 4, 2024
63c8b15
Merge pull request #55 from Maple-Code-Crafters/54-make-page-headers-…
ravasconcelos Apr 4, 2024
2a8ccb3
Implemented Sentry
DercilioFontes Apr 5, 2024
414e9a6
Fixed Sentry Capacitor is incompatible with @sentry/react version
DercilioFontes Apr 5, 2024
849dc96
Added VITE_SENTRY_DNS
DercilioFontes Apr 12, 2024
1c7e840
Added check for PROD to avoid sending development errors
DercilioFontes Apr 12, 2024
6eac00b
Removed the use of the .env file
DercilioFontes Apr 12, 2024
446664d
Initial commit
ravasconcelos Apr 13, 2024
8ab7d78
Show bot thinking
ravasconcelos Apr 13, 2024
02a41f3
Fix tests
ravasconcelos Apr 13, 2024
630f3be
Merge pull request #56 from Maple-Code-Crafters/52-sentry-error-monit…
ravasconcelos Apr 13, 2024
c1e56d7
Merge branch 'dev' into 32-jogar-contra-cpu
ravasconcelos Apr 13, 2024
75bb655
Minor refactoring
ravasconcelos Apr 13, 2024
c64cd15
PR Comments
ravasconcelos Apr 14, 2024
20adacd
Implemented bot thinking cell animation
DercilioFontes Apr 14, 2024
2c1f7ec
Moved logic to useBotCellAnimation hook
DercilioFontes Apr 14, 2024
a6c9368
fixed getting last index out of range
DercilioFontes Apr 14, 2024
520109a
Remove Bot from the Game class
ravasconcelos Apr 14, 2024
596d050
Merge branch '32-jogar-contra-cpu' into bot-thinking-amination
DercilioFontes Apr 14, 2024
6b71a9e
Removed bot-thinking-image class
DercilioFontes Apr 14, 2024
d7f109b
Merge pull request #58 from Maple-Code-Crafters/bot-thinking-amination
ravasconcelos Apr 14, 2024
2b9c13e
Merge pull request #57 from Maple-Code-Crafters/32-jogar-contra-cpu
DercilioFontes Apr 14, 2024
b9098f0
Begin implementing minimax
ravasconcelos Apr 16, 2024
56768ee
Fix bug
ravasconcelos Apr 16, 2024
9a49564
Add debug messages
ravasconcelos Apr 17, 2024
f7c5744
Improve the minimax, but it is still not ok
ravasconcelos Apr 17, 2024
fddf886
Fix minimax
ravasconcelos Apr 17, 2024
f00f887
Implement medium level
ravasconcelos Apr 17, 2024
b6f3e01
Refactor how to choose the algorithm
ravasconcelos Apr 18, 2024
9eecfdd
Alternate turns
ravasconcelos Apr 19, 2024
97474a0
Add new fields to the Settings page
ravasconcelos Apr 19, 2024
b2aa38d
Fix the tests
ravasconcelos Apr 20, 2024
2383251
Remove unused method
ravasconcelos Apr 20, 2024
dd387c0
Code review comments and improve first minimax move
ravasconcelos Apr 21, 2024
34f4cae
Merge pull request #59 from Maple-Code-Crafters/35-jogar-contra-ai-mi…
DercilioFontes Apr 25, 2024
89a47c6
Initial packages update
DercilioFontes Apr 25, 2024
ad2dc5c
Major testing libraries update
DercilioFontes Apr 25, 2024
83eb75d
audit fix
DercilioFontes Apr 25, 2024
576e5c6
Updated ESLint config and fixed warnings
DercilioFontes Apr 25, 2024
147e4cf
Packages update
DercilioFontes Apr 26, 2024
9bf486c
Updated to Ionic v8
DercilioFontes Apr 28, 2024
35f2882
Removed use of variables.css and updated browserslist
DercilioFontes Apr 28, 2024
0bae619
Updated Capacitor to v6
DercilioFontes Apr 28, 2024
9d547bf
Kept CocoaPods 1.15.2
DercilioFontes Apr 28, 2024
fae2643
Updated Gradle
DercilioFontes Apr 28, 2024
e5158cd
Updated GitHub action to node 22
DercilioFontes Apr 28, 2024
9babe07
Added engines info in the package.json
DercilioFontes Apr 28, 2024
af5e33f
package lock update
DercilioFontes Apr 28, 2024
145b364
Packages update
DercilioFontes Apr 30, 2024
7b3ae5e
Added eslint-plugin-react-hooks
DercilioFontes Apr 30, 2024
3d1f902
Added game and cpu slices and initial refactoring
DercilioFontes Apr 30, 2024
64875b4
Merge pull request #67 from Maple-Code-Crafters/62-updates
ravasconcelos Apr 30, 2024
449aa56
Merge branch 'dev' into 68-Add-Redux-Toolkit
DercilioFontes May 2, 2024
7d39694
Added Game id
DercilioFontes May 2, 2024
e0a1356
Stop cloning, start undoing
ravasconcelos May 2, 2024
f5b8c9d
Fix className issue
ravasconcelos May 2, 2024
143d9ca
Clean up before PR
ravasconcelos May 2, 2024
8aa6cde
Fix Cpu test
ravasconcelos May 2, 2024
f5bfde6
Merge pull request #69 from Maple-Code-Crafters/66-refactor-minimax
DercilioFontes May 2, 2024
f597781
Refactored game with new SerializableGame type and id
DercilioFontes May 2, 2024
22223bc
Merge branch 'dev' into 68-Add-Redux-Toolkit
DercilioFontes May 2, 2024
c682d3a
Merge changes
DercilioFontes May 2, 2024
9be59f8
Tested playing 2
DercilioFontes May 2, 2024
de85f75
Removed cpuSlice
DercilioFontes May 2, 2024
9001b59
Fixed starting from stored game
DercilioFontes May 2, 2024
7542c23
removed conditional call
DercilioFontes May 2, 2024
df94869
Removed unnecessary functions
DercilioFontes May 2, 2024
be38164
Fixed tests
DercilioFontes May 2, 2024
f801109
Removed conditional call
DercilioFontes May 2, 2024
5cf5f01
Removed unused property
DercilioFontes May 2, 2024
937318d
Fix best Minimax decision
ravasconcelos May 2, 2024
ee366e1
Remove unused variables
ravasconcelos May 2, 2024
f244853
Added DefaultProvider and renamed game slice properties
DercilioFontes May 3, 2024
a16f17f
Added using DefaultProvider
DercilioFontes May 3, 2024
6ac30cd
Fix how the score is calculated
ravasconcelos May 3, 2024
06d47a4
Added retriveAsyncDefault, used useAppDispatch and refactored Default…
DercilioFontes May 4, 2024
c82d5c0
Implemented saving default and updatimng new game form
DercilioFontes May 4, 2024
895d761
Fixed handling symbols
DercilioFontes May 4, 2024
8db6bfc
Used id for played game
DercilioFontes May 4, 2024
3842988
Implemented game symbols
DercilioFontes May 4, 2024
2a1b934
Fixed setting CPU name
DercilioFontes May 4, 2024
ca9460b
Merge pull request #71 from Maple-Code-Crafters/70-minimax-dont-choos…
DercilioFontes May 4, 2024
2f878d9
Merge branch 'dev' into 68-Add-Redux-Toolkit
DercilioFontes May 4, 2024
c11155c
Added isCpuTurn method and changed how trigger cpu turn, and fixed al…
DercilioFontes May 4, 2024
5002d0d
Passed game to useCpuCellAnimation
DercilioFontes May 4, 2024
f2196b1
Copy game to avoid interference in the game and added sleep function
DercilioFontes May 4, 2024
630cf8c
Added initialTurn property
DercilioFontes May 4, 2024
fe204a2
Implemented configs, refactored minimax with a board and GameComponent
DercilioFontes May 5, 2024
ec630d9
Implemented player and opponent by game players
DercilioFontes May 5, 2024
32d4d26
Fixed game tests
DercilioFontes May 5, 2024
e4d442f
Added debug test unit script
DercilioFontes May 5, 2024
8c8713c
p
DercilioFontes May 5, 2024
b3229ba
Reviewed RandomMove test
DercilioFontes May 5, 2024
1f5a21e
Addded toContain test
DercilioFontes May 5, 2024
2f7ba6c
Added logError function and reviewe Cpu test
DercilioFontes May 5, 2024
09a9324
Added todo to Minimax test
DercilioFontes May 5, 2024
60dd357
Fixed player 2 name bug and updated cypress test
DercilioFontes May 5, 2024
4537e19
Removed use of only
DercilioFontes May 5, 2024
cfcf9d2
Fixed assigning undefined to Cell to fix Minimax test
DercilioFontes May 5, 2024
8bb1219
Fixed no winner bug
DercilioFontes May 5, 2024
7d9837c
Update README.md
DercilioFontes May 5, 2024
41e04bf
Removed minimax test todo
DercilioFontes May 5, 2024
bc2d961
Initial packages update
DercilioFontes May 9, 2024
6c21d5f
Test packages updates
DercilioFontes May 9, 2024
9907401
Updated @reduxjs/toolkit
DercilioFontes May 9, 2024
8c34490
Updated @eslint/js
DercilioFontes May 9, 2024
952ff0d
Merge pull request #72 from Maple-Code-Crafters/68-Add-Redux-Toolkit
ravasconcelos May 10, 2024
581cc3a
Packages update
DercilioFontes May 11, 2024
9a9fa12
Removed duplicated hooksPlugin
DercilioFontes May 13, 2024
5de57c6
Added eslint-plugin-vitest
DercilioFontes May 13, 2024
ccb5ffa
Added test for Play page form elements
DercilioFontes May 14, 2024
9f4cf74
Added custom store to tests
DercilioFontes May 14, 2024
e6aba1a
Exported createTestStore
DercilioFontes May 14, 2024
9cfe7f4
Added DefaultProvider to tests and update querying Play page elements
DercilioFontes May 14, 2024
052bf32
tested removing cpu level options
DercilioFontes May 14, 2024
4758de2
Added test for clicking start and cancel
DercilioFontes May 14, 2024
954a7e7
Added check for cell empty
DercilioFontes May 14, 2024
96ff970
Packages update
DercilioFontes May 18, 2024
3c32354
Fixed setting CPU name
DercilioFontes May 18, 2024
0980636
Fixed test
DercilioFontes May 18, 2024
98b3855
Updated test changing to Two Players
DercilioFontes May 18, 2024
0b63dd1
Added Two players and player 1 wins
DercilioFontes May 18, 2024
22b5397
Used getByText
DercilioFontes May 18, 2024
776f59a
Added Two players game, player 2 wins and starts with player 2 turn
DercilioFontes May 18, 2024
7e27c17
Reviewed assigning initial newGame state
DercilioFontes May 18, 2024
be841ce
Removed checking for CPU (Easy) before removing it
DercilioFontes May 18, 2024
3cf177b
Changed to lowercase
DercilioFontes May 18, 2024
41fe4e1
Added one player game and cpu plays after player 1
DercilioFontes May 18, 2024
e46d7b8
Removed empty line
DercilioFontes May 18, 2024
81e6665
Added spinner when loading results
DercilioFontes May 20, 2024
04cf136
Fixed setting cpu thinking when finished or hasWin
DercilioFontes May 20, 2024
bf9c239
Updated test util to handle useIonViewWillEnter hook, mock Preference…
DercilioFontes May 20, 2024
fb6ab96
Removed use of useIonViewWillEnter and passing Route to tests
DercilioFontes May 20, 2024
a52e23a
Fixed bug starting game for a stored one, and added mote test cases
DercilioFontes May 20, 2024
1c548e7
Removed test only
DercilioFontes May 20, 2024
1f72517
Added test case for clicking a stored game
DercilioFontes May 20, 2024
6051ea8
Added comment
DercilioFontes May 20, 2024
a6dc69d
Changed order to get display player names
DercilioFontes May 20, 2024
9e717d7
Added test for Play Again
DercilioFontes May 20, 2024
ad2ff94
Improved comment
DercilioFontes May 20, 2024
2243232
Packages update
DercilioFontes May 20, 2024
7ef5c70
Added Settings tests
DercilioFontes May 22, 2024
f971bd4
Used getByLabelText for labels
DercilioFontes May 22, 2024
340c6a4
Package update
DercilioFontes May 22, 2024
2537362
Merge pull request #73 from Maple-Code-Crafters/More-tests
ravasconcelos May 22, 2024
57adfc9
Merge pull request #74 from Maple-Code-Crafters/Add-Results-tests
ravasconcelos May 22, 2024
17c7744
Merge pull request #75 from Maple-Code-Crafters/Add-Settings-tests
ravasconcelos May 22, 2024
44e9b0d
mark v1.0.0
DercilioFontes May 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Chrome >=79
ChromeAndroid >=79
Firefox >=70
Edge >=79
Safari >=14
iOS >=14
Chrome >=89
ChromeAndroid >=89
Firefox >=75
Edge >=89
Safari >=15
iOS >=15
42 changes: 0 additions & 42 deletions .eslintrc

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/tic-tac-toe-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Tic-Tac-Toe CI
env:
HUSKY: 0
on: [push, pull_request]
jobs:
build-and-test:
Expand All @@ -7,10 +9,9 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '21'
- run: npm install -g vitest
- run: npm install @ionic/cli
- run: npm install rollup --save-dev
node-version: '22'
cache: npm
- run: npm i -g @ionic/cli
- name: Install dependencies
run: npm ci
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
echo "eslint running..."
npx eslint --max-warnings=0 . --ext .tsx,.ts
npx eslint . --max-warnings=0
echo "tsc running..."
npx tsc
echo "prettier running..."
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ build/
coverage/
ios/
resources/
cypress/

# Caches
.eslintcache
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

`npm run test.unit`

`npm run test.unit:debu <test file name>` to run only one test

- [Cypress](https://docs.cypress.io/guides/overview/why-cypress)

- Cypress needs the app/server running to work
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
namespace "io.ionic.starter"
compileSdkVersion rootProject.ext.compileSdkVersion
compileSdk rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "io.ionic.starter"
minSdkVersion rootProject.ext.minSdkVersion
Expand Down
1 change: 1 addition & 0 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {
implementation project(':capacitor-preferences')
implementation project(':capacitor-splash-screen')
implementation project(':capacitor-status-bar')
implementation project(':sentry-capacitor')

}

Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.0'
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.google.gms:google-services:4.4.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
3 changes: 3 additions & 0 deletions android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capa

include ':capacitor-status-bar'
project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')

include ':sentry-capacitor'
project(':sentry-capacitor').projectDir = new File('../node_modules/@sentry/capacitor/android')
14 changes: 7 additions & 7 deletions android/variables.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ext {
minSdkVersion = 22
compileSdkVersion = 33
targetSdkVersion = 33
androidxActivityVersion = '1.7.0'
compileSdkVersion = 34
targetSdkVersion = 34
androidxActivityVersion = '1.8.0'
androidxAppCompatVersion = '1.6.1'
androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.10.0'
androidxFragmentVersion = '1.5.6'
coreSplashScreenVersion = '1.0.0'
androidxWebkitVersion = '1.6.1'
androidxCoreVersion = '1.12.0'
androidxFragmentVersion = '1.6.2'
coreSplashScreenVersion = '1.0.1'
androidxWebkitVersion = '1.9.0'
junitVersion = '4.13.2'
androidxJunitVersion = '1.1.5'
androidxEspressoCoreVersion = '3.5.1'
Expand Down
29 changes: 0 additions & 29 deletions cypress/e2e/alert.cy.ts

This file was deleted.

53 changes: 53 additions & 0 deletions cypress/e2e/pages/play.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/// <reference types="cypress" />

describe('Play page', () => {
describe('When visiting the root page then should have the New Game as header', () => {
it('Visits the app root url', () => {
cy.visit('/');
cy.contains('ion-title', 'New Game');
cy.get('ion-card').should('have.length', 1);
cy.get('ion-button').should('have.length', 1);
cy.get('ion-input').should('have.length', 2);
});
});

describe('Player name alert tests', () => {
it('When player1 name is not set then the alert shows the player1 message', () => {
cy.viewport('iphone-x');
cy.visit('/');
cy.get('[aria-label="reset"]').each(($el) => {
cy.wrap($el).click();
});
cy.get('ion-button').click();
cy.get('.alert-message').eq(0).contains('Please, enter player 1 name.');
});

it('When player1 name is set but player2 name is not set then the alert shows the player2 message', () => {
cy.viewport('iphone-x');
cy.visit('/');
cy.wait(1000);
// clear player 2 name
cy.get('[aria-label="reset"]').each(($el, index) => {
if (index === 1) {
cy.wrap($el).click();
}
});
cy.get('ion-button').click();
cy.get('.alert-message').eq(0).contains('Please, enter player 2 name.');
});

it('When player names are set then there is no alert', () => {
cy.viewport('iphone-x');
cy.visit('/');
cy.wait(1000);
// click on two players button
cy.get('ion-segment-button').each(($el, index) => {
if (index === 1) {
cy.wrap($el).click();
}
});
cy.get('ion-button').click();
cy.get('.alert-message').should('have.length', 0);
});
});
});
11 changes: 0 additions & 11 deletions cypress/e2e/test.cy.ts

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
// }
4 changes: 2 additions & 2 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'
import './commands';

// Alternatively you can use CommonJS syntax:
// require('./commands')
// require('./commands')
78 changes: 78 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import eslintConfigPrettier from 'eslint-config-prettier';
import jestDom from 'eslint-plugin-jest-dom';
import reactRecommended from 'eslint-plugin-react/configs/recommended.js';
import hooksPlugin from 'eslint-plugin-react-hooks';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import vitest from 'eslint-plugin-vitest';
import globals from 'globals';
import tseslint from 'typescript-eslint';

import eslint from '@eslint/js';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: ['ios/', 'android/', 'dist/', 'cypress.config.ts'],
},
{
settings: { react: { version: 'detect' } },
languageOptions: {
globals: globals.browser,
},
},
reactRecommended,
{
plugins: {
'react-hooks': hooksPlugin,
},
rules: hooksPlugin.configs.recommended.rules,
},
eslintConfigPrettier,
jestDom.configs['flat/recommended'],
{
files: ['**/*.test.ts?(x)'],
plugins: {
vitest,
},
rules: {
...vitest.configs.recommended.rules,
},
languageOptions: {
globals: {
...vitest.environments.env.globals,
},
},
},
{
plugins: {
'simple-import-sort': simpleImportSort,
},
rules: {
'no-console': 'warn',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/consistent-type-imports': 'warn',
'simple-import-sort/imports': [
'warn',
{
groups: [
// 1. `react` and packages starting with alphanumeric characters
['^react$', '^\\w'],
// 2. vendor packages
['^@'],
// 3. relative imports starting with "../"
['^\\.\\./?$'],
// 4. relative imports from same folder "./"
['^\\./?$'],
// 5. style imports
['^.+\\.(css|scss)$'],
// 6. media imports
['^.+\\.(gif|png|svg|jpg)$'],
// 7. side effect imports at the end
['^\\u0000'],
],
},
],
},
},
);
1 change: 1 addition & 0 deletions ios/App/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def capacitor_pods
pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences'
pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen'
pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
pod 'SentryCapacitor', :path => '../../node_modules/@sentry/capacitor'
end

target 'App' do
Expand Down
Loading