Skip to content

Commit

Permalink
Merge branch 'release-0.52.x' into build-authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski authored Apr 10, 2024
2 parents 948896c + 02a4f16 commit b8627c7
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 22 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pull-request-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 1
matrix:
tests:
[
Expand Down
8 changes: 5 additions & 3 deletions cypress-tests/cypress/e2e/checkWorkflows.cy.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { TIMEOUTS } from "../../config";
import { ProjectIdentifier } from "../support/commands/projects";
import { validateLogin } from "../support/commands/general";
import { validateLogin, getRandomString } from "../support/commands/general";

const project: ProjectIdentifier = {
namespace: "renku-ui-tests",
name: "composite-workflows",
};

const sessionId = ["checkWorkflows", getRandomString()];

describe("Workflows pages", () => {
before(() => {
// Use a session to preserve login data
cy.session(
"login-updateProjects",
sessionId,
() => {
cy.robustLogin();
},
Expand All @@ -22,7 +24,7 @@ describe("Workflows pages", () => {
beforeEach(() => {
// Restore the session
cy.session(
"login-updateProjects",
sessionId,
() => {
cy.robustLogin();
},
Expand Down
8 changes: 5 additions & 3 deletions cypress-tests/cypress/e2e/privateProject.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ProjectIdentifier,
generatorProjectName,
} from "../support/commands/projects";
import { validateLogin } from "../support/commands/general";
import { validateLogin, getRandomString } from "../support/commands/general";

const username = Cypress.env("TEST_USERNAME");

Expand All @@ -21,11 +21,13 @@ const projectIdentifier: ProjectIdentifier = {
namespace: username,
};

const sessionId = ["privateProject", getRandomString()];

describe("Basic public project functionality", () => {
before(() => {
// Use a session to preserve login data
cy.session(
"login-publicProject",
sessionId,
() => {
cy.robustLogin();
},
Expand All @@ -46,7 +48,7 @@ describe("Basic public project functionality", () => {
beforeEach(() => {
// Restore the session
cy.session(
"login-publicProject",
sessionId,
() => {
cy.robustLogin();
},
Expand Down
8 changes: 5 additions & 3 deletions cypress-tests/cypress/e2e/publicProject.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
generatorProjectName,
projectUrlFromIdentifier,
} from "../support/commands/projects";
import { validateLogin } from "../support/commands/general";
import { validateLogin, getRandomString } from "../support/commands/general";

const username = Cypress.env("TEST_USERNAME");

Expand All @@ -22,11 +22,13 @@ const projectIdentifier: ProjectIdentifier = {
namespace: username,
};

const sessionId = ["publicProject", getRandomString()];

describe("Basic public project functionality", () => {
before(() => {
// Use a session to preserve login data
cy.session(
"login-publicProject",
sessionId,
() => {
cy.robustLogin();
},
Expand All @@ -43,7 +45,7 @@ describe("Basic public project functionality", () => {
beforeEach(() => {
// Restore the session
cy.session(
"login-publicProject",
sessionId,
() => {
cy.robustLogin();
},
Expand Down
8 changes: 5 additions & 3 deletions cypress-tests/cypress/e2e/rstudioSession.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ProjectIdentifier,
generatorProjectName,
} from "../support/commands/projects";
import { validateLogin } from "../support/commands/general";
import { validateLogin, getRandomString } from "../support/commands/general";

const username = Cypress.env("TEST_USERNAME");

Expand All @@ -23,11 +23,13 @@ const projectIdentifier: ProjectIdentifier = {
namespace: username,
};

const sessionId = ["rstudioSession", getRandomString()];

describe("Basic rstudio functionality", () => {
before(() => {
// Use a session to preserve login data
cy.session(
"login-rstudioSession",
sessionId,
() => {
cy.robustLogin();
},
Expand All @@ -49,7 +51,7 @@ describe("Basic rstudio functionality", () => {
beforeEach(() => {
// Restore the session
cy.session(
"login-rstudioSession",
sessionId,
() => {
cy.robustLogin();
},
Expand Down
8 changes: 5 additions & 3 deletions cypress-tests/cypress/e2e/testDatasets.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ProjectIdentifier,
generatorProjectName,
} from "../support/commands/projects";
import { validateLogin } from "../support/commands/general";
import { validateLogin, getRandomString } from "../support/commands/general";
import { generatorDatasetName } from "../support/commands/datasets";

const username = Cypress.env("TEST_USERNAME");
Expand All @@ -23,11 +23,13 @@ const projectIdentifier: ProjectIdentifier = {
};
const generatedDatasetName = generatorDatasetName("Dataset");

const sessionId = ["testDatasets", getRandomString()];

describe("Basic datasets functionality", () => {
before(() => {
// Use a session to preserve login data
cy.session(
"login-publicProject",
sessionId,
() => {
cy.robustLogin();
},
Expand All @@ -49,7 +51,7 @@ describe("Basic datasets functionality", () => {
beforeEach(() => {
// Restore the session
cy.session(
"login-publicProject",
sessionId,
() => {
cy.robustLogin();
},
Expand Down
8 changes: 5 additions & 3 deletions cypress-tests/cypress/e2e/updateProjects.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TIMEOUTS } from "../../config";
import { validateLogin } from "../support/commands/general";
import { validateLogin, getRandomString } from "../support/commands/general";
import { generatorProjectName } from "../support/commands/projects";

const username = Cypress.env("TEST_USERNAME");
Expand All @@ -18,11 +18,13 @@ const projects = {
// projects.v8 = "anotherProjectV8";
// projects.v9 = "anotherProjectV9";

const sessionId = ["updateProjects", getRandomString()];

describe("Fork and update old projects", () => {
before(() => {
// Use a session to preserve login data
cy.session(
"login-updateProjects",
sessionId,
() => {
cy.robustLogin();
},
Expand All @@ -33,7 +35,7 @@ describe("Fork and update old projects", () => {
beforeEach(() => {
// Restore the session
cy.session(
"login-updateProjects",
sessionId,
() => {
cy.robustLogin();
},
Expand Down
8 changes: 5 additions & 3 deletions cypress-tests/cypress/e2e/useSession.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TIMEOUTS } from "../../config";
import { generatorProjectName } from "../support/commands/projects";
import { validateLogin } from "../support/commands/general";
import { validateLogin, getRandomString } from "../support/commands/general";
import { v4 as uuidv4 } from "uuid";

const username = Cypress.env("TEST_USERNAME");
Expand All @@ -24,11 +24,13 @@ const projectWithoutPermissions = {
name: "stable-project",
};

const sessionId = ["useSession", getRandomString()];

describe("Basic public project functionality", () => {
before(() => {
// Use a session to preserve login data
cy.session(
"login-useSession",
sessionId,
() => {
cy.robustLogin();
},
Expand All @@ -50,7 +52,7 @@ describe("Basic public project functionality", () => {
beforeEach(() => {
// Restore the session
cy.session(
"login-useSession",
sessionId,
() => {
cy.robustLogin();
},
Expand Down
4 changes: 4 additions & 0 deletions cypress-tests/cypress/support/commands/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ function getDataCy(value: string, exist?: boolean) {
return cy.get(`[data-cy=${value}]`);
}

export function getRandomString(length: number=8) {
return Math.random().toString(20).substr(2, length)
}

export default function registerGeneralCommands() {
Cypress.Commands.add("getIframe", getIframe);
Cypress.Commands.add("getDataCy", getDataCy);
Expand Down

0 comments on commit b8627c7

Please sign in to comment.