Skip to content

Commit

Permalink
Test adjustments, e2e CI
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnavarro committed Feb 11, 2025
1 parent 30af8f2 commit 5f1f4b5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion test/e2e/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ stop:
lint:
npm run lint

container-images:
build-images:
#!/usr/bin/env bash
set -euo pipefail
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ Cypress.Commands.add("clearupDeployments", () => {
Cypress.Commands.add("loadProjectConfigFile", (projectName) => {
const projectConfigPath = `content-workspace/${projectName}/.posit/publish/static-*.toml`;
// Do not fail on non-zero exit this time, we can provide a better error
return cy
.exec(`cat ${projectConfigPath}`, { failOnNonZeroExit: false })
return cy.exec(`cat ${projectConfigPath}`, { failOnNonZeroExit: false })
.then((result) => {
if (result.code === 0 && result.stdout) {
return toml.parse(result.stdout);
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/credentials.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe("Credentials Section", () => {

cy.findInPublisherWebview(
'[data-automation="admin-code-server-list"]',
).then(($credRecord) => {
).should(($credRecord) => {
expect($credRecord.find(".tree-item-title").text()).to.equal(
"admin-code-server",
);
Expand Down
14 changes: 7 additions & 7 deletions test/e2e/tests/deployments.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ describe("Deployments Section", () => {
.should("be.visible")
.click();

cy.loadProjectConfigFile("static").then((config) => {
expect(config.title).to.equal("static");
expect(config.type).to.equal("html");
expect(config.entrypoint).to.equal("index.html");
expect(config.files[0]).to.equal("/index.html");
});

cy.publisherWebview()
.findByTestId("deploy-button")
.should("be.visible")
Expand All @@ -77,5 +70,12 @@ describe("Deployments Section", () => {
.should("not.exist");

cy.findByText("Deployment was successful").should("be.visible");

cy.loadProjectConfigFile("static").then((config) => {
expect(config.title).to.equal("static");
expect(config.type).to.equal("html");
expect(config.entrypoint).to.equal("index.html");
expect(config.files[0]).to.equal("/index.html");
});
});
});

0 comments on commit 5f1f4b5

Please sign in to comment.