Merge branch 'next' into build/upgrade-circleci-docker

This commit is contained in:
Michael Shilman 2022-03-31 22:16:05 +08:00
commit 473aba53d8
11 changed files with 39 additions and 23 deletions

View File

@ -77,6 +77,7 @@
"fast-deep-equal": "^3.1.3",
"global": "^4.4.0",
"lodash": "^4.17.21",
"regenerator-runtime": "^0.13.7",
"remark-external-links": "^8.0.0",
"remark-slug": "^6.0.0",
"ts-dedent": "^2.0.0",

View File

@ -80,7 +80,7 @@
"ts-loader": "^8.0.14",
"tsconfig-paths-webpack-plugin": "^3.3.0",
"util-deprecate": "^1.0.2",
"webpack": "4"
"webpack": ">=4.0.0 <6.0.0"
},
"devDependencies": {
"@angular-devkit/architect": "~0.1102.0",
@ -101,7 +101,8 @@
"jest": "^26.6.3",
"jest-preset-angular": "^8.3.2",
"jest-specific-snapshot": "^4.0.0",
"tmp": "^0.2.1"
"tmp": "^0.2.1",
"webpack": "4"
},
"peerDependencies": {
"@angular-devkit/architect": ">=0.8.9",

View File

@ -62,6 +62,9 @@
"read-pkg-up": "^7.0.1",
"regenerator-runtime": "^0.13.7",
"ts-dedent": "^2.0.0",
"webpack": ">=4.0.0 <6.0.0"
},
"devDependencies": {
"webpack": "4"
},
"peerDependencies": {

View File

@ -59,15 +59,16 @@
"react-dom": "16.14.0",
"read-pkg-up": "^7.0.1",
"regenerator-runtime": "^0.13.7",
"ts-dedent": "^2.0.0"
"ts-dedent": "^2.0.0",
"webpack": ">=4.0.0 <6.0.0"
},
"devDependencies": {
"preact": "^10.5.13"
"preact": "^10.5.13",
"webpack": "4"
},
"peerDependencies": {
"@babel/core": "*",
"preact": "^8.0.0||^10.0.0",
"webpack": "*"
"preact": "^8.0.0||^10.0.0"
},
"engines": {
"node": ">=10.13.0"

View File

@ -63,13 +63,14 @@
"regenerator-runtime": "^0.13.7",
"sveltedoc-parser": "4.1.0",
"ts-dedent": "^2.0.0",
"webpack": "4"
"webpack": ">=4.0.0 <6.0.0"
},
"devDependencies": {
"@types/loader-utils": "^2.0.0",
"@types/webpack-env": "^1.16.0",
"svelte": "^3.31.2",
"svelte-loader": "^3.0.0"
"svelte-loader": "^3.0.0",
"webpack": "4"
},
"peerDependencies": {
"@babel/core": "*",

View File

@ -64,12 +64,13 @@
"ts-loader": "^8.0.14",
"vue-docgen-api": "^4.44.15",
"vue-docgen-loader": "^1.5.0",
"webpack": "4"
"webpack": ">=4.0.0 <6.0.0"
},
"devDependencies": {
"vue": "^2.6.12",
"vue-loader": "^15.9.6",
"vue-template-compiler": "^2.6.12"
"vue-template-compiler": "^2.6.12",
"webpack": "4"
},
"peerDependencies": {
"@babel/core": "*",

View File

@ -64,11 +64,12 @@
"vue-docgen-api": "^4.44.15",
"vue-docgen-loader": "^1.5.0",
"vue-loader": "^16.0.0",
"webpack": "4"
"webpack": ">=4.0.0 <6.0.0"
},
"devDependencies": {
"@vue/compiler-sfc": "3.0.0",
"vue": "3.0.0"
"vue": "3.0.0",
"webpack": "4"
},
"peerDependencies": {
"@babel/core": "*",

View File

@ -58,13 +58,6 @@ describe('Basic CLI', () => {
});
describe('Page story', () => {
it('should load and display logged in', () => {
cy.navigateToStory('example-page', 'logged-in');
cy.getStoryElement().find('header').should('contain.text', 'Acme');
cy.getStoryElement().find('button').should('contain.text', 'Log out');
cy.getStoryElement().should('contain.text', 'Pages in Storybook');
});
it('should load and display logged out', () => {
cy.navigateToStory('example-page', 'logged-out');
cy.getStoryElement().should('contain.text', 'Acme');
@ -72,5 +65,12 @@ describe('Basic CLI', () => {
cy.getStoryElement().find('button').last().should('contain.text', 'Sign up');
cy.getStoryElement().should('contain.text', 'Pages in Storybook');
});
it('should load and display logged in', () => {
cy.navigateToStory('example-page', 'logged-in');
cy.getStoryElement().find('header').should('contain.text', 'Acme');
cy.getStoryElement().find('button').should('contain.text', 'Log out');
cy.getStoryElement().should('contain.text', 'Pages in Storybook');
});
});
});

View File

@ -97,12 +97,18 @@ Cypress.Commands.add('navigateToStory', (kind, name) => {
const storyLinkId = `#${kindId}--${storyId}`;
cy.log(`navigateToStory ${kind} ${name}`);
// docs-only stories
if (name !== 'page') {
// Section might be collapsed
cy.get(`#${kindId}`).then(($item) => {
if ($item.attr('aria-expanded') === 'false') $item.click();
cy.get(`#${kindId}`).then(async ($item) => {
if ($item.attr('aria-expanded') === 'false') {
await $item.click();
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(300);
}
});
}
cy.get(storyLinkId).click({ force: true });
// FIXME: Find a way to not wait like this but check for an element in the UI

View File

@ -124,7 +124,7 @@ function run() {
defaultValue: false,
option: '--reg',
command: () => {
spawn('yarn local-registry --publish --open');
spawn('yarn local-registry --publish --open --port 6000');
},
order: 11,
}),

View File

@ -6346,6 +6346,7 @@ __metadata:
fast-deep-equal: ^3.1.3
global: ^4.4.0
lodash: ^4.17.21
regenerator-runtime: ^0.13.7
remark-external-links: ^8.0.0
remark-slug: ^6.0.0
ts-dedent: ^2.0.0
@ -8006,10 +8007,10 @@ __metadata:
read-pkg-up: ^7.0.1
regenerator-runtime: ^0.13.7
ts-dedent: ^2.0.0
webpack: 4
peerDependencies:
"@babel/core": "*"
preact: ^8.0.0||^10.0.0
webpack: "*"
bin:
build-storybook: ./bin/build.js
start-storybook: ./bin/index.js