Skip to content

Commit d553fc3

Browse files
Merge pull request #76 from Maple-Code-Crafters/mark-v1.0.0
Mark v1.0.0
2 parents 8fc8a4e + 44e9b0d commit d553fc3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+7569
-5697
lines changed

.browserslistrc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Chrome >=79
2-
ChromeAndroid >=79
3-
Firefox >=70
4-
Edge >=79
5-
Safari >=14
6-
iOS >=14
1+
Chrome >=89
2+
ChromeAndroid >=89
3+
Firefox >=75
4+
Edge >=89
5+
Safari >=15
6+
iOS >=15

.eslintrc

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/tic-tac-toe-ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: Tic-Tac-Toe CI
2+
env:
3+
HUSKY: 0
24
on: [push, pull_request]
35
jobs:
46
build-and-test:
@@ -7,10 +9,9 @@ jobs:
79
- uses: actions/checkout@v4
810
- uses: actions/setup-node@v4
911
with:
10-
node-version: '21'
11-
- run: npm install -g vitest
12-
- run: npm install @ionic/cli
13-
- run: npm install rollup --save-dev
12+
node-version: '22'
13+
cache: npm
14+
- run: npm i -g @ionic/cli
1415
- name: Install dependencies
1516
run: npm ci
1617
- name: Build

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
echo "eslint running..."
2-
npx eslint --max-warnings=0 . --ext .tsx,.ts
2+
npx eslint . --max-warnings=0
33
echo "tsc running..."
44
npx tsc
55
echo "prettier running..."

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ build/
55
coverage/
66
ios/
77
resources/
8-
cypress/
98

109
# Caches
1110
.eslintcache

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343

4444
`npm run test.unit`
4545

46+
`npm run test.unit:debu <test file name>` to run only one test
47+
4648
- [Cypress](https://docs.cypress.io/guides/overview/why-cypress)
4749

4850
- Cypress needs the app/server running to work

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
22

33
android {
44
namespace "io.ionic.starter"
5-
compileSdkVersion rootProject.ext.compileSdkVersion
5+
compileSdk rootProject.ext.compileSdkVersion
66
defaultConfig {
77
applicationId "io.ionic.starter"
88
minSdkVersion rootProject.ext.minSdkVersion

android/app/capacitor.build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dependencies {
1515
implementation project(':capacitor-preferences')
1616
implementation project(':capacitor-splash-screen')
1717
implementation project(':capacitor-status-bar')
18+
implementation project(':sentry-capacitor')
1819

1920
}
2021

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ buildscript {
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.3.0'
11-
classpath 'com.google.gms:google-services:4.3.15'
10+
classpath 'com.android.tools.build:gradle:8.3.2'
11+
classpath 'com.google.gms:google-services:4.4.0'
1212

1313
// NOTE: Do not place your application dependencies here; they belong
1414
// in the individual module build.gradle files

android/capacitor.settings.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capa
1919

2020
include ':capacitor-status-bar'
2121
project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')
22+
23+
include ':sentry-capacitor'
24+
project(':sentry-capacitor').projectDir = new File('../node_modules/@sentry/capacitor/android')

android/variables.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
ext {
22
minSdkVersion = 22
3-
compileSdkVersion = 33
4-
targetSdkVersion = 33
5-
androidxActivityVersion = '1.7.0'
3+
compileSdkVersion = 34
4+
targetSdkVersion = 34
5+
androidxActivityVersion = '1.8.0'
66
androidxAppCompatVersion = '1.6.1'
77
androidxCoordinatorLayoutVersion = '1.2.0'
8-
androidxCoreVersion = '1.10.0'
9-
androidxFragmentVersion = '1.5.6'
10-
coreSplashScreenVersion = '1.0.0'
11-
androidxWebkitVersion = '1.6.1'
8+
androidxCoreVersion = '1.12.0'
9+
androidxFragmentVersion = '1.6.2'
10+
coreSplashScreenVersion = '1.0.1'
11+
androidxWebkitVersion = '1.9.0'
1212
junitVersion = '4.13.2'
1313
androidxJunitVersion = '1.1.5'
1414
androidxEspressoCoreVersion = '3.5.1'

cypress/e2e/alert.cy.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

cypress/e2e/pages/play.cy.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/// <reference types="cypress" />
2+
3+
describe('Play page', () => {
4+
describe('When visiting the root page then should have the New Game as header', () => {
5+
it('Visits the app root url', () => {
6+
cy.visit('/');
7+
cy.contains('ion-title', 'New Game');
8+
cy.get('ion-card').should('have.length', 1);
9+
cy.get('ion-button').should('have.length', 1);
10+
cy.get('ion-input').should('have.length', 2);
11+
});
12+
});
13+
14+
describe('Player name alert tests', () => {
15+
it('When player1 name is not set then the alert shows the player1 message', () => {
16+
cy.viewport('iphone-x');
17+
cy.visit('/');
18+
cy.get('[aria-label="reset"]').each(($el) => {
19+
cy.wrap($el).click();
20+
});
21+
cy.get('ion-button').click();
22+
cy.get('.alert-message').eq(0).contains('Please, enter player 1 name.');
23+
});
24+
25+
it('When player1 name is set but player2 name is not set then the alert shows the player2 message', () => {
26+
cy.viewport('iphone-x');
27+
cy.visit('/');
28+
cy.wait(1000);
29+
// clear player 2 name
30+
cy.get('[aria-label="reset"]').each(($el, index) => {
31+
if (index === 1) {
32+
cy.wrap($el).click();
33+
}
34+
});
35+
cy.get('ion-button').click();
36+
cy.get('.alert-message').eq(0).contains('Please, enter player 2 name.');
37+
});
38+
39+
it('When player names are set then there is no alert', () => {
40+
cy.viewport('iphone-x');
41+
cy.visit('/');
42+
cy.wait(1000);
43+
// click on two players button
44+
cy.get('ion-segment-button').each(($el, index) => {
45+
if (index === 1) {
46+
cy.wrap($el).click();
47+
}
48+
});
49+
cy.get('ion-button').click();
50+
cy.get('.alert-message').should('have.length', 0);
51+
});
52+
});
53+
});

cypress/e2e/test.cy.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

cypress/support/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
3535
// }
3636
// }
37-
// }
37+
// }

cypress/support/e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// ***********************************************************
1515

1616
// Import commands.js using ES2015 syntax:
17-
import './commands'
17+
import './commands';
1818

1919
// Alternatively you can use CommonJS syntax:
20-
// require('./commands')
20+
// require('./commands')

eslint.config.js

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import eslintConfigPrettier from 'eslint-config-prettier';
2+
import jestDom from 'eslint-plugin-jest-dom';
3+
import reactRecommended from 'eslint-plugin-react/configs/recommended.js';
4+
import hooksPlugin from 'eslint-plugin-react-hooks';
5+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
6+
import vitest from 'eslint-plugin-vitest';
7+
import globals from 'globals';
8+
import tseslint from 'typescript-eslint';
9+
10+
import eslint from '@eslint/js';
11+
12+
export default tseslint.config(
13+
eslint.configs.recommended,
14+
...tseslint.configs.recommended,
15+
{
16+
ignores: ['ios/', 'android/', 'dist/', 'cypress.config.ts'],
17+
},
18+
{
19+
settings: { react: { version: 'detect' } },
20+
languageOptions: {
21+
globals: globals.browser,
22+
},
23+
},
24+
reactRecommended,
25+
{
26+
plugins: {
27+
'react-hooks': hooksPlugin,
28+
},
29+
rules: hooksPlugin.configs.recommended.rules,
30+
},
31+
eslintConfigPrettier,
32+
jestDom.configs['flat/recommended'],
33+
{
34+
files: ['**/*.test.ts?(x)'],
35+
plugins: {
36+
vitest,
37+
},
38+
rules: {
39+
...vitest.configs.recommended.rules,
40+
},
41+
languageOptions: {
42+
globals: {
43+
...vitest.environments.env.globals,
44+
},
45+
},
46+
},
47+
{
48+
plugins: {
49+
'simple-import-sort': simpleImportSort,
50+
},
51+
rules: {
52+
'no-console': 'warn',
53+
'react/react-in-jsx-scope': 'off',
54+
'@typescript-eslint/consistent-type-imports': 'warn',
55+
'simple-import-sort/imports': [
56+
'warn',
57+
{
58+
groups: [
59+
// 1. `react` and packages starting with alphanumeric characters
60+
['^react$', '^\\w'],
61+
// 2. vendor packages
62+
['^@'],
63+
// 3. relative imports starting with "../"
64+
['^\\.\\./?$'],
65+
// 4. relative imports from same folder "./"
66+
['^\\./?$'],
67+
// 5. style imports
68+
['^.+\\.(css|scss)$'],
69+
// 6. media imports
70+
['^.+\\.(gif|png|svg|jpg)$'],
71+
// 7. side effect imports at the end
72+
['^\\u0000'],
73+
],
74+
},
75+
],
76+
},
77+
},
78+
);

ios/App/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def capacitor_pods
1717
pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences'
1818
pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen'
1919
pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
20+
pod 'SentryCapacitor', :path => '../../node_modules/@sentry/capacitor'
2021
end
2122

2223
target 'App' do

0 commit comments

Comments
 (0)