forked from NASA-IMPACT/veda-config
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial round of new tests * add more tests and improve test descriptions * reenable github action and extend timeout for server start
- Loading branch information
1 parent
2cdf3c4
commit 6f7e6d9
Showing
36 changed files
with
607 additions
and
128 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
import { Locator, Page } from '@playwright/test'; | ||
import { Locator, Page, test } from '@playwright/test'; | ||
|
||
export default class AboutPage { | ||
readonly page: Page; | ||
readonly mainContent: Locator; | ||
readonly aboutParagraph: Locator; | ||
readonly partnersSection: Locator; | ||
readonly partnerLink: Locator; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
this.mainContent = this.page.getByRole('main'); | ||
this.aboutParagraph = this.page.getByText("The U.S. Greenhouse Gas Center (US GHG Center) is a multi-agency effort"); | ||
this.partnersSection = this.page.locator('div').filter({has: this.page.getByRole('heading', { level: 2, name: /Our Partners/i })}); | ||
this.partnerLink = this.partnersSection.getByRole('link').filter({has: this.page.locator('img')}); | ||
} | ||
} | ||
|
||
async getAllPartnerLinks() { | ||
return await test.step('get all partner links', async() => { | ||
return this.partnerLink.all(); | ||
}) | ||
} | ||
|
||
async getPartnerName(partner: Locator) { | ||
console.log(`looking at ${partner}`) | ||
const partnerText = await test.step('getting text name for partner', async() => { | ||
// await partner.scrollIntoViewIfNeeded(); | ||
const partnerText = await partner.innerText(); | ||
console.log(`found ${partnerText}`) | ||
return partnerText | ||
}) | ||
console.log(`found ${partnerText} here`) | ||
return partnerText | ||
} | ||
} |
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 |
---|---|---|
|
@@ -56,4 +56,4 @@ export default class AnalysisPage { | |
this.datasetCheckbox.nth(index).click(); | ||
}) | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -10,4 +10,4 @@ export default class AnalysisResultsPage { | |
this.analysisCards = this.page.getByRole('article'); | ||
} | ||
|
||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Locator, Page } from '@playwright/test'; | ||
|
||
export default class ContactModal { | ||
readonly page: Page; | ||
readonly header: Locator; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
this.header = this.page.getByRole("heading", {level: 1, name: /contact us/i }) | ||
} | ||
} |
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,14 @@ | ||
import { Locator, Page } from '@playwright/test'; | ||
|
||
export default class DataToolkitPage { | ||
readonly page: Page; | ||
readonly mainContent: Locator; | ||
readonly header: Locator; | ||
|
||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
this.mainContent = this.page.getByRole('main'); | ||
this.header = this.mainContent.getByRole('heading', {level: 1, name: /accessing and exploring data/i }) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ export default class DisclaimerComponent { | |
await this.acceptButton.click(); | ||
}) | ||
} | ||
} | ||
} |
Oops, something went wrong.