Skip to content

Commit

Permalink
update baseline snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush2303 committed Feb 6, 2025
1 parent ea65adb commit 3a1d053
Show file tree
Hide file tree
Showing 1,491 changed files with 1,251 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/plotlyTestCoverage.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: "Plotly Test coverage"
on:
schedule:
- cron: "0 */8 * * *"
- cron: "30 8 * * *" # Runs every day at 2:00 PM IST (08:30 AM UTC)
workflow_dispatch:
inputs:
repo:
repo:s
description: "Repo to run the tests on"
required: true
default: "microsoft/fluentui"
Expand Down
1,213 changes: 1,211 additions & 2 deletions apps/plotly_examples/test-results/.last-run.json

Large diffs are not rendered by default.

78 changes: 38 additions & 40 deletions apps/plotly_examples/tests/DeclarativeChart.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,44 @@ const chartsListWithErrors = [];
var totalChartExamplesCount = 302;
const themes = ["Light", "Dark"];
const modes = ["LTR", "RTL"];
test.beforeEach(async ({ page }) => {
//Pass base URL as part of playwright command
//ex: npx cross-env BASE_URL='https://fluentchartstest-stage.azurewebsites.net/' npx playwright test
await page.goto(process.env.BASE_URL!);
});

for (const theme of themes){
for(const mode of modes){
test.describe(`Declarative chart examples in ${theme} mode and ${mode} layout`, () => {
test.beforeEach( async ({ page }) => {
//Pass base URL as part of playwright command
//ex: npx cross-env BASE_URL='https://fluentchartstest-stage.azurewebsites.net/' npx playwright test
await page.goto(process.env.BASE_URL);
});

for (let index = 0; index < totalChartExamplesCount; index++) {
test(`Declarative chart example ${ index + 1 }`, async ({ page }) => {
const iframe = page.locator('#webpack-dev-server-client-overlay');
if (await iframe.count() > 0) {
await iframe.evaluate((el) => el.remove()).catch(() => {
console.warn("Failed to remove overlay iframe.");
});
}
await page.getByRole('combobox').first().click();
const listbox = page.getByRole('listbox');
await listbox.getByRole('option').locator(`text=${theme}`).click();
const rtlSwitch = page.getByRole('switch');
const isCurrentlyRTL = await rtlSwitch.isChecked();
if((mode === 'RTL' && !isCurrentlyRTL) || (mode === 'LTR' && isCurrentlyRTL)){
await rtlSwitch.click();
for (const theme of themes) {
for (const mode of modes) {
//test.describe(`Declarative chart examples in ${theme} mode and ${mode} layout`, () => {
for (let index = 0; index < totalChartExamplesCount; index++) {
test(`Declarative chart example ${index + 1}-${theme}-${mode} mode` , async ({ page }) => {
const iframe = page.locator('#webpack-dev-server-client-overlay');
if (await iframe.count() > 0) {
await iframe.evaluate((el) => el.remove()).catch(() => {
console.warn("Failed to remove overlay iframe.");
});
}
await page.getByRole('combobox').first().click();
const listbox = page.getByRole('listbox');
await listbox.getByRole('option').locator(`text=${theme}`).click();
const rtlSwitch = page.getByRole('switch');
const isCurrentlyRTL = await rtlSwitch.isChecked();
if ((mode === 'RTL' && !isCurrentlyRTL) || (mode === 'LTR' && isCurrentlyRTL)) {
await rtlSwitch.click();
}
const combobox = page.getByRole('combobox');
await combobox.nth(1).click();
const listitems = listbox.last().getByRole('option');
if (!chartsListWithErrors.includes(index)) {
await listitems.nth(index).scrollIntoViewIfNeeded();
await listitems.nth(index).click();
const chart = page.getByTestId('chart-container');
await expect(chart).toHaveScreenshot();
await combobox.last().click();
} else {
test.fail();
}
});
};
}
const combobox = page.getByRole('combobox');
await combobox.nth(1).click();
const listitems = listbox.last().getByRole('option');
if (!chartsListWithErrors.includes(index)) {
await listitems.nth(index).scrollIntoViewIfNeeded();
await listitems.nth(index).click();
const chart = page.getByTestId('chart-container');
await expect(chart).toHaveScreenshot();
await combobox.last().click();
} else {
test.fail();
}
});
};
});
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3a1d053

Please sign in to comment.