Skip to content

Commit

Permalink
Upgrades bw to fix tests (#488)
Browse files Browse the repository at this point in the history
* upgrades bw to fix tests

* fixes event type

* fix auth test

* fmt
  • Loading branch information
elliotBraem authored Jul 29, 2024
1 parent f1de56a commit 604b677
Show file tree
Hide file tree
Showing 5 changed files with 375 additions and 484 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
cache: "yarn"
- name: Install dependencies
run: |
yarn add bos-workspace@1.0.0-alpha.32
yarn add bos-workspace
yarn playwright install-deps
yarn playwright install
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"@playwright/test": "^1.43.1",
"assert": "^2.0.0",
"babel-loader": "^8.2.2",
"bos-workspace": "1.0.0-alpha.32",
"bos-workspace": "^1.0.0-alpha",
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
"clean-webpack-plugin": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion playwright-tests/tests/activity.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ test.describe("User is logged in", () => {
backgroundImage: {
ipfs_cid: "bafkreifk42ibqsg5sfky5tlhkfty6rkup5leqite5koenhesnuwq55kufi",
},
type: "buildhub.testnet/type/event",
type: "builddao.testnet/type/event",
};
expect(actualEventData.metadata).toMatchObject(expectedMetadata);

Expand Down
10 changes: 6 additions & 4 deletions playwright-tests/tests/auth.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ test.describe("User is not logged in", () => {
await page.goto(`/${ROOT_SRC}`);
});

test("To verify that the sign in button is visible in the home page and when clicked navigates to login page", async ({
test("should show sign in button and navigate to login page when clicked", async ({
page,
}) => {
const signInButton = page.getByRole("button", { name: "Sign in" }).nth(1);
const signInButton = page.getByRole("button", { name: "Sign In" }).nth(1);
await expect(signInButton).toBeVisible();
await signInButton.click();
expect(page.url()).toContain("/join");
Expand All @@ -29,14 +29,16 @@ test.describe("User is logged in", () => {
await page.goto(`/${ROOT_SRC}`);
});

test("To verify that the user is logged in succesfully", async ({ page }) => {
test("should show user is logged in succesfully in user dropdown", async ({
page,
}) => {
const LoggedInButton = page.getByRole("button", {
name: "saswat_test.testnet",
});
await expect(LoggedInButton).toHaveText("saswat_test.testnet");
});

test("To verify that the sign out button is visible in the dropdown and when clicked navigates to logout page", async ({
test("should show sign out button in the dropdown and navigate to logout page when clicked", async ({
page,
}) => {
const LoggedInButton = page.getByRole("button", {
Expand Down
Loading

0 comments on commit 604b677

Please sign in to comment.