Skip to content

Commit

Permalink
chore: Remove redundant motion disabled parameters (#1772)
Browse files Browse the repository at this point in the history
  • Loading branch information
just-boris authored Dec 4, 2023
1 parent 73f735c commit 4f679f9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/__integ__/themes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ describe('CSS Custom Properties', () => {
['light', `#light/?visualRefresh=false`],
['dark', '#dark/?visualRefresh=false'],
['compact', '#light/?visualRefresh=false&density=compact'],
// use motionDisabled to force design tokens into expected values
['reduced-motion', '#light/?visualRefresh=false&motionDisabled=true'],
['visual-refresh', '#light/?visualRefresh=true'],
['visual-refresh-dark', '#dark/?visualRefresh=true'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function setupTest(viewportWidth: number, testFn: (page: AppLayoutRefreshNotofic
return useBrowser(async browser => {
const page = new AppLayoutRefreshNotoficationsPage(browser);
await page.setWindowSize({ ...viewports.desktop, width: viewportWidth });
await browser.url('#/light/app-layout/refresh-content-width/?visualRefresh=true&motionDisabled=true');
await browser.url('#/light/app-layout/refresh-content-width/?visualRefresh=true');
await page.waitForVisible(wrapper.findContentRegion().toSelector());
await testFn(page);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function setupTest(testFn: (page: AppLayoutRefreshEdgeControlsPage) => Promise<v
return useBrowser(async browser => {
const page = new AppLayoutRefreshEdgeControlsPage(browser);
await page.setWindowSize(viewports.desktop);
await browser.url(`#/light/app-layout/disable-paddings-edge-controls/?visualRefresh=true&motionDisabled=true`);
await browser.url(`#/light/app-layout/disable-paddings-edge-controls/?visualRefresh=true`);
await page.waitForVisible(wrapper.findContentRegion().toSelector());
await testFn(page);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ function setupTest(
const page = new AppLayoutRefreshNotoficationsPage(browser);
await page.setWindowSize(viewport);
await browser.url(
`#/light/app-layout/notifications-refresh/?visualRefresh=true&motionDisabled=true${
removeNotifications ? `&removeNotifications` : ''
}`
`#/light/app-layout/notifications-refresh/?visualRefresh=true${removeNotifications ? `&removeNotifications` : ''}`
);
await page.waitForVisible(wrapper.findContentRegion().toSelector());
await testFn(page);
Expand Down
4 changes: 1 addition & 3 deletions src/tabs/__integ__/tabs-in-help-panel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ const tabsWrapper = createWrapper().findTabs();
const setupTest = (visualRefresh = false, testFn: (page: BasePageObject) => Promise<void>) => {
return useBrowser(async browser => {
const page = new BasePageObject(browser);
await browser.url(
`#/light/tabs/in-app-layout-help-panel/?motionDisabled=true${visualRefresh ? '&visualRefresh=true' : ''}`
);
await browser.url(`#/light/tabs/in-app-layout-help-panel/?${visualRefresh ? 'visualRefresh=true' : ''}`);
await page.waitForVisible(appLayoutWrapper.findContentRegion().toSelector());
await testFn(page);
});
Expand Down
5 changes: 2 additions & 3 deletions src/tabs/__integ__/tabs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ class TabsPage extends BasePageObject {
const setupTest = (testFn: (page: TabsPage) => Promise<void>, smallViewport = false) => {
return useBrowser(async browser => {
const page = new TabsPage(browser);
// TODO: Remove VR flag once AWSUI-18703 is fixed
await browser.url('#/light/tabs/responsive-integ/?motionDisabled=true&visualRefresh=false');
await browser.url('#/light/tabs/responsive-integ');
await page.waitForVisible(wrapper.findTabContent().toSelector());
if (smallViewport) {
await page.setWindowSize({ width: 400, height: 1000 });
Expand Down Expand Up @@ -188,7 +187,7 @@ test(
test(
'adds pagination buttons upon changing the tabs array',
setupTest(async page => {
await page.setWindowSize({ width: 700, height: 1000 });
await page.setWindowSize({ width: 800, height: 1000 });
await page.hasPaginationButtons(false);
await page.click('#add-tab');
await page.hasPaginationButtons(true);
Expand Down

0 comments on commit 4f679f9

Please sign in to comment.