-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: styles of initialization errors
- Loading branch information
Showing
12 changed files
with
66 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import 'normalize.css'; | ||
import Vue from 'vue'; | ||
import './lib/setGlobalPolyfills'; | ||
import store from './store'; | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+14 KB
tests/e2e/specs/__image_snapshots__/Load error fails to load state desktop #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12 KB
tests/e2e/specs/__image_snapshots__/Load error fails to load state mobile #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14 KB
tests/e2e/specs/__image_snapshots__/Load error load error desktop #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.3 KB
tests/e2e/specs/__image_snapshots__/Load error load error mobile #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
function ensureThrownError(message) { | ||
cy.wrap(new Promise((resolve) => { | ||
cy.on('uncaught:exception', (err) => { | ||
expect(err.message).to.include(message); | ||
resolve(); | ||
return false; | ||
}); | ||
})); | ||
} | ||
|
||
describe('Load error', () => { | ||
[false, true].forEach((isDesktop) => { | ||
it(`load error ${isDesktop ? 'desktop' : 'mobile'}`, () => { | ||
if (!isDesktop) cy.viewport('iphone-se2'); | ||
cy.visit('/', { | ||
isDesktop, | ||
onBeforeLoad(contentWindow) { | ||
contentWindow.Array = {}; // eslint-disable-line no-param-reassign | ||
}, | ||
}); | ||
ensureThrownError('Array.isArray is not a function'); | ||
cy.matchImage(); | ||
}); | ||
}); | ||
|
||
[false, true].forEach((isDesktop) => { | ||
it(`fails to load state ${isDesktop ? 'desktop' : 'mobile'}`, () => { | ||
if (!isDesktop) cy.viewport('iphone-se2'); | ||
cy.visit('/', { | ||
isDesktop, | ||
onBeforeLoad(contentWindow) { | ||
contentWindow.localStorage.setItem('vuex', '!'); | ||
}, | ||
}); | ||
ensureThrownError('Unexpected token \'!\', "!" is not valid JSON'); | ||
const button = cy.get('.ae-button').should('be.visible'); | ||
cy.matchImage(); | ||
button.click(); | ||
cy.get('.note').should('be.visible'); // reloaded to desktop | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters