Skip to content

Commit

Permalink
Merge branch 'main' into quickfix
Browse files Browse the repository at this point in the history
  • Loading branch information
auniverseaway authored May 19, 2023
2 parents 585faf0 + 5a79116 commit 57b5307
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
9 changes: 9 additions & 0 deletions libs/blocks/footer/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ footer a:not(:any-link) {
margin-right: 18px;
}

[dir="rtl"] .footer-social-icon:not(:first-of-type) {
margin-right: 18px;
}

footer .footer-social a {
display: block;
height: 20px;
Expand Down Expand Up @@ -327,6 +331,11 @@ footer .footer-region-button.inline-dialog-active svg.icon-chevron-down {
margin-right: 3px;
}

[dir="rtl"] .footer-privacy-link img {
margin-right: 0;
margin-left: 3px;
}

.footer-privacy-link:not(:last-child)::after {
content: '/';
margin-left: 6px;
Expand Down
6 changes: 4 additions & 2 deletions test/blocks/reading-time/reading-time.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ describe('reading-time estimate', () => {
});

describe('inline variant', async () => {
document.body.innerHTML = await readFile({ path: './mocks/inline.html' });
beforeEach(async () => {
document.body.innerHTML = await readFile({ path: './mocks/inline.html' });
});

it("Inline variant (with inline siblings) creates an inline-wrapper element", async () => {
it('Inline variant (with inline siblings) creates an inline-wrapper element', async () => {
const section = document.querySelector('.section.inline-has-siblings');
const els = section.querySelectorAll('.reading-time.inline');
els.forEach(async (el) => {
Expand Down
11 changes: 1 addition & 10 deletions test/blocks/tabs/tabs.test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import { readFile, sendMouse, sendKeys } from '@web/test-runner-commands';
import { expect } from '@esm-bundle/chai';

function getMiddleOfElement(element) {
const { x, y, width, height } = element.getBoundingClientRect();
return {
x: Math.floor(x + window.pageXOffset + width / 2),
y: Math.floor(y + window.pageYOffset + height / 2),
};
}

document.body.innerHTML = await readFile({ path: './mocks/body.html' });
const { default: init } = await import('../../../libs/blocks/tabs/tabs.js');

Expand All @@ -26,8 +18,7 @@ describe('tabs', () => {

it('clicks on a tabList button', async () => {
const unSelectedBtn = allTabs[0].querySelector('div[role="tablist"] button[aria-selected="false"]');
const { x, y } = getMiddleOfElement(unSelectedBtn);
await sendMouse({ type: 'click', position: [x, y] });
unSelectedBtn.click();
expect(unSelectedBtn.ariaSelected).to.equal('true');
});

Expand Down
18 changes: 18 additions & 0 deletions web-test-runner.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import { importMapsPlugin } from '@web/dev-server-import-maps';
import { defaultReporter } from '@web/test-runner';

function customReporter() {
return {
async reportTestFileResults({ logger, sessionsForTestFile }) {
sessionsForTestFile.forEach((session) => {
session.testResults.tests.forEach((test) => {
if (!test.passed && !test.skipped) {
logger.log(test);
}
});
});
},
};
}
export default {
coverageConfig: {
include: [
Expand All @@ -21,4 +35,8 @@ export default {
],
},
plugins: [importMapsPlugin({})],
reporters: [
defaultReporter({ reportTestResults: true, reportTestProgress: true }),
customReporter(),
],
};

0 comments on commit 57b5307

Please sign in to comment.