Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#8761: update internal/external naming from brick to package in the Workshop #8762

Merged
merged 13 commits into from
Jul 8, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ import { BasePageObject } from "../../basePageObject";
export class CreateWorkshopModPage extends BasePageObject {
editor = new WorkshopModEditor(this.getByLabel("Editor"));
createBrickButton = this.getByRole("button", {
name: "Create Brick",
name: "Create Package",
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export class EditWorkshopModPage extends BasePageObject {
editor = new WorkshopModEditor(this.getByLabel("Editor"));

async updateBrick() {
await this.getByRole("button", { name: "Update Brick" }).click();
await this.getByRole("button", { name: "Update Package" }).click();
}

async deleteBrick() {
await this.getByRole("button", { name: "Delete Brick" }).click();
await this.getByRole("button", { name: "Delete Package" }).click();
await this.getByRole("button", { name: "Permanently Delete" }).click();
// eslint-disable-next-line playwright/no-networkidle -- for some reason, can't assert on the "Brick deleted" notice
await this.page.waitForLoadState("networkidle");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import { BasePageObject } from "../../basePageObject";
export class WorkshopPage extends BasePageObject {
private readonly extensionConsoleUrl: string;

createNewBrickButton = this.getByRole("button", {
name: "Create New Brick",
createNewPackageButton = this.getByRole("button", {
name: "Create New Package",
});

constructor(page: Page, extensionId: string) {
Expand All @@ -50,7 +50,7 @@ export class WorkshopPage extends BasePageObject {
}

async createNewModFromDefinition(modDefinitionName: string) {
await this.createNewBrickButton.click();
await this.createNewPackageButton.click();
const createPage = new CreateWorkshopModPage(this.page);
await createPage.editor.waitForLoad();
const modId =
Expand Down
3 changes: 2 additions & 1 deletion end-to-end-tests/tests/smoke/workshopPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ test.describe("extension console workshop smoke test", () => {
const pageTitle = await page.title();
expect(pageTitle).toBe("Workshop | PixieBrix");

await expect(page.getByText("Custom Bricks")).toBeVisible();
// Pass `exact` because "packages" appears in page description
await expect(page.getByText("Packages", { exact: true })).toBeVisible();
const workshopListItems = page.getByRole("table").locator("tr");

// Expect at least one workshop item visible in the list
Expand Down
Loading
Loading