Skip to content
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

version/0.10.2 #194

Merged
merged 16 commits into from
Nov 15, 2023
82 changes: 56 additions & 26 deletions .detoxrc.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
/** @type {Detox.DetoxConfig} */
module.exports = {
logger: {
level: process.env.CI ? 'debug' : undefined,
level: 'debug',
},
testRunner: {
args: {
'$0': 'jest',
config: 'e2e/jest.config.js'
config: 'e2e/jest.config.ts'
},
jest: {
setupTimeout: 120000
setupTimeout: 120000,
}
},
artifacts: {
rootDir: '.artifacts',
rootDir: 'artifacts',
plugins: {
log: { enabled: true },
log: { enabled: false },
screenshot: {
shouldTakeAutomaticSnapshots: true,
keepOnlyFailedTestsArtifacts: true,
shouldTakeAutomaticSnapshots: false,
keepOnlyFailedTestsArtifacts: false,
takeWhen: {
testStart: false,
testDone: true,
testDone: false,
}
},
video: {
enabled: true,
enabled: false,
android: {
bitRate: 4000000,
},
Expand Down Expand Up @@ -61,22 +61,34 @@ module.exports = {
}
},
devices: {
iPhone15: {
IPHONE_15: {
type: 'ios.simulator',
device: {
type: 'iPhone 15'
name: 'IPHONE_15'
}
},
iPhoneSE: {
IPHONE_PRO_MAX: {
type: 'ios.simulator',
device: {
type: 'iPhone SE (2nd generation)'
name: 'IPHONE_PRO_MAX'
}
},
iPadmini: {
IPHONE_SE: {
type: 'ios.simulator',
device: {
type: 'iPad mini (6th generation)'
name: 'IPHONE_SE'
}
},
IPAD_MINI: {
type: 'ios.simulator',
device: {
name: 'IPAD_MINI'
}
},
IPAD_PRO: {
type: 'ios.simulator',
device: {
name: 'IPAD_PRO'
}
},
attached: {
Expand All @@ -85,10 +97,16 @@ module.exports = {
adbName: '.*'
}
},
emulator: {
'android.emulator.resizable': {
type: 'android.emulator',
device: {
avdName: 'Resizable'
}
},
'android.emulator.4': {
type: 'android.emulator',
device: {
avdName: 'Pixel_3a_API_33_arm64-v8a'
avdName: '4'
}
}
},
Expand All @@ -97,16 +115,24 @@ module.exports = {
device: 'simulator',
app: 'ios.debug'
},
'ios.sim.release.iPhone14': {
device: 'iPhone14',
'ios.sim.release.IPHONE_PRO_MAX': {
device: 'IPHONE_PRO_MAX',
app: 'ios.release'
},
'ios.sim.release.IPHONE_15': {
device: 'IPHONE_15',
app: 'ios.release'
},
'ios.sim.release.iPhoneSE': {
device: 'iPhoneSE',
'ios.sim.release.IPHONE_SE': {
device: 'IPHONE_SE',
app: 'ios.release'
},
'ios.sim.release.iPadmini': {
device: 'iPadmini',
'ios.sim.release.IPAD_MINI': {
device: 'IPAD_MINI',
app: 'ios.release'
},
'ios.sim.release.IPAD_PRO': {
device: 'IPAD_PRO',
app: 'ios.release'
},
'android.att.debug': {
Expand All @@ -118,11 +144,15 @@ module.exports = {
app: 'android.release'
},
'android.emu.debug': {
device: 'emulator',
device: 'android.emulator.6',
app: 'android.debug'
},
'android.emu.release': {
device: 'emulator',
'android.emu.resizable.release': {
device: 'android.emulator.resizable',
app: 'android.release'
},
'android.emu.4.release': {
device: 'android.emulator.4',
app: 'android.release'
}
}
Expand Down
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules
/dist
/e2e/*.test.js
/e2e/*.test.ts
/artifacts
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ dist/
service-account.json

detox_test.sh
.artifacts/
artifacts/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ No external API calls nor Analytics API, not even sentry / crashlytics.

### 📱 Features

## [🏁 Roadmap](https://github.com/users/victorbalssa/projects/2/views/1)

| Feature | Available |
|------------------------------|:---------:|
| Oauth2 authentication | ✅ |
Expand Down
30 changes: 21 additions & 9 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,51 @@
"android",
"web"
],
"version": "0.10.0",
"version": "0.10.2",
"orientation": "portrait",
"splash": {
"image": "./src/images/splash.png",
"resizeMode": "contain"
},
"updates": {
"enabled": true,
"checkAutomatically": "ON_ERROR_RECOVERY",
"url": "https://u.expo.dev/292ed6dc-804c-4444-95f5-fa5d76d9913b"
},
"ios": {
"icon": "./src/images/icon-abacus.png",
"splash": {
"image": "./src/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff",
"dark": {
"backgroundColor": "#25292e"
}
},
"supportsTablet": true,
"buildNumber": "0.10.0",
"bundleIdentifier": "abacus.ios.app",
"infoPlist": {
"NSFaceIDUsageDescription": "Abacus use Authentication with TouchId or FaceID",
"NSLocalNetworkUsageDescription": "Abacus use Local Network to connect to your local instance of Firefly III"
},
"config": {
"usesNonExemptEncryption": false
}
},
"bundleIdentifier": "abacus.ios.app",
"buildNumber": "0.10.2"
},
"android": {
"icon": "./src/images/icon-abacus.png",
"adaptiveIcon": {
"foregroundImage": "./src/images/icon-abacus-foreground.png",
"backgroundImage": "./src/images/icon-abacus-background.png"
},
"splash": {
"image": "./src/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff",
"dark": {
"backgroundColor": "#25292e"
}
},
"playStoreUrl": "https://play.google.com/store/apps/details?id=abacus.fireflyiii.android.app",
"package": "abacus.fireflyiii.android.app",
"versionCode": 9
"versionCode": 11
},
"web": {
"bundler": "metro"
Expand Down
81 changes: 81 additions & 0 deletions e2e/E2E.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import {
device,
waitFor,
element,
by,
expect,
} from 'detox';

const {
DETOX_TEST_TOKEN,
DETOX_TEST_URL,
} = process.env;
const testURL = DETOX_TEST_URL;
const testToken = DETOX_TEST_TOKEN;

describe.each([
['en-US'],
['fr-FR'],
['es-ES'],
['pt-BR'],
['de-DE'],
['it-IT'],
['sl-SI'],
['id-ID'],
['zh-CN'],
])(`%s`, (locale) => {
beforeAll(async () => {
// reset authentication tokens
await device.clearKeychain();
await device.launchApp({
newInstance: true,
languageAndLocale: {
language: locale,
locale
}
});
});

it('screenshots', async () => {
// OAUTH
await expect(element(by.id('auth_form_url_label'))).toBeVisible();
await device.takeScreenshot('2_oauth');
await expect(element(by.id('toggle_is_oauth'))).toBeVisible();
await element(by.id('toggle_is_oauth')).tap();
await expect(element(by.id('auth_form_personal_access_token_input'))).toBeVisible();

//HOME
await device.disableSynchronization();
await element(by.id('auth_form_url_input')).replaceText(testURL);
await element(by.id('auth_form_personal_access_token_input')).replaceText(testToken);
// dismiss keyboard by tapping a label (iOS)
await element(by.id('auth_form_url_label')).tap();
await new Promise((r) => setTimeout(r, 1000));
await element(by.id('auth_form_submit_button_initial')).tap();

// redirect to home
await waitFor(element(by.id('home_screen_net_worth'))).toExist().withTimeout(20000);
await new Promise((r) => setTimeout(r, 5000));
await device.takeScreenshot('1_home');

// CHART
await element(by.id('navigation_chart_tab')).tap();
await new Promise((r) => setTimeout(r, 1000));
await device.takeScreenshot('3_chart');

// TRANSACTIONS
await element(by.id('navigation_transactions_tab')).tap();
await new Promise((r) => setTimeout(r, 3000));
await device.takeScreenshot('4_transactions');

// SETTINGS
await element(by.id('navigation_settings_tab')).tap();
await new Promise((r) => setTimeout(r, 1000));
await device.takeScreenshot('5_settings');

// MODAL NEW TRANSACTION
await element(by.id('navigation_create_transaction')).tap();
await new Promise((r) => setTimeout(r, 1000));
await device.takeScreenshot('6_create');
});
});
32 changes: 0 additions & 32 deletions e2e/OauthScreen.test.js

This file was deleted.

5 changes: 3 additions & 2 deletions e2e/jest.config.js → e2e/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
preset: 'ts-jest',
rootDir: '..',
setupFiles: ['dotenv/config'],
testMatch: ['<rootDir>/e2e/**/*.test.js'],
testTimeout: 120000,
testMatch: ['<rootDir>/e2e/**/*.test.ts'],
testTimeout: 50000,
maxWorkers: 1,
globalSetup: 'detox/runners/jest/globalSetup',
globalTeardown: 'detox/runners/jest/globalTeardown',
Expand Down
Loading