Skip to content

Commit

Permalink
handle loading scene failed in auto test (cocos#433)
Browse files Browse the repository at this point in the history
* handle loading scene failed in auto test

* commit v2
  • Loading branch information
SantyWang authored Apr 25, 2021
1 parent a11afce commit e07bcc2
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 12 deletions.
30 changes: 18 additions & 12 deletions assets/cases/TestList/backbutton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,21 +178,27 @@ export class BackButton extends Component {
director.resume();
BackButton._blockInput.active = true;
this.updateSceneIndex(true);
director.loadScene(this.getSceneName(), () => {
director.loadScene(this.getSceneName(), (err) => {
if (this.autoTest) {
TestFramework.instance.postMessage(StateCode.SCENE_CHANGED, this.getSceneName(), '', (err) => {
if (err) {
if (err) {
TestFramework.instance.endTest('', () => {
this.manuallyControl();
}
else if (BackButton._sceneIndex === sceneArray.length - 1) {
TestFramework.instance.endTest('', () => {
});
} else {
TestFramework.instance.postMessage(StateCode.SCENE_CHANGED, this.getSceneName(), '', (err) => {
if (err) {
this.manuallyControl();
});
}
else {
this.nextScene();
}
});
}
else if (BackButton._sceneIndex === sceneArray.length - 1) {
TestFramework.instance.endTest('', () => {
this.manuallyControl();
});
}
else {
this.nextScene();
}
});
}
}
BackButton._blockInput.active = false;
});
Expand Down
23 changes: 23 additions & 0 deletions settings/v2/packages/cocos-service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"__version__": "3.0.0",
"game": {
"name": "UNKNOW GAME",
"app_id": "UNKNOW",
"c_id": "0"
},
"appConfigMaps": [
{
"app_id": "UNKNOW",
"config_id": "08bbe7"
}
],
"configs": [
{
"app_id": "UNKNOW",
"config_id": "08bbe7",
"config_name": "Default",
"config_remarks": "",
"services": []
}
]
}
3 changes: 3 additions & 0 deletions settings/v2/packages/device.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"__version__": "1.0.1"
}
3 changes: 3 additions & 0 deletions settings/v2/packages/program.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"__version__": "1.0.0"
}

0 comments on commit e07bcc2

Please sign in to comment.