Merge pull request '3127-starredModules_role_bug' (#757) from 3127-starredModules_role_bug into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #757 Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
11b908668d
|
@ -9,7 +9,7 @@ env:
|
||||||
rules:
|
rules:
|
||||||
require-jsdoc: 0
|
require-jsdoc: 0
|
||||||
no-undef: 0
|
no-undef: 0
|
||||||
max-len: 0
|
max-len: ["error", {code: 120}]
|
||||||
eqeqeq: 0
|
eqeqeq: 0
|
||||||
operator-linebreak: 0
|
operator-linebreak: 0
|
||||||
radix: 0
|
radix: 0
|
||||||
|
@ -17,7 +17,7 @@ rules:
|
||||||
camelcase: 0
|
camelcase: 0
|
||||||
default-case: 0
|
default-case: 0
|
||||||
no-eq-null: 0
|
no-eq-null: 0
|
||||||
no-console: 0
|
no-console: ["error"]
|
||||||
no-warning-comments: 0
|
no-warning-comments: 0
|
||||||
no-empty: [error, allowEmptyCatch: true]
|
no-empty: [error, allowEmptyCatch: true]
|
||||||
complexity: 0
|
complexity: 0
|
||||||
|
|
|
@ -94,6 +94,19 @@ let actions = {
|
||||||
login: async function(userName) {
|
login: async function(userName) {
|
||||||
await this.doLogin(userName);
|
await this.doLogin(userName);
|
||||||
await this.waitForState('home');
|
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) {
|
selectModule: async function(moduleName) {
|
||||||
|
@ -208,7 +221,8 @@ let actions = {
|
||||||
waitPropertyLength: async function(selector, property, minLength) {
|
waitPropertyLength: async function(selector, property, minLength) {
|
||||||
await this.waitForFunction((selector, property, minLength) => {
|
await this.waitForFunction((selector, property, minLength) => {
|
||||||
const element = document.querySelector(selector);
|
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);
|
}, {}, selector, property, minLength);
|
||||||
return this.getProperty(selector, property);
|
return this.getProperty(selector, property);
|
||||||
},
|
},
|
||||||
|
|
|
@ -48,12 +48,6 @@ export async function getBrowser() {
|
||||||
});
|
});
|
||||||
page = extendPage(page);
|
page = extendPage(page);
|
||||||
page.setDefaultTimeout(5000);
|
page.setDefaultTimeout(5000);
|
||||||
await page.addStyleTag({
|
|
||||||
content: `* {
|
|
||||||
transition: none!important;
|
|
||||||
animation: none!important;
|
|
||||||
}`
|
|
||||||
});
|
|
||||||
|
|
||||||
await page.goto(defaultURL, {waitUntil: 'load'});
|
await page.goto(defaultURL, {waitUntil: 'load'});
|
||||||
return {page, close: browser.close.bind(browser)};
|
return {page, close: browser.close.bind(browser)};
|
||||||
|
|
|
@ -34,8 +34,10 @@ export default class Controller extends Component {
|
||||||
|
|
||||||
for (let starredModule of res.data) {
|
for (let starredModule of res.data) {
|
||||||
const module = this.modules.find(mod => mod.name === starredModule.moduleFk);
|
const module = this.modules.find(mod => mod.name === starredModule.moduleFk);
|
||||||
module.starred = true;
|
if (module) {
|
||||||
module.position = starredModule.position;
|
module.starred = true;
|
||||||
|
module.position = starredModule.position;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.countModules();
|
this.countModules();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue