-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add resources tests #425
Merged
Merged
Add resources tests #425
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,120 @@ | ||||||
import { expect, test } from "@playwright/test"; | ||||||
import { ROOT_SRC } from "../util/constants"; | ||||||
|
||||||
test.describe("?page=resources", () => { | ||||||
test.beforeEach(async ({ page }) => { | ||||||
await page.goto(`/${ROOT_SRC}?page=resources`); | ||||||
}); | ||||||
|
||||||
test("Should navigate to default page", async ({ page }) => { | ||||||
const guideButton = await page.getByRole("button", { | ||||||
name: "Guide", | ||||||
}); | ||||||
await guideButton.click(); | ||||||
const h1 = await page.getByRole("heading", { name: "Resources" }); | ||||||
await expect(h1).toBeVisible(); | ||||||
}); | ||||||
|
||||||
test("Should navigate to Working with VM page", async ({ page }) => { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's wrap page headers inside '' to differentiate it |
||||||
const workingWithVMButton = await page.getByRole("button", { | ||||||
name: "Working with VM", | ||||||
}); | ||||||
await workingWithVMButton.click(); | ||||||
const h1 = await page.getByRole("heading", { name: "Working with the VM" }); | ||||||
await expect(h1).toBeVisible(); | ||||||
}); | ||||||
|
||||||
test("Should navigate to Getting Started page", async ({ page }) => { | ||||||
const gettingStartedButton = await page.getByRole("button", { | ||||||
name: "Getting Started", | ||||||
}); | ||||||
await gettingStartedButton.click(); | ||||||
const gettingStartedLink = await page.getByRole("link", { | ||||||
name: "Getting Started", | ||||||
}); | ||||||
await gettingStartedLink.click(); | ||||||
const h1 = await page.getByRole("heading", { name: "bos-workspace" }); | ||||||
await expect(h1).toBeVisible(); | ||||||
}); | ||||||
|
||||||
test("Should navigate to Migration Guide page", async ({ page }) => { | ||||||
const gettingStartedButton = await page.getByRole("button", { | ||||||
name: "Getting Started", | ||||||
}); | ||||||
await gettingStartedButton.click(); | ||||||
const migrationGuideLink = await page.getByRole("link", { | ||||||
name: "Migration Guide", | ||||||
}); | ||||||
await migrationGuideLink.click(); | ||||||
const h1 = await page.getByRole("heading", { name: "Migration Guide" }); | ||||||
await expect(h1).toBeVisible(); | ||||||
}); | ||||||
|
||||||
test("Should navigate to Installation page", async ({ page }) => { | ||||||
const gettingStartedButton = await page.getByRole("button", { | ||||||
name: "Getting Started", | ||||||
}); | ||||||
await gettingStartedButton.click(); | ||||||
const installationLink = await page.getByRole("link", { | ||||||
name: "Installation", | ||||||
}); | ||||||
await installationLink.click(); | ||||||
const h1 = await page.getByRole("heading", { name: "Installation 🏗️" }); | ||||||
await expect(h1).toBeVisible(); | ||||||
}); | ||||||
|
||||||
test("Should navigate to Usage page", async ({ page }) => { | ||||||
const usageButton = await page.getByRole("button", { | ||||||
name: "Usage", | ||||||
}); | ||||||
await usageButton.click(); | ||||||
const usageLink = await page.getByRole("link", { | ||||||
name: "Usage", | ||||||
}); | ||||||
await usageLink.click(); | ||||||
const h1 = await page.getByRole("heading", { name: "Usage 👷🏽♀️" }); | ||||||
await expect(h1).toBeVisible(); | ||||||
}); | ||||||
|
||||||
test("Should navigate to Aliases page", async ({ page }) => { | ||||||
const usageButton = await page.getByRole("button", { | ||||||
name: "Usage", | ||||||
}); | ||||||
await usageButton.click(); | ||||||
const aliasesLink = await page.getByRole("link", { | ||||||
name: "Aliases", | ||||||
}); | ||||||
await aliasesLink.click(); | ||||||
const h1 = await page.getByRole("heading", { name: "aliases" }); | ||||||
await expect(h1).toBeVisible(); | ||||||
}); | ||||||
|
||||||
test("Should navigate to Deploying Widgets page", async ({ page }) => { | ||||||
const deployingWidgetsButton = await page.getByRole("button", { | ||||||
name: "Deploying Widgets", | ||||||
}); | ||||||
await deployingWidgetsButton.click(); | ||||||
const h1 = await page.getByRole("heading", { name: "Deployment" }); | ||||||
await expect(h1).toBeVisible(); | ||||||
}); | ||||||
|
||||||
test("Should navigate to Web 4.0 Deployment page", async ({ page }) => { | ||||||
const web4Button = await page.getByRole("button", { | ||||||
name: "Web 4.0 Deployment", | ||||||
}); | ||||||
await web4Button.click(); | ||||||
const h1 = await page.getByRole("heading", { name: "deploy to web4" }); | ||||||
await expect(h1).toBeVisible(); | ||||||
}); | ||||||
|
||||||
test("Should navigate to adding new resources page", async ({ page }) => { | ||||||
const newResourcesButton = await page.getByRole("button", { | ||||||
name: "Adding New Resources", | ||||||
}); | ||||||
await newResourcesButton.click(); | ||||||
const h1 = await page.getByRole("heading", { | ||||||
name: "Adding new Resources", | ||||||
}); | ||||||
await expect(h1).toBeVisible(); | ||||||
}); | ||||||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's rename it everywhere else, h1 doesn't really make sense