Skip to content

Commit

Permalink
Merge pull request #461 from plotly/assets-snapshots
Browse files Browse the repository at this point in the history
Add assets css to percy snapshots
  • Loading branch information
T4rk1n authored Nov 19, 2018
2 parents f590166 + 2ef4c6b commit dcd0f41
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/IntegrationTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def setUpClass(cls):
cls.driver = webdriver.Chrome()

loader = percy.ResourceLoader(
webdriver=cls.driver
webdriver=cls.driver,
base_url='/assets',
root_dir='tests/assets'
)
cls.percy_runner = percy.Runner(loader=loader)

Expand Down
1 change: 1 addition & 0 deletions tests/assets/nested_css/nested.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#content {
padding: 8px;
background-color: purple;
}
3 changes: 1 addition & 2 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ def test_index_customization(self):
def test_assets(self):
app = dash.Dash(__name__,
assets_folder='tests/assets',
assets_url_path='/test-assets',
assets_ignore='.*ignored.*')
app.index_string = '''
<!DOCTYPE html>
Expand All @@ -384,7 +383,7 @@ def test_assets(self):
'''

app.layout = html.Div([
html.Div(id='content'),
html.Div('Content', id='content'),
dcc.Input(id='test')
], id='layout')

Expand Down

0 comments on commit dcd0f41

Please sign in to comment.