Merge pull request '3127-starredModules_role_bug' (#757) from 3127-starredModules_role_bug into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #757
Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
Joan Sanchez 2021-10-20 10:17:00 +00:00
commit 11b908668d
4 changed files with 21 additions and 11 deletions

View File

@ -9,7 +9,7 @@ env:
rules:
require-jsdoc: 0
no-undef: 0
max-len: 0
max-len: ["error", {code: 120}]
eqeqeq: 0
operator-linebreak: 0
radix: 0
@ -17,7 +17,7 @@ rules:
camelcase: 0
default-case: 0
no-eq-null: 0
no-console: 0
no-console: ["error"]
no-warning-comments: 0
no-empty: [error, allowEmptyCatch: true]
complexity: 0

View File

@ -94,6 +94,19 @@ let actions = {
login: async function(userName) {
await this.doLogin(userName);
await this.waitForState('home');
await this.addStyleTag({
content: `
*,
*::after,
*::before {
transition-delay: 0s !important;
transition-duration: 0s !important;
animation-delay: -0.0001s !important;
animation-duration: 0s !important;
animation-play-state: paused !important;
caret-color: transparent !important;
}`
});
},
selectModule: async function(moduleName) {
@ -208,7 +221,8 @@ let actions = {
waitPropertyLength: async function(selector, property, minLength) {
await this.waitForFunction((selector, property, minLength) => {
const element = document.querySelector(selector);
return element && element[property] != null && element[property] !== '' && element[property].length >= minLength;
const isValidElement = element && element[property] != null && element[property] !== '';
return isValidElement && element[property].length >= minLength;
}, {}, selector, property, minLength);
return this.getProperty(selector, property);
},

View File

@ -48,12 +48,6 @@ export async function getBrowser() {
});
page = extendPage(page);
page.setDefaultTimeout(5000);
await page.addStyleTag({
content: `* {
transition: none!important;
animation: none!important;
}`
});
await page.goto(defaultURL, {waitUntil: 'load'});
return {page, close: browser.close.bind(browser)};

View File

@ -34,8 +34,10 @@ export default class Controller extends Component {
for (let starredModule of res.data) {
const module = this.modules.find(mod => mod.name === starredModule.moduleFk);
module.starred = true;
module.position = starredModule.position;
if (module) {
module.starred = true;
module.position = starredModule.position;
}
}
this.countModules();
});