Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testsuite/playwright-ui: make existing tests to pass
Updated test files to pass with existing tests. Branded test requires signup config to be copied to local folder. Issue: #6598 Change-Id: If1d9617d4cc2a8dd1862f843c792f5b5b219ec2e
- Loading branch information
1 parent
00608ec
commit 445cd8d
Showing
20 changed files
with
175 additions
and
102 deletions.
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
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
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
7 changes: 7 additions & 0 deletions
7
testsuite/playwright-ui/pageFactory/objectRepository/CommonObjects.ts
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,7 @@ | ||
// Copyright (C) 2023 Storj Labs, Inc. | ||
// See LICENSE for copying information. | ||
|
||
export class CommonObjects { | ||
static CLOSE_MODAL_BUTTON_XPATH = `.mask__wrapper__container__close`; | ||
static LOADER_XPATH = `//div[contains(@class, 'loader')]`; | ||
} |
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
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
23 changes: 23 additions & 0 deletions
23
testsuite/playwright-ui/pageFactory/pageRepository/Common.ts
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,23 @@ | ||
// Copyright (C) 2023 Storj Labs, Inc. | ||
// See LICENSE for copying information. | ||
|
||
import { expect, Page } from '@playwright/test'; | ||
import { CommonObjects } from '@objects/CommonObjects'; | ||
import { testConfig } from '../../testConfig'; | ||
|
||
export class Common { | ||
constructor(readonly page: Page) {} | ||
|
||
async goToAllProjects(): Promise<void> { | ||
await this.page.goto(`${testConfig.host}${testConfig.port}/all-projects`); | ||
} | ||
|
||
async closeModal(): Promise<void> { | ||
await this.page.locator(CommonObjects.CLOSE_MODAL_BUTTON_XPATH).click(); | ||
} | ||
|
||
async waitLoading(): Promise<void> { | ||
const loader = this.page.locator(CommonObjects.LOADER_XPATH); | ||
await expect(loader).toBeHidden(); | ||
} | ||
} |
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
Oops, something went wrong.