Any way to integrate a living styleguide for only testing / presenting css classes?
See original GitHub issueI’m trying to documentate what kind of buttons my ui framework has This is what I tried (altough I guessed this won’t do)
import { Component } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
describe('ButtonTestHost', () => {
let component: ButtonTestHost;
let fixture: ComponentFixture<ButtonTestHost>;
beforeEach(async(() => {
/**
* @uijar ButtonTestHost
* @hostcomponent ButtonTestHost
*/
let moduleDefinition = {
declarations: [ButtonTestHost]
};
TestBed.configureTestingModule(moduleDefinition).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ButtonTestHost);
component = fixture.componentInstance;
fixture.detectChanges();
});
/** @uijarexample */
it('should be displayed', () => {
// ...
});
});
/**
* @group CSS
* @component Buttons
* @description
*/
@Component({
selector: 'button-test-host',
template: `<button class="button-primary">Button label</button> <button class="button-primary-alt">Button label</button><br>
<button class="button-secondary">Button label</button> <button class="button-secondary-alt">Button label</button><br>
<button class="button-green">Button label</button> <button class="button-green-alt">Button label</button><br>
<button class="button-yellow">Button label</button> <button class="button-yellow-alt">Button label</button><br>
<button class="button-red">Button label</button> <button class="button-red-alt">Button label</button><br>`
})
export class ButtonTestHost {
}
I tried to documentate the buttons with a buttons.spec.ts
inside my styles
directory.
What I am getting is:
Generating resources...
Could not find any reference to "ButtonTestHost".
Verify that "@uijar ButtonTestHost" or "@hostcomponent ButtonTestHost" is using correct component reference name.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Creating A Living Style Guide: A Case Study
Living style guides are an important tool for web development today, especially in large, complex web applications.
Read more >How to Develop a Living Style Guide | Fabian Keller
Living style guides are a very powerful tool to write clean SCSS code. They simplify the design and implementation of reusable components.
Read more >CSS Testing: The Definitive Guide - Testim.io
Demystifying the ever-changing world of CSS testing with a high-level view of the types, challenges, and benefits of CSS testing.
Read more >How To Create a Complete Web Design Style Guide + Template
These will define how your pages are structured. To get started, you can create some basic templates for your main layouts.
Read more >Creating Style Guides - A List Apart
To me, a style guide is a living document of code, which details all the various elements and coded modules of your site...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I created a new issue #7 regarding the templateUrl.
Thanks, I’m closing this since it’s solved.