Skip to content

Commit

Permalink
Remove Product Files tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvire committed Jul 19, 2023
1 parent dbc8938 commit 97e5f13
Showing 1 changed file with 0 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,119 +306,3 @@ const scenarios = {
],
},
};

describe('Acceptance | Project View | Product Files', () => {
resetBrowser();
useFakeAuthentication();
setupApplicationTest();

describe('no builds yet', () => {
let customizer: (server, req, resp) => Promise<void>;

const requestCustomizer = async (server, req, resp) => {
if (customizer) {
await customizer(server, req, resp);
}
};
beforeEach(function() {
customizer = null;
this.mockGet(200, 'users', { data: [] }, requestCustomizer);
this.mockGet(200, '/groups', { data: [] }, requestCustomizer);
this.mockGet(200, 'projects/1', scenarios.noBuilds, requestCustomizer);
});

beforeEach(async () => {
visit('/projects/1');
await when(() => page.isPresent);
await page.switchToFilesTab();
await when(() => page.projectFiles.isPresent);
});

it('shows one product for project with one product', () => {
expect(page.projectFiles.products().length).to.equal(1);
});

it('render no builds', () => {
expect(page.projectFiles.products(0).selectedBuild).equal('No Builds Yet');
});

it('renders no artifacts', () => {
expect(page.projectFiles.products(0).artifactCount).contains('No Product Files');
});
});

describe('there is one build', () => {
beforeEach(function() {
this.mockGet(200, 'users', { data: [] });
this.mockGet(200, 'groups', { data: [] });
});

describe('the build was successful', () => {
beforeEach(async function() {
this.mockGet(200, 'projects/1', scenarios.oneBuildSuccess);

await visitTheFilesTab();
});

it('shows the version number', () => {
expect(page.projectFiles.products(0).selectedBuild).contains('v1.0.0');
});

it('does not show the publish detail', () => {
expect(page.projectFiles.products(0).publicationInfoVisible).to.be.false;
});
});

describe('the build has not yet finished', () => {
beforeEach(async function() {
this.mockGet(200, 'projects/1', scenarios.oneBuildPending);

await visitTheFilesTab();
});

it('does not show a version, and instead indicates that it is pending', () => {
expect(page.projectFiles.products(0).selectedBuild).contains('Build Pending');
});
});

describe('the build was published', () => {
beforeEach(async function() {
this.mockGet(200, 'projects/1', scenarios.oneBuildPublished);

await visitTheFilesTab();
});

it('shows the version number', () => {
expect(page.projectFiles.products(0).selectedBuild).contains('v1.0.0');
});

it('shows the publish detail', () => {
expect(page.projectFiles.products(0).publicationInfoVisible).to.be.true;
});

it('has production publishing channel', () => {
expect(page.projectFiles.products(0).publicationChannel).contains('production');
});

it('has a successful status', () => {
expect(page.projectFiles.products(0).publicationStatus).contains('Success');
});
});

describe('the publish is in progress', () => {
beforeEach(async function() {
this.mockGet(200, 'projects/1', scenarios.oneBuildPublishInProgress);

await visitTheFilesTab();
});

it('shows the version number', () => {
expect(page.projectFiles.products(0).selectedBuild).contains('v1.0.0');
});

it('does not display the publish information', () => {
expect(page.projectFiles.products(0).publicationInfoVisible).to.be.false;
});
});
});
});

0 comments on commit 97e5f13

Please sign in to comment.