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

Add Screener test for Chat for V2 themes #18946

Merged
merged 2 commits into from
Jul 15, 2021
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const selectors = {
};

const config: ScreenerTestsConfig = {
themes: ['teams', 'teamsDark', 'teamsHighContrast'],
themes: ['teams', 'teamsDark', 'teamsHighContrast', 'teamsV2', 'teamsDarkV2'],
steps: [
builder => builder.hover(selectors.message).snapshot('Hovers the first message'),
builder => builder.click(selectors.message).snapshot('Focus the first message via mouse click'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const selectors = {
};

const config: ScreenerTestsConfig = {
themes: ['teams', 'teamsDark', 'teamsHighContrast'],
themes: ['teams', 'teamsDark', 'teamsHighContrast', 'teamsV2', 'teamsDarkV2'],
steps: [
builder => builder.click(selectors.reaction).snapshot('Clicks the first reaction'),
(builder, keys) => builder.keys(selectors.reaction, keys.tab).snapshot('Set focus on the second reaction'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const selectors = {
};

const config: ScreenerTestsConfig = {
themes: ['teams', 'teamsDark', 'teamsHighContrast'],
themes: ['teams', 'teamsDark', 'teamsHighContrast', 'teamsV2', 'teamsDarkV2'],
steps: [
(builder, keys) => builder.keys('body', keys.tab).snapshot('Focuses last message'),
(builder, keys) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import { ScreenerTestsConfig } from '@fluentui/scripts/screener';
import { chatMessageClassName } from '@fluentui/react-northstar';

const config: ScreenerTestsConfig = { themes: ['teams', 'teamsDark', 'teamsHighContrast'] };
const selectors = {
message: `.${chatMessageClassName}`,
};

const config: ScreenerTestsConfig = {
themes: ['teams', 'teamsDark', 'teamsHighContrast', 'teamsV2', 'teamsDarkV2'],
steps: [builder => builder.hover(selectors.message).snapshot('Mouse hover on first message')],
};

export default config;
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ScreenerTestsConfig } from '@fluentui/scripts/screener';

const config: ScreenerTestsConfig = { themes: ['teams', 'teamsDark', 'teamsHighContrast'] };
const config: ScreenerTestsConfig = {
themes: ['teams', 'teamsDark', 'teamsHighContrast', 'teamsV2', 'teamsDarkV2'],
};

export default config;
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ScreenerTestsConfig } from '@fluentui/scripts/screener';

const config: ScreenerTestsConfig = { themes: ['teams', 'teamsDark', 'teamsHighContrast'] };
const config: ScreenerTestsConfig = {
themes: ['teams', 'teamsDark', 'teamsHighContrast', 'teamsV2', 'teamsDarkV2'],
};

export default config;
2 changes: 1 addition & 1 deletion scripts/screener/screener.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export interface ScreenerStepBuilder {
}

/** Keys of `themes` object exported from `@fluentui/react-northstar/src/index`. */
export type ScreenerThemeName = 'teams' | 'teamsDark' | 'teamsHighContrast';
export type ScreenerThemeName = 'teams' | 'teamsDark' | 'teamsHighContrast' | 'teamsV2' | 'teamsDarkV2';

export type ScreenerStep = (steps: ScreenerStepBuilder, keys: ScreenerRunnerKeys) => ScreenerStepBuilder;
export type ScreenerSteps = ScreenerStep[];
Expand Down