Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Sep 28, 2024
1 parent 05aacd7 commit 4d01a31
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Use Case
* Run Greenwood and correctly prerender "HTML" Web Components.
* https://blog.jim-nielsen.com/2023/html-web-components/
*
* User Result
* Should generate a static Greenwood build with the expected prerender "HTML" Web Components content.
Expand All @@ -21,8 +22,6 @@
* index.html
*/
import chai from 'chai';
import fs from 'fs';
import glob from 'glob-promise';
import { JSDOM } from 'jsdom';
import path from 'path';
import { runSmokeTest } from '../../../../../test/smoke-test.js';
Expand Down Expand Up @@ -65,21 +64,21 @@ describe('Build Greenwood With: ', function() {
it('should not have any <template> tags within the document', function() {
expect(dom.window.document.querySelectorAll('template').length).to.equal(0);
});

it('should only have one <app-picture-frame> tag', function() {
expect(pictureFrame.length).to.equal(1);
});

it('should have the expected title attribute content in the heading of HTML', () => {
const heading = pictureFrame[0].querySelectorAll('.picture-frame .heading');

expect(heading.length).to.equal(1);
expect(heading[0].textContent).to.equal('Greenwood');
});

it('should have the expected image from userland in the HTML', () => {
const img = pictureFrame[0].querySelectorAll('.picture-frame img');

expect(img.length).to.equal(1);
expect(img[0].getAttribute('alt')).to.equal('Greenwood logo');
expect(img[0].getAttribute('src')).to.equal('/assets/greenwood.png');
Expand All @@ -90,5 +89,4 @@ describe('Build Greenwood With: ', function() {
after(function() {
runner.teardown(getOutputTeardownFiles(outputPath));
});

});

0 comments on commit 4d01a31

Please sign in to comment.