Skip to content
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

Map - unskip demos tests #28533

Open
wants to merge 8 commits into
base: 24_2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions apps/demos/testing/common.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const getTestSpecificSkipRules = (testName) => {
return ['empty-table-header'];
case 'Localization-UsingGlobalize':
return ['label'];
case 'Map-Markers':
case 'Map-Routes':
return ['aria-hidden-focus', 'image-redundant-alt'];
default:
return [];
}
Expand Down Expand Up @@ -297,9 +300,10 @@ const SKIPPED_TESTS = {
'Scheduler',
'PivotGrid',
];
const BROKEN_THIRD_PARTY_SCRIPTS_COMPONENT = [
'Map',
];

const EXPECTED_CONSOLE_MESSAGES = {
Map: ['TypeError: Failed to fetch'],
};

getDemoPaths(approach).forEach((demoPath, index) => {
if (!shouldRunTestAtIndex(index + 1) || !existsSync(demoPath)) { return; }
Expand Down Expand Up @@ -328,9 +332,6 @@ const SKIPPED_TESTS = {
if (process.env.STRATEGY === 'accessibility' && ACCESSIBILITY_UNSUPPORTED_COMPONENTS.indexOf(widgetName) > -1) {
return;
}
if (BROKEN_THIRD_PARTY_SCRIPTS_COMPONENT.indexOf(widgetName) > -1) {
return;
}
if (process.env.CI_ENV && process.env.DISABLE_DEMO_TEST_SETTINGS !== 'ignore') {
if (mergedTestSettings.ignore) { return; }
}
Expand Down Expand Up @@ -389,7 +390,13 @@ const SKIPPED_TESTS = {
const consoleMessages = await t.getBrowserConsoleMessages();

const errors = [...consoleMessages.error, ...consoleMessages.warn]
.filter((e) => !knownWarnings.some((kw) => e.startsWith(kw)));
.filter((e) => {
const isKnownWarning = knownWarnings.some((kw) => e.startsWith(kw));
const isExpectedConsoleMessage = EXPECTED_CONSOLE_MESSAGES[widgetName]
&& EXPECTED_CONSOLE_MESSAGES[widgetName].some((cm) => e.startsWith(cm));

return !isKnownWarning && !isExpectedConsoleMessage;
});

await t.expect(errors).eql([]);

Expand Down
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.
Binary file modified apps/demos/testing/etalons/Map-ProvidersAndTypes.png
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.
Binary file modified apps/demos/testing/etalons/Map-Routes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading