This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/evergreen-ci/spruce into EV…
- Loading branch information
Showing
122 changed files
with
4,813 additions
and
3,860 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { CodegenConfig } from "@graphql-codegen/cli"; | ||
|
||
const config: CodegenConfig = { | ||
schema: "sdlschema/**/*.graphql", | ||
documents: ["./src/**/*.ts", "./src/**/*.graphql", "./src/**/*.gql"], | ||
hooks: { | ||
afterAllFileWrite: ["prettier --write"], | ||
}, | ||
overwrite: true, | ||
generates: { | ||
"./src/gql/generated/types.ts": { | ||
plugins: ["typescript", "typescript-operations"], | ||
config: { | ||
preResolveTypes: true, | ||
arrayInputCoercion: false, | ||
scalars: { | ||
StringMap: "{ [key: string]: any }", | ||
Time: "Date", | ||
Duration: "number", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default config; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { | ||
getViewsAndFiltersRoute, | ||
saveButtonEnabled, | ||
clickSave, | ||
} from "./constants"; | ||
|
||
describe("Views & filters page", () => { | ||
const destination = getViewsAndFiltersRoute("sys-perf"); | ||
|
||
beforeEach(() => { | ||
cy.visit(destination); | ||
// Wait for page content to finish loading. | ||
cy.dataCy("parsley-filter-list").children().should("have.length", 2); | ||
saveButtonEnabled(false); | ||
}); | ||
|
||
describe("parsley filters", () => { | ||
it("does not allow saving with invalid regular expression or empty expression", () => { | ||
cy.contains("button", "Add filter").should("be.visible").click(); | ||
cy.dataCy("parsley-filter-expression").first().type("*"); | ||
saveButtonEnabled(false); | ||
cy.contains("Value should be a valid regex expression."); | ||
cy.dataCy("parsley-filter-expression").first().clear(); | ||
saveButtonEnabled(false); | ||
}); | ||
|
||
it("does not allow saving with duplicate filter expressions", () => { | ||
cy.contains("button", "Add filter").should("be.visible").click(); | ||
cy.dataCy("parsley-filter-expression").first().type("filter_1"); | ||
saveButtonEnabled(false); | ||
cy.contains("Filter expression already appears in this project."); | ||
}); | ||
|
||
it("can successfully save and delete filter", () => { | ||
cy.contains("button", "Add filter").should("be.visible").click(); | ||
cy.dataCy("parsley-filter-expression").first().type("my_filter"); | ||
saveButtonEnabled(true); | ||
clickSave(); | ||
cy.validateToast("success", "Successfully updated project"); | ||
cy.dataCy("parsley-filter-list").children().should("have.length", 3); | ||
|
||
cy.dataCy("delete-item-button").first().should("be.visible").click(); | ||
clickSave(); | ||
cy.validateToast("success", "Successfully updated project"); | ||
cy.dataCy("parsley-filter-list").children().should("have.length", 2); | ||
}); | ||
}); | ||
|
||
describe("project view", () => { | ||
it("updates field to 'all' view and back to 'default'", () => { | ||
cy.getInputByLabel("All tasks view").click({ force: true }); | ||
clickSave(); | ||
cy.validateToast("success", "Successfully updated project"); | ||
cy.getInputByLabel("All tasks view").should("be.checked"); | ||
|
||
cy.getInputByLabel("Default view").click({ force: true }); | ||
clickSave(); | ||
cy.validateToast("success", "Successfully updated project"); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
describe("Name change modal", () => { | ||
beforeEach(() => { | ||
cy.visit("version/5f74d99ab2373627c047c5e5"); | ||
}); | ||
|
||
it("Use the name change modal to change the name of a patch", () => { | ||
const originalName = "main: EVG-7823 add a commit queue message (#4048)"; | ||
cy.contains(originalName); | ||
cy.dataCy("name-change-modal-trigger").click(); | ||
const newName = "a different name"; | ||
cy.get("textarea").clear().type(newName); | ||
cy.contains("Confirm").click(); | ||
cy.get("textarea").should("not.exist"); | ||
cy.contains(newName); | ||
cy.validateToast("success", "Patch name was successfully updated.", true); | ||
// revert name change | ||
cy.dataCy("name-change-modal-trigger").click(); | ||
cy.get("textarea").clear().type(originalName); | ||
cy.contains("Confirm").click(); | ||
cy.get("textarea").should("not.exist"); | ||
cy.validateToast("success", "Patch name was successfully updated.", true); | ||
cy.contains(originalName); | ||
}); | ||
|
||
it("The confirm button is disabled when the text area value is empty or greater than 300 characters", () => { | ||
cy.dataCy("name-change-modal-trigger").click(); | ||
cy.get("textarea").clear(); | ||
cy.contains("button", "Confirm").should("be.disabled"); | ||
cy.get("textarea").type("lol"); | ||
cy.contains("button", "Confirm").should("not.be.disabled"); | ||
const over300Chars = | ||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; | ||
cy.get("textarea").type(over300Chars); | ||
cy.contains("button", "Confirm").should("be.disabled"); | ||
cy.contains("should NOT be longer than 300 characters"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.