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

fix(web): table-related and small bugs #1103

Merged
merged 7 commits into from
Mar 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: placeholder in test
caichi-t committed Mar 18, 2024
commit 774a9648f66292b3d9db8c25d86730e8681680a7
8 changes: 4 additions & 4 deletions web/e2e/project/asset.spec.ts
Original file line number Diff line number Diff line change
@@ -27,12 +27,12 @@ test("Asset CRUD and Searching has succeeded", async ({ page }) => {
await expect(page.getByRole("alert").last()).toContainText("Successfully added asset!");
await closeNotification(page);
await expect(page.getByText(uploadFileName)).toBeVisible();
await page.getByPlaceholder("Please enter").click();
await page.getByPlaceholder("Please enter").fill("no asset");
await page.getByPlaceholder("input search text").click();
await page.getByPlaceholder("input search text").fill("no asset");
await page.getByRole("button", { name: "search" }).click();
await expect(page.getByText(uploadFileName)).not.toBeVisible();
await page.getByPlaceholder("Please enter").click();
await page.getByPlaceholder("Please enter").fill("");
await page.getByPlaceholder("input search text").click();
await page.getByPlaceholder("input search text").fill("");
await page.getByRole("button", { name: "search" }).click();
await expect(page.getByText(uploadFileName)).toBeVisible();
await page.getByLabel("edit").locator("svg").click();
13 changes: 4 additions & 9 deletions web/e2e/project/content.spec.ts
Original file line number Diff line number Diff line change
@@ -17,12 +17,7 @@ test.afterEach(async ({ page }) => {
});

test("Item CRUD and searching has succeeded", async ({ page }) => {
await page
.locator("li")
.filter({ hasText: "TextHeading and titles, one-" })
.locator("div")
.first()
.click();
await page.locator("li").filter({ hasText: "Text" }).locator("div").first().click();
await handleFieldForm(page, "text");
await closeNotification(page);
await page.getByText("Content").click();
@@ -34,11 +29,11 @@ test("Item CRUD and searching has succeeded", async ({ page }) => {
await closeNotification(page);
await page.getByLabel("Back").click();
await expect(page.getByRole("cell", { name: "text", exact: true })).toBeVisible();
await page.getByPlaceholder("Please enter").click();
await page.getByPlaceholder("Please enter").fill("no field");
await page.getByPlaceholder("input search text").click();
await page.getByPlaceholder("input search text").fill("no field");
await page.getByRole("button", { name: "search" }).click();
await expect(page.getByRole("cell", { name: "text", exact: true })).not.toBeVisible();
await page.getByPlaceholder("Please enter").fill("");
await page.getByPlaceholder("input search text").fill("");
await page.getByRole("button", { name: "search" }).click();
await expect(page.getByRole("cell", { name: "text", exact: true })).toBeVisible();
await page.getByRole("link", { name: "edit", exact: true }).click();
8 changes: 4 additions & 4 deletions web/e2e/project/item/fields/asset.spec.ts
Original file line number Diff line number Diff line change
@@ -96,12 +96,12 @@ test("Asset field editing has succeeded", async ({ page }) => {
await expect(page.getByRole("button", { name: uploadFileName_1, exact: true })).toBeVisible();
await page.getByLabel("Default value").getByRole("button").nth(3).click();
await page.getByRole("button", { name: "Asset" }).click();
await page.getByPlaceholder("Please enter").click();
await page.getByPlaceholder("Please enter").fill("no asset");
await page.getByPlaceholder("input search text").click();
await page.getByPlaceholder("input search text").fill("no asset");
await page.getByRole("button", { name: "search" }).click();
await expect(page.locator(".ant-table-row").first()).not.toBeVisible();
await page.getByPlaceholder("Please enter").click();
await page.getByPlaceholder("Please enter").fill("");
await page.getByPlaceholder("input search text").click();
await page.getByPlaceholder("input search text").fill("");
await page.getByRole("button", { name: "search" }).click();
await page.locator(".ant-table-row > td").first().getByRole("button").hover();
await page.locator(".ant-table-row > td").first().getByRole("button").click();
6 changes: 3 additions & 3 deletions web/e2e/project/request.spec.ts
Original file line number Diff line number Diff line change
@@ -30,12 +30,12 @@ test("Request creating, searching, updating reviewer, and approving has succeede
await page.getByText("Request", { exact: true }).click();
await expect(page.getByText(requestTitle, { exact: true })).toBeVisible();
await expect(page.getByText("WAITING")).toBeVisible();
await page.getByPlaceholder("Please enter").click();
await page.getByPlaceholder("Please enter").fill("no request");
await page.getByPlaceholder("input search text").click();
await page.getByPlaceholder("input search text").fill("no request");
await page.getByRole("button", { name: "search" }).click();
await expect(page.getByText(requestTitle, { exact: true })).not.toBeVisible();
await expect(page.getByText("WAITING")).not.toBeVisible();
await page.getByPlaceholder("Please enter").fill("");
await page.getByPlaceholder("input search text").fill("");
await page.getByRole("button", { name: "search" }).click();
await expect(page.getByText(requestTitle, { exact: true })).toBeVisible();
await expect(page.getByText("WAITING")).toBeVisible();
12 changes: 6 additions & 6 deletions web/e2e/settings/integrations.spec.ts
Original file line number Diff line number Diff line change
@@ -32,8 +32,8 @@ test("Integration CRUD and searching has succeeded", async ({ reearth, page }) =
);
await closeNotification(page);
await expect(page.getByRole("cell", { name: "e2e integration name", exact: true })).toBeVisible();
await page.getByPlaceholder("Please enter").click();
await page.getByPlaceholder("Please enter").fill("e2e integration name");
await page.getByPlaceholder("input search text").click();
await page.getByPlaceholder("input search text").fill("e2e integration name");
await page.getByRole("button", { name: "search" }).click();
await page.getByRole("cell", { name: "setting" }).locator("svg").click();
await page
@@ -48,14 +48,14 @@ test("Integration CRUD and searching has succeeded", async ({ reearth, page }) =
);
await closeNotification(page);
await expect(page.getByRole("cell", { name: "WRITER" })).toBeVisible();
await page.getByPlaceholder("Please enter").click();
await page.getByPlaceholder("Please enter").fill("no integration");
await page.getByPlaceholder("input search text").click();
await page.getByPlaceholder("input search text").fill("no integration");
await page.getByRole("button", { name: "search" }).click();
await expect(
page.getByRole("cell", { name: "e2e integration name", exact: true }),
).not.toBeVisible();
await page.getByPlaceholder("Please enter").click();
await page.getByPlaceholder("Please enter").fill("e2e integration name");
await page.getByPlaceholder("input search text").click();
await page.getByPlaceholder("input search text").fill("e2e integration name");
await page.getByRole("button", { name: "search" }).click();
await expect(page.getByRole("cell", { name: "e2e integration name", exact: true })).toBeVisible();
await page.getByLabel("", { exact: true }).check();

Unchanged files with check annotations Beta

`;
export const CREATE_ASSET_UPLOAD = gql`
mutation CreateAssetUpload($projectId: ID!, $filename: String!, $cursor: String!, $contentLength: Int!) {

Check warning on line 129 in web/src/gql/queries/assets.ts

GitHub Actions / ci

Replace `$projectId:·ID!,·$filename:·String!,·$cursor:·String!,·$contentLength:·Int!` with `⏎····$projectId:·ID!⏎····$filename:·String!⏎····$cursor:·String!⏎····$contentLength:·Int!⏎··`
createAssetUpload(input: { projectId: $projectId, filename: $filename, cursor: $cursor, contentLength: $contentLength }) {

Check warning on line 130 in web/src/gql/queries/assets.ts

GitHub Actions / ci

Replace `input:·{·projectId:·$projectId,·filename:·$filename,·cursor:·$cursor,·contentLength:·$contentLength·}` with `⏎······input:·{⏎········projectId:·$projectId⏎········filename:·$filename⏎········cursor:·$cursor⏎········contentLength:·$contentLength⏎······}⏎····`
url
token
contentType