Skip to content

Commit

Permalink
fix(deps): bump @verdaccio/ui-theme from 1.12.1 to 1.13.1 (#1961)
Browse files Browse the repository at this point in the history
* build(deps): bump @verdaccio/ui-theme from 1.12.1 to 1.13.1

Bumps [@verdaccio/ui-theme](https://github.com/verdaccio/ui) from 1.12.1 to 1.13.1.
- [Release notes](https://github.com/verdaccio/ui/releases)
- [Changelog](https://github.com/verdaccio/ui/blob/master/CHANGELOG.md)
- [Commits](verdaccio/ui@v1.12.1...v1.13.1)

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update puppeteer

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Juan Picado <juanpicado19@gmail.com>
  • Loading branch information
dependabot[bot] and juanpicado committed Oct 11, 2020
1 parent 647b6b3 commit f7aad33
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 119 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -24,7 +24,7 @@
"@verdaccio/local-storage": "9.7.2",
"@verdaccio/readme": "9.7.3",
"@verdaccio/streams": "9.7.2",
"@verdaccio/ui-theme": "1.12.1",
"@verdaccio/ui-theme": "1.13.1",
"JSONStream": "1.3.5",
"async": "3.2.0",
"body-parser": "1.19.0",
Expand Down Expand Up @@ -89,7 +89,7 @@
"lockfile-lint": "4.2.2",
"nock": "11.7.2",
"prettier": "1.19.1",
"puppeteer": "1.8.0",
"puppeteer": "5.3.1",
"rimraf": "3.0.2",
"selfsigned": "1.10.7",
"standard-version": "8.0.1",
Expand Down
31 changes: 17 additions & 14 deletions test/e2e/e2e.spec.js
@@ -1,13 +1,12 @@
export const HELP_TITLE = 'No Package Published Yet.';
const scopedPackageMetadata = require('./partials/pkg-scoped');
const protectedPackageMetadata = require('./partials/pkg-protected');
const scopedPackageMetadata = require('./partials/pkg-scoped');

describe('/ (Verdaccio Page)', () => {
let page;
// this might be increased based on the delays included in all test
jest.setTimeout(20000);

const clickElement = async function(selector, options = { button: 'middle', delay: 100 }) {
const clickElement = async function(selector, options = { delay: 100 }) {
const button = await page.$(selector);
await button.focus();
await button.click(options);
Expand All @@ -27,7 +26,6 @@ describe('/ (Verdaccio Page)', () => {

const logIn = async function() {
await clickElement('button[data-testid="header--button-login"]');
await page.waitFor(500);
// we fill the sign in form
const signInDialog = await page.$('#login--dialog');
const userInput = await signInDialog.$('#login--dialog-username');
Expand Down Expand Up @@ -61,10 +59,11 @@ describe('/ (Verdaccio Page)', () => {

expect(text).toContain('verdaccio-server-e2e');
});
//

test('should match title with no packages published', async () => {
const text = await page.evaluate(() => document.querySelector('#help-card__title').textContent);
expect(text).toMatch(HELP_TITLE);
expect(text).toMatch('No Package Published Yet.');
});
//

Expand All @@ -79,6 +78,7 @@ describe('/ (Verdaccio Page)', () => {
expect(text).toContain('npm publish --registry http://0.0.0.0:55558');
});
//

test('should match button Login to sign in', async () => {
await evaluateSignIn();
});
Expand All @@ -90,6 +90,9 @@ describe('/ (Verdaccio Page)', () => {
await page.waitFor(1000);
const signInDialog = await page.$('#login--dialog');
expect(signInDialog).not.toBeNull();
const closeButton = await page.$('button[data-testid="close-login-dialog-button"]');
await closeButton.click();
await page.waitFor(500);
});
//

Expand All @@ -100,13 +103,12 @@ describe('/ (Verdaccio Page)', () => {
const buttonLogout = await page.$('#header--button-logout');
expect(buttonLogout).toBeDefined();
});
//

test('should logout an user', async () => {
// we assume the user is logged already
await clickElement('#header--button-account', { clickCount: 1, delay: 500 });
await clickElement('#header--button-account', { delay: 500 });
await page.waitFor(1000);
await clickElement('#header--button-logout > span', { clickCount: 1, delay: 500 });
await clickElement('#header--button-logout > span', { delay: 500 });
await page.waitFor(1000);
await evaluateSignIn();
});
Expand All @@ -121,7 +123,7 @@ describe('/ (Verdaccio Page)', () => {
expect(registryInfoDialog).not.toBeNull();

const closeButton = await page.$('#registryInfo--dialog-close');
closeButton.click();
await closeButton.click();
});
//

Expand All @@ -139,7 +141,7 @@ describe('/ (Verdaccio Page)', () => {
const packagesList = await getPackages();
// console.log("-->packagesList:", packagesList);
const firstPackage = packagesList[0];
await firstPackage.click({ clickCount: 1, delay: 200 });
await firstPackage.click({ delay: 200 });
await page.waitFor(1000);
const readmeText = await page.evaluate(() => document.querySelector('.markdown-body').textContent);

Expand All @@ -151,10 +153,11 @@ describe('/ (Verdaccio Page)', () => {
expect(versionList).toHaveLength(1);
});
//

test('should display dependencies tab', async () => {
const dependenciesTab = await page.$$('#dependencies-tab');
expect(dependenciesTab).toHaveLength(1);
await dependenciesTab[0].click({ clickCount: 1, delay: 200 });
await dependenciesTab[0].click({ delay: 200 });
await page.waitFor(1000);
const tags = await page.$$('.dep-tag');
const tag = tags[0];
Expand All @@ -165,7 +168,7 @@ describe('/ (Verdaccio Page)', () => {
test('should display version tab', async () => {
const versionsTab = await page.$$('#versions-tab');
expect(versionsTab).toHaveLength(1);
await versionsTab[0].click({ clickCount: 1, delay: 200 });
await versionsTab[0].click({ delay: 200 });
await page.waitFor(1000);
const versionItems = await page.$$('.version-item');
expect(versionItems).toHaveLength(2);
Expand All @@ -174,14 +177,14 @@ describe('/ (Verdaccio Page)', () => {
test('should display uplinks tab', async () => {
const upLinksTab = await page.$$('#uplinks-tab');
expect(upLinksTab).toHaveLength(1);
await upLinksTab[0].click({ clickCount: 1, delay: 200 });
await upLinksTab[0].click({ delay: 200 });
await page.waitFor(1000);
});

test('should display readme tab', async () => {
const readmeTab = await page.$$('#readme-tab');
expect(readmeTab).toHaveLength(1);
await readmeTab[0].click({ clickCount: 1, delay: 200 });
await readmeTab[0].click({ delay: 200 });
await page.waitFor(1000);
});

Expand Down

0 comments on commit f7aad33

Please sign in to comment.