1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

feat: fix

This commit is contained in:
steven 2023-03-31 08:52:11 +08:00
parent 6fcfa0b505
commit ca4f363e6d
14 changed files with 42 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/detox.config.js":{"path":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/detox.config.js","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":108,"column":2}}},"fnMap":{},"branchMap":{"0":{"loc":{"start":{"line":4,"column":11},"end":{"line":4,"column":47}},"type":"cond-expr","locations":[{"start":{"line":4,"column":28},"end":{"line":4,"column":35}},{"start":{"line":4,"column":38},"end":{"line":4,"column":47}}],"line":4},"1":{"loc":{"start":{"line":9,"column":18},"end":{"line":9,"column":48}},"type":"cond-expr","locations":[{"start":{"line":9,"column":35},"end":{"line":9,"column":36}},{"start":{"line":9,"column":39},"end":{"line":9,"column":48}}],"line":9},"2":{"loc":{"start":{"line":15,"column":11},"end":{"line":15,"column":49}},"type":"cond-expr","locations":[{"start":{"line":15,"column":28},"end":{"line":15,"column":37}},{"start":{"line":15,"column":40},"end":{"line":15,"column":49}}],"line":15},"3":{"loc":{"start":{"line":16,"column":18},"end":{"line":16,"column":56}},"type":"cond-expr","locations":[{"start":{"line":16,"column":35},"end":{"line":16,"column":44}},{"start":{"line":16,"column":47},"end":{"line":16,"column":56}}],"line":16},"4":{"loc":{"start":{"line":57,"column":15},"end":{"line":57,"column":49}},"type":"cond-expr","locations":[{"start":{"line":57,"column":32},"end":{"line":57,"column":37}},{"start":{"line":57,"column":40},"end":{"line":57,"column":49}}],"line":57}},"s":{"0":1},"f":{},"b":{"0":[0,1],"1":[0,1],"2":[0,1],"3":[0,1],"4":[0,1]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"15012f7c1e880b295a4405f1f24fb4c7f92b5a37","contentHash":"7cb9f14f3a9179eabe8b1e8cabf916cda45380676acec39f619e0fc1b4bd306d"}}
{"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/detox.config.js":{"path":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/detox.config.js","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":108,"column":2}}},"fnMap":{},"branchMap":{"0":{"loc":{"start":{"line":4,"column":11},"end":{"line":4,"column":47}},"type":"cond-expr","locations":[{"start":{"line":4,"column":28},"end":{"line":4,"column":35}},{"start":{"line":4,"column":38},"end":{"line":4,"column":47}}],"line":4},"1":{"loc":{"start":{"line":9,"column":18},"end":{"line":9,"column":48}},"type":"cond-expr","locations":[{"start":{"line":9,"column":35},"end":{"line":9,"column":36}},{"start":{"line":9,"column":39},"end":{"line":9,"column":48}}],"line":9},"2":{"loc":{"start":{"line":15,"column":11},"end":{"line":15,"column":49}},"type":"cond-expr","locations":[{"start":{"line":15,"column":28},"end":{"line":15,"column":37}},{"start":{"line":15,"column":40},"end":{"line":15,"column":49}}],"line":15},"3":{"loc":{"start":{"line":16,"column":18},"end":{"line":16,"column":56}},"type":"cond-expr","locations":[{"start":{"line":16,"column":35},"end":{"line":16,"column":44}},{"start":{"line":16,"column":47},"end":{"line":16,"column":56}}],"line":16},"4":{"loc":{"start":{"line":57,"column":15},"end":{"line":57,"column":49}},"type":"cond-expr","locations":[{"start":{"line":57,"column":32},"end":{"line":57,"column":37}},{"start":{"line":57,"column":40},"end":{"line":57,"column":49}}],"line":57}},"s":{"0":1},"f":{},"b":{"0":[0,1],"1":[0,1],"2":[0,1],"3":[0,1],"4":[0,1]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"15012f7c1e880b295a4405f1f24fb4c7f92b5a37","contentHash":"54a5f7f2998fe55bc235e057d2ad9c72f0af3a0f4dc8e055145cd02b6f313000"}}

View File

@ -1 +0,0 @@
{"parent":"9d3dd1d7-6d9f-4c18-bbd5-6e059570d495","pid":60253,"argv":["/usr/local/bin/node","/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/node_modules/.bin/detox","test","--configuration","ios.sim.release"],"execArgv":[],"cwd":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate","time":1679834468058,"ppid":60248,"coverageFilename":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/.nyc_output/3842472d-9750-43b2-8f87-ebd8e71e71b0.json","externalId":"","uuid":"3842472d-9750-43b2-8f87-ebd8e71e71b0","files":["/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/detox.config.js"]}

View File

@ -1 +0,0 @@
{"parent":"3842472d-9750-43b2-8f87-ebd8e71e71b0","pid":60254,"argv":["/usr/local/bin/node","/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/node_modules/.bin/jest","--config","e2e/jest.config.js","e2e"],"execArgv":[],"cwd":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate","time":1679834468499,"ppid":60253,"coverageFilename":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/.nyc_output/5140ba79-cc16-402d-b9ea-6c6647eb8324.json","externalId":"","uuid":"5140ba79-cc16-402d-b9ea-6c6647eb8324","files":["/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/e2e/globalSetup.ts"]}

View File

@ -0,0 +1 @@
{"parent":"60df4119-cdb5-42e8-b18d-1824b91df493","pid":80718,"argv":["/usr/local/bin/node","/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/node_modules/.bin/detox","test","--configuration","android.emu.release"],"execArgv":[],"cwd":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate","time":1680173770091,"ppid":80717,"coverageFilename":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/.nyc_output/567d30c0-af7c-4538-9e48-28df65ccd884.json","externalId":"","uuid":"567d30c0-af7c-4538-9e48-28df65ccd884","files":["/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/detox.config.js"]}

View File

@ -0,0 +1 @@
{"parent":null,"pid":80717,"argv":["/usr/local/bin/node","/opt/homebrew/bin/yarn","detox","test","--configuration","android.emu.release"],"execArgv":[],"cwd":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate","time":1680173769754,"ppid":80716,"coverageFilename":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/.nyc_output/60df4119-cdb5-42e8-b18d-1824b91df493.json","externalId":"","uuid":"60df4119-cdb5-42e8-b18d-1824b91df493","files":[]}

View File

@ -1 +0,0 @@
{"parent":null,"pid":60248,"argv":["/usr/local/bin/node","/opt/homebrew/bin/yarn","detox","test","--configuration","ios.sim.release"],"execArgv":[],"cwd":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate","time":1679834467681,"ppid":60247,"coverageFilename":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/.nyc_output/9d3dd1d7-6d9f-4c18-bbd5-6e059570d495.json","externalId":"","uuid":"9d3dd1d7-6d9f-4c18-bbd5-6e059570d495","files":[]}

View File

@ -0,0 +1 @@
{"parent":"567d30c0-af7c-4538-9e48-28df65ccd884","pid":80721,"argv":["/usr/local/bin/node","/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/node_modules/.bin/jest","--config","e2e/jest.config.js","e2e"],"execArgv":[],"cwd":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate","time":1680173770580,"ppid":80718,"coverageFilename":"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/.nyc_output/bde696d3-4a44-487f-8de9-212c3afe82bf.json","externalId":"","uuid":"bde696d3-4a44-487f-8de9-212c3afe82bf","files":[]}

View File

@ -1 +1 @@
{"processes":{"3842472d-9750-43b2-8f87-ebd8e71e71b0":{"parent":"9d3dd1d7-6d9f-4c18-bbd5-6e059570d495","children":["5140ba79-cc16-402d-b9ea-6c6647eb8324"]},"5140ba79-cc16-402d-b9ea-6c6647eb8324":{"parent":"3842472d-9750-43b2-8f87-ebd8e71e71b0","children":[]},"9d3dd1d7-6d9f-4c18-bbd5-6e059570d495":{"parent":null,"children":["3842472d-9750-43b2-8f87-ebd8e71e71b0"]}},"files":{"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/detox.config.js":["3842472d-9750-43b2-8f87-ebd8e71e71b0"],"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/e2e/globalSetup.ts":["5140ba79-cc16-402d-b9ea-6c6647eb8324"]},"externalIds":{}}
{"processes":{"567d30c0-af7c-4538-9e48-28df65ccd884":{"parent":"60df4119-cdb5-42e8-b18d-1824b91df493","children":[]},"60df4119-cdb5-42e8-b18d-1824b91df493":{"parent":null,"children":["567d30c0-af7c-4538-9e48-28df65ccd884"]}},"files":{"/Users/arvinh/Desktop/remotework/react-native-pushy/Example/testHotUpdate/detox.config.js":["567d30c0-af7c-4538-9e48-28df65ccd884"]},"externalIds":{}}

12
e2e/jest.config.js Normal file
View File

@ -0,0 +1,12 @@
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
rootDir: '..',
testMatch: ['<rootDir>/e2e/**/*.test.js'],
testTimeout: 120000,
maxWorkers: 1,
globalSetup: 'detox/runners/jest/globalSetup',
globalTeardown: 'detox/runners/jest/globalTeardown',
reporters: ['detox/runners/jest/reporter'],
testEnvironment: 'detox/runners/jest/testEnvironment',
verbose: true,
};

23
e2e/starter.test.js Normal file
View File

@ -0,0 +1,23 @@
describe('Example', () => {
beforeAll(async () => {
await device.launchApp();
});
beforeEach(async () => {
await device.reloadReactNative();
});
it('should have welcome screen', async () => {
await expect(element(by.id('welcome'))).toBeVisible();
});
it('should show hello screen after tap', async () => {
await element(by.id('hello_button')).tap();
await expect(element(by.text('Hello!!!'))).toBeVisible();
});
it('should show world screen after tap', async () => {
await element(by.id('world_button')).tap();
await expect(element(by.text('World!!!'))).toBeVisible();
});
});

View File

@ -15,7 +15,7 @@
"build:android-debug": "cd Example/testHotUpdate && yarn && detox build --configuration android.emu.debug",
"build:android-release": "cd Example/testHotUpdate && yarn && detox build --configuration android.emu.release",
"test:android-release": "export ANDROID_SDK_ROOT=/Users/runner/Library/Android/sdk && cd Example/testHotUpdate && ./node_modules/.bin/nyc yarn detox test --configuration android.emu.release",
"test:android-debug": "detox test --configuration android.emu.debug",
"test:android-debug": "export ANDROID_SDK_ROOT=/Users/runner/Library/Android/sdk && cd Example/testHotUpdate && detox test --configuration android.emu.debug",
"e2e:ios": "npm run build:ios-release && npm run test:ios-release",
"e2e:android": "npm run build:android-release && npm run test:android-release",
"tests:emulator:prepare": "cd .github/workflows/scripts/functions && yarn && yarn build",