Skip to content

Commit 0df13e5

Browse files
authored
🐛 bugfix: Wrong password (ITISFoundation#3296)
1 parent 1b9984d commit 0df13e5

File tree

7 files changed

+38
-2
lines changed

7 files changed

+38
-2
lines changed

services/web/client/source/class/osparc/auth/Manager.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,18 @@ qx.Class.define("osparc.auth.Manager", {
152152
loginCbk.call(context, resp.data);
153153
})
154154
.catch(err => failCbk.call(context, err.message));
155+
} else {
156+
const resp = JSON.parse(xhr.responseText);
157+
if ("error" in resp && resp["error"]) {
158+
failCbk.call(context, resp["error"]["message"]);
159+
} else {
160+
failCbk.call(context, this.tr("Login failed"));
161+
}
155162
}
156163
};
164+
xhr.onerror = () => {
165+
failCbk.call(context, this.tr("Login failed"));
166+
};
157167
xhr.open("POST", url, true);
158168
xhr.setRequestHeader("Content-Type", "application/json");
159169
xhr.send(JSON.stringify(params));

services/web/client/source/class/osparc/component/tutorial/ti/Slides.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ qx.Class.define("osparc.component.tutorial.ti.Slides", {
3333
resizable: false
3434
});
3535

36+
const closeBtn = this.getChildControl("close-button");
37+
osparc.utils.Utils.setIdToWidget(closeBtn, "quickStartWindowCloseBtn");
38+
3639
const arrowsLayout = this.__createArrows();
3740
this.add(arrowsLayout);
3841

@@ -138,6 +141,7 @@ qx.Class.define("osparc.component.tutorial.ti.Slides", {
138141

139142
const text1 = "<a href=https://www.youtube.com/watch?v=dQw4w9WgXcQ style='color: white' target='_blank'>Youtube video</a>";
140143
const link1 = new qx.ui.basic.Label(text1).set({
144+
visibility: "excluded", // remove this when the video is available
141145
allowGrowX: true,
142146
textAlign: "center",
143147
rich : true
@@ -164,7 +168,7 @@ qx.Class.define("osparc.component.tutorial.ti.Slides", {
164168
flex: 1
165169
});
166170

167-
const text3 = "<a href=https://itis.swiss/meta-navigation/privacy-policy/ style='color: white' target='_blank'>License</a>";
171+
const text3 = "<a href=https://itis.swiss/meta-navigation/privacy-policy/ style='color: white' target='_blank'>Privacy Policy</a>";
168172
const link3 = new qx.ui.basic.Label(text3).set({
169173
allowGrowX: true,
170174
textAlign: "center",

services/web/client/source/class/osparc/dashboard/ResourceBrowserBase.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
209209

210210
if (osparc.utils.Utils.isProduct("tis")) {
211211
const dontShow = osparc.utils.Utils.localCache.getLocalStorageItem("tiDontShowQuickStart");
212-
if (dontShow !== "true" && templates === false && resources.length === 0 && this._resourcesContainer.nextRequest === null) {
212+
if (dontShow === "true") {
213+
return;
214+
}
215+
if (templates === false && resources.length === 0 && this._resourcesContainer.nextRequest === null) {
213216
// there are no studies
214217
const tutorialWindow = new osparc.component.tutorial.ti.Slides();
215218
tutorialWindow.center();
-8.3 MB
Loading

tests/e2e/tutorials/ti-plan.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ async function runTutorial() {
2121
try {
2222
await tutorial.start();
2323

24+
await utils.sleep(2000, "Wait for Quick Start dialog");
25+
await tutorial.closeQuickStart();
26+
2427
// check that the "New Study" is "New Plan"
2528
await tutorial.checkFirstStudyId("newPlanButton");
2629

tests/e2e/tutorials/tutorialBase.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ class TutorialBase {
117117
}
118118
}
119119

120+
async closeQuickStart() {
121+
await this.takeScreenshot("preCloseQuickStart");
122+
await auto.closeQuickStart(this.__page);
123+
await this.takeScreenshot("postCloseQuickStart");
124+
}
125+
120126
async registerIfNeeded() {
121127
if (this.__newUser) {
122128
await auto.register(this.__page, this.__user, this.__pass);

tests/e2e/utils/auto.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ async function acceptCookies(page) {
1111
.catch(() => console.log("Accept Cookies button not found"));
1212
}
1313

14+
async function closeQuickStart(page) {
15+
const id = '[osparc-test-id=quickStartWindowCloseBtn]';
16+
await page.waitForSelector(id, {
17+
timeout: 5000
18+
})
19+
.then(() => page.click(id))
20+
.catch(() => console.log("Quick Start window not found"));
21+
}
22+
1423
async function register(page, user, pass) {
1524
await utils.waitAndClick(page, '[osparc-test-id="loginCreateAccountBtn"]');
1625

@@ -357,6 +366,7 @@ async function downloadSelectedFile(page) {
357366

358367
module.exports = {
359368
acceptCookies,
369+
closeQuickStart,
360370
register,
361371
logIn,
362372
logOut,

0 commit comments

Comments
 (0)