Skip to content

Commit

Permalink
Fix api-access-methods.spec - counting of access methods was off
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Oct 28, 2024
1 parent fc5d608 commit 7e50d6e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ test('App should add invalid access method', async () => {
).toEqual(RoutePath.apiAccessMethods);

const accessMethods = page.getByTestId('access-method');
await expect(accessMethods).toHaveCount(3);
// Direct, Bridges, Encrypted DNS Proxy & the non-functioning access method.
await expect(accessMethods).toHaveCount(4);

await expect(accessMethods.last()).toHaveText(NON_FUNCTIONING_METHOD_NAME);
});
Expand Down Expand Up @@ -137,7 +138,8 @@ test('App should edit access method', async () => {
);

const accessMethods = page.getByTestId('access-method');
await expect(accessMethods).toHaveCount(3);
// Direct, Bridges, Encrypted DNS Proxy & the custom access method.
await expect(accessMethods).toHaveCount(4);

await expect(accessMethods.last()).toHaveText(FUNCTIONING_METHOD_NAME);
});
Expand Down Expand Up @@ -172,5 +174,6 @@ test('App should delete method', async () => {

await expect(page.getByText(`Delete ${FUNCTIONING_METHOD_NAME}?`)).toBeVisible();
await page.locator('button:has-text("Delete")').click();
await expect(accessMethods).toHaveCount(2);
// Direct, Bridges, Encrypted DNS Proxy.
await expect(accessMethods).toHaveCount(3);
});

0 comments on commit 7e50d6e

Please sign in to comment.