-
Notifications
You must be signed in to change notification settings - Fork 7
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 default installation test using POMs #17
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { IndexActor } from "../actors/index-actor"; | ||
import { MainPage } from '../pages/main-page'; | ||
import { ProductSelectionOpensusePage } from '../pages/product-selection-opensuse-page'; | ||
import { UsersPage } from '../pages/users-page'; | ||
import { DefineUserPage } from '../pages/define-user-page'; | ||
import { ConfigureRootPasswordPage } from '../pages/configure-root-password-page'; | ||
|
||
const minute = 60 * 1000; | ||
test.describe('The main page', () => { | ||
test.beforeEach(async ({ page }) => { | ||
const productSelectionOpensusePage = new ProductSelectionOpensusePage(page); | ||
const mainPage = new MainPage(page); | ||
const indexActor = new IndexActor(page, mainPage, productSelectionOpensusePage); | ||
indexActor.goto(); | ||
indexActor.handleProductSelectionIfAny(); | ||
}); | ||
|
||
test('Default installation test', async ({ page }) => { | ||
const mainPage = new MainPage(page); | ||
await test.step("set mandatory user and root password", async () => { | ||
|
||
await mainPage.accessUsers(); | ||
|
||
const usersPage = new UsersPage(page); | ||
await usersPage.expectNoUserDefined(); | ||
await usersPage.defineUser(); | ||
const defineUserPage = new DefineUserPage(page); | ||
await defineUserPage.fillUserFullName('Bernhard M. Wiedemann'); | ||
await defineUserPage.fillUserName('bernhard'); | ||
await defineUserPage.fillAndConfirmPassword('nots3cr3t'); | ||
await defineUserPage.confirm(); | ||
await usersPage.expectRootPasswordNotSet(); | ||
await usersPage.configureRootPassword(); | ||
const configureRootPasswordPage = new ConfigureRootPasswordPage(page); | ||
await configureRootPasswordPage.fillAndConfirmPassword('nots3cr3t'); | ||
await configureRootPasswordPage.confirm(); | ||
await usersPage.back(); | ||
}); | ||
|
||
//Installation | ||
await test.step("Run installation", async () => { | ||
test.setTimeout(30 * minute); | ||
// start the installation | ||
await expect(page.getByText("Installation will take")).toBeVisible({ timeout: 2 * minute }); | ||
await mainPage.install(); | ||
await expect(page.getByText("Confirm Installation")).toBeVisible({ timeout: 2 * minute }); | ||
await page.getByRole("button", { name: "Continue" }).click(); | ||
// wait for the package installation progress | ||
await expect(page.getByText("Installing packages")).toBeVisible({ timeout: 8 * minute }); | ||
while (true) { | ||
try { | ||
await page.getByRole("heading", { name: "Congratulations!" }).waitFor({ timeout: minute / 2 }); | ||
break; | ||
} | ||
catch (error) { | ||
// do not ignore other errors | ||
if (error.constructor.name !== "TimeoutError") throw (error); | ||
} | ||
} | ||
}); | ||
}); | ||
}); |
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.
should be default-installation.spec.ts
Connected with the different formats
-
or_
what do you think about https://progress.opensuse.org/issues/134228#note-11? we should have those folders ci/ and e2e/ to distinguish properly, could you file ticket in case you don't plan it here? it will help IMO.