Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
radium-v committed Jan 6, 2025
1 parent 4777a67 commit fe11384
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
24 changes: 12 additions & 12 deletions packages/web-components/src/menu/menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test.describe('Menu', () => {
const element = page.locator('fluent-menu');
const menuList = element.locator('fluent-menu-list');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger">Toggle Menu</fluent-menu-button>
<fluent-menu-list>
Expand All @@ -40,7 +40,7 @@ test.describe('Menu', () => {
const menuButton = element.locator('fluent-menu-button');
const menuList = element.locator('fluent-menu-list');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger">Toggle Menu</fluent-menu-button>
<fluent-menu-list>
Expand All @@ -62,7 +62,7 @@ test.describe('Menu', () => {
const menuButton = element.locator('fluent-menu-button');
const menuList = element.locator('fluent-menu-list');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger">Toggle Menu</fluent-menu-button>
<fluent-menu-list>
Expand All @@ -89,7 +89,7 @@ test.describe('Menu', () => {
const menuList = element.locator('fluent-menu-list');
const menuItems = menuList.locator('fluent-menu-item');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger">Toggle Menu</fluent-menu-button>
<fluent-menu-list>
Expand All @@ -116,7 +116,7 @@ test.describe('Menu', () => {
const menuList = element.locator('fluent-menu-list');
const menuItems = menuList.locator('fluent-menu-item');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger">Toggle Menu</fluent-menu-button>
<fluent-menu-list>
Expand Down Expand Up @@ -144,7 +144,7 @@ test.describe('Menu', () => {
const menuButton = element.locator('fluent-menu-button');
const menuList = element.locator('fluent-menu-list');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger">Toggle Menu</fluent-menu-button>
<fluent-menu-list>
Expand All @@ -170,7 +170,7 @@ test.describe('Menu', () => {
const menuButton = element.locator('fluent-menu-button');
const menuList = element.locator('fluent-menu-list');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger">Toggle Menu</fluent-menu-button>
<fluent-menu-list>
Expand All @@ -197,7 +197,7 @@ test.describe('Menu', () => {
const menuList = element.locator('fluent-menu-list');
const menuItems = menuList.locator('fluent-menu-item');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger">Toggle Menu</fluent-menu-button>
<fluent-menu-list>
Expand Down Expand Up @@ -225,7 +225,7 @@ test.describe('Menu', () => {
const menuButton = element.locator('fluent-menu-button');
const menuList = element.locator('fluent-menu-list');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger">Toggle Menu</fluent-menu-button>
<fluent-menu-list>
Expand Down Expand Up @@ -261,7 +261,7 @@ test.describe('Menu', () => {
const menuButton = element.locator('fluent-menu-button');
const menuList = element.locator('fluent-menu-list');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger">Toggle Menu</fluent-menu-button>
<fluent-menu-list>
Expand Down Expand Up @@ -296,7 +296,7 @@ test.describe('Menu', () => {
const menuList = element.locator('fluent-menu-list');
const menuItems = menuList.locator('fluent-menu-item');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger">Toggle Menu</fluent-menu-button>
<fluent-menu-list>
Expand Down Expand Up @@ -348,7 +348,7 @@ test.describe('Menu', () => {
const element = page.locator('fluent-menu');
const menuButton = element.locator('fluent-menu-button');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-menu>
<fluent-menu-button appearance="primary" slot="trigger" icon-only></fluent-menu-button>
<fluent-button appearance="primary" slot="primary-action">Primary Action</fluent-menu-button>
Expand Down
28 changes: 14 additions & 14 deletions packages/web-components/src/tablist/tablist.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test.describe('Tablist', () => {
const element = page.locator('fluent-tablist');
const tabs = element.locator('fluent-tab');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand All @@ -37,7 +37,7 @@ test.describe('Tablist', () => {
const tabs = element.locator('fluent-tab');
const tab = tabs.nth(2);

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand All @@ -55,7 +55,7 @@ test.describe('Tablist', () => {
test('should have reflect disabled attribute on control', async ({ page }) => {
const element = page.locator('fluent-tablist');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand All @@ -75,7 +75,7 @@ test.describe('Tablist', () => {
test('should have role of `tablist`', async ({ page }) => {
const element = page.locator('fluent-tablist');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand All @@ -91,7 +91,7 @@ test.describe('Tablist', () => {
}) => {
const element = page.locator('fluent-tablist');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand All @@ -106,7 +106,7 @@ test.describe('Tablist', () => {
const element = page.locator('fluent-tablist');
const tabs = element.locator('fluent-tab');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand Down Expand Up @@ -134,7 +134,7 @@ test.describe('Tablist', () => {
const element = page.locator('fluent-tablist');
const tabs = element.locator('fluent-tab');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand Down Expand Up @@ -162,7 +162,7 @@ test.describe('Tablist', () => {
const element = page.locator('fluent-tablist');
const tabs = element.locator('fluent-tab');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand All @@ -181,7 +181,7 @@ test.describe('Tablist', () => {
const element = page.locator('fluent-tablist');
const tabs = element.locator('fluent-tab');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand All @@ -204,7 +204,7 @@ test.describe('Tablist', () => {
const element = page.locator('fluent-tablist');
const tabs = element.locator('fluent-tab');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand All @@ -230,7 +230,7 @@ test.describe('Tablist', () => {
test(`should set appearance to \`${appearance}\``, async ({ page }) => {
const element = page.locator('fluent-tablist');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist appearance="${appearance}">
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand All @@ -248,7 +248,7 @@ test.describe('Tablist', () => {
test(`should set size to \`${size}\``, async ({ page }) => {
const element = page.locator('fluent-tablist');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist size="${size}">
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand Down Expand Up @@ -349,7 +349,7 @@ test.describe('Tablist', () => {
const element = page.locator('fluent-tablist');
const tabs = element.locator('fluent-tab');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab hidden>Tab two</fluent-tab>
Expand Down Expand Up @@ -377,7 +377,7 @@ test.describe('Tablist', () => {
const element = page.locator('fluent-tablist');
const tabs = element.locator('fluent-tab');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tablist>
<fluent-tab>Tab one</fluent-tab>
<fluent-tab>Tab two</fluent-tab>
Expand Down
4 changes: 2 additions & 2 deletions packages/web-components/src/tabs/tabs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ test.describe('Tabs', () => {
test(`should set appearance to \`${appearance}\``, async ({ page }) => {
const element = page.locator('fluent-tabs');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tabs appearance="${appearance}"></fluent-tabs>
`);

Expand All @@ -400,7 +400,7 @@ test.describe('Tabs', () => {
test(`should set size to \`${size}\``, async ({ page }) => {
const element = page.locator('fluent-tabs');

page.setContent(/* html */ `
await page.setContent(/* html */ `
<fluent-tabs size="${size}"></fluent-tabs>
`);

Expand Down

0 comments on commit fe11384

Please sign in to comment.