Merge pull request #3671 from NoelDeMartin/MOBILE-4270

MOBILE-4270: QA Tweaks
main
Dani Palou 2023-05-11 13:05:12 +02:00 committed by GitHub
commit 76713e204f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 3 deletions

View File

@ -45,7 +45,6 @@ class behat_app extends behat_app_helper {
];
protected $featurepath = '';
protected $windowsize = '360x720';
/**
* @BeforeScenario

View File

@ -201,7 +201,7 @@ class behat_app_helper extends behat_base {
$restart = true;
// Reset its size.
$this->resize_window($this->windowsize, true);
$this->resize_app_window();
// Visit the Ionic URL.
$this->getSession()->visit($this->get_app_url());
@ -596,4 +596,18 @@ EOF;
return null;
}
/**
* Resize window to have app dimensions.
*/
protected function resize_app_window() {
$width = 500;
$height = 720;
$offset = $this->evaluate_script("{
x: window.outerWidth - document.body.offsetWidth,
y: window.outerHeight - window.innerHeight,
}");
$this->getSession()->getDriver()->resizeWindow($width + $offset['x'], $height + $offset['y']);
}
}

View File

@ -601,6 +601,8 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
module: this.module,
...options,
},
animated: !options.replace,
replace: options.replace,
},
);
}
@ -649,6 +651,7 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
subwikiId: subwikiId,
userId: userId,
groupId: groupId,
replace: true,
});
}
}
@ -1089,4 +1092,5 @@ type AddonModWikiOpenPageOptions = {
pageId?: number;
userId?: number;
groupId?: number;
replace?: boolean;
};

View File

@ -83,7 +83,7 @@
}
.extra {
flex-shrink: 1;
flex-shrink: 0;
display: flex;
flex-direction: row;
padding-left: 8px;