mirror of
https://github.com/quay/quay.git
synced 2025-04-18 10:44:06 +03:00
ui: fixing build trigger test (PROJQUAY-6695) (#2677)
Fixes issue where all repositories have had their date passed and have been marked stale in the create build trigger tests.
This commit is contained in:
parent
19f2bb81d7
commit
f312efbce2
@ -1009,11 +1009,19 @@ describe('Repository Builds - Create GitHub Build Triggers', () => {
|
||||
'/api/v1/repository/testorg/testrepo/trigger/github01-0001-4c69-a5cc-ec372d0117cd/namespaces',
|
||||
{fixture: 'github-build-trigger-namespaces.json'},
|
||||
).as('getBuildTriggerNamespaces');
|
||||
cy.intercept(
|
||||
'POST',
|
||||
'/api/v1/repository/testorg/testrepo/trigger/github01-0001-4c69-a5cc-ec372d0117cd/sources',
|
||||
{fixture: 'github-build-trigger-sources.json'},
|
||||
).as('getBuildTriggerSources');
|
||||
cy.fixture('github-build-trigger-sources.json').then((fixture) => {
|
||||
for (const repo of fixture.sources) {
|
||||
repo.last_updated =
|
||||
repo.name === 'stalerepo4'
|
||||
? 1705069849
|
||||
: Math.floor(Date.now() / 1000);
|
||||
}
|
||||
cy.intercept(
|
||||
'POST',
|
||||
'/api/v1/repository/testorg/testrepo/trigger/github01-0001-4c69-a5cc-ec372d0117cd/sources',
|
||||
fixture,
|
||||
).as('getBuildTriggerSources');
|
||||
});
|
||||
cy.intercept(
|
||||
'POST',
|
||||
'/api/v1/repository/testorg/testrepo/trigger/github01-0001-4c69-a5cc-ec372d0117cd/fields/refs',
|
||||
@ -1230,11 +1238,19 @@ describe('Repository Builds - Create GitHub Build Triggers', () => {
|
||||
'/api/v1/repository/testorg/testrepo/trigger/gitlab01-0001-4c69-a5cc-ec372d0117cd/namespaces',
|
||||
{fixture: 'gitlab-build-trigger-namespaces.json'},
|
||||
).as('getBuildTriggerNamespaces');
|
||||
cy.intercept(
|
||||
'POST',
|
||||
'/api/v1/repository/testorg/testrepo/trigger/gitlab01-0001-4c69-a5cc-ec372d0117cd/sources',
|
||||
{fixture: 'gitlab-build-trigger-sources.json'},
|
||||
).as('getBuildTriggerSources');
|
||||
cy.fixture('gitlab-build-trigger-sources.json').then((fixture) => {
|
||||
for (const repo of fixture.sources) {
|
||||
repo.last_updated =
|
||||
repo.name === 'stalerepo4'
|
||||
? 1705069849
|
||||
: Math.floor(Date.now() / 1000);
|
||||
}
|
||||
cy.intercept(
|
||||
'POST',
|
||||
'/api/v1/repository/testorg/testrepo/trigger/gitlab01-0001-4c69-a5cc-ec372d0117cd/sources',
|
||||
fixture,
|
||||
).as('getBuildTriggerSources');
|
||||
});
|
||||
cy.intercept(
|
||||
'POST',
|
||||
'/api/v1/repository/testorg/testrepo/trigger/gitlab01-0001-4c69-a5cc-ec372d0117cd/fields/refs',
|
||||
|
Loading…
x
Reference in New Issue
Block a user