Skip to content

Commit

Permalink
test(e2e): Refactor project list test for clarity and accuracy.
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagodallacqua-hpe committed Oct 9, 2024
1 parent 92b5a72 commit f39a22f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions webui/react/src/e2e/tests/projects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ test.describe('Project List', () => {

const projectsTable = workspaceProjects.table.table;

const newProjectRow = (
let newProjectRow = (
await projectsTable.filterRows(
async (row) => (await row.name.pwLocator.textContent()) === newProject.project.name,
)
Expand All @@ -297,11 +297,13 @@ test.describe('Project List', () => {
await workspaceProjects.moveModal.pwLocator.waitFor({ state: 'hidden' });
await newProjectRow.pwLocator.waitFor({ state: 'hidden' });

const projectsWithoutNewItem = await projectsTable.filterRows(
async (row) => (await row.name.pwLocator.textContent()) === newProject.project.name,
);
newProjectRow = (
await projectsTable.filterRows(
async (row) => (await row.name.pwLocator.textContent()) === newProject.project.name,
)
)[0];

await expect(projectsWithoutNewItem.length).toBe(0);
await expect(newProjectRow).toBeUndefined();

await workspaceDetails.gotoWorkspace(destinationWorkspace.id);

Expand Down

0 comments on commit f39a22f

Please sign in to comment.