Skip to content

Commit

Permalink
fix(frontend): 🐛 Fix testids
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakob Grøtan Gregusson committed Apr 25, 2024
1 parent 1268c8e commit f8ea1df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { defineConfig, devices } from "@playwright/test";
* See https://playwright.dev/docs/test-configuration.
*/
//const baseURL = `http://localhost:3000/`;
const baseURL = `http://web.hypso.ies.ntnu.no:3000/`;
const baseURL = `https://hypso.space/`;

export default defineConfig({
testDir: "./tests/e2e",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default function SatelliteStatsTableRow({
setSelectedSatellite(satName);
handleRowClick();
}}
data-testid="satellitesTableRow"
>
<TableCell className="w-1/5 px-6">{satName}</TableCell>
<TableCell className="hidden w-1/5 sm:table-cell">
Expand Down
4 changes: 2 additions & 2 deletions frontend/tests/e2e/blog.mobile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ test.describe("Blogs pages test", () => {
await expect(page.getByTestId("pageSubtitle")).toBeVisible();
await page.getByTestId("blogsSatellitesButton").click();
await expect(page).toHaveURL("/blog?page=1&tag=Satellites");
await expect(page.getByTestId("articleTag")).toHaveText("Satellites");
await page.getByTestId("blogCardLink").click();
await expect(page.getByTestId("articleTag").first()).toHaveText("Satellites");
await page.getByTestId("blogCardLink").first().click();
await expect(page).toHaveURL(/\/blog\/.+$/);
});
test("individualBlogPagetest", async ({ page }) => {
Expand Down

0 comments on commit f8ea1df

Please sign in to comment.